-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_cosmosdb_account add minimal_tls_version #24711
Conversation
CosmosDB Service team confirmed that there is a known issue that the default value of Note: TestAccCosmosDBAccount_restoreCreateMode would fail once this PR is applied. |
HI @rizkybiz - Thanks for this PR. Unfortunately, as noted in an earlier PR here #24615 (comment) this property has an upstream API issue which we are working with MSFT to resolve. Due to this ongoing work with the service team, I'm going to close this for now and we can take a look again when the upstream issue is resolved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @rizkybiz - While there is an underlaying API bug this is something i think we can work around by in the create function once we’ve restored the CosmosDB account we can do an update on the other values (e.g. tls) to ensure they match the configuration
@@ -301,6 +301,12 @@ func resourceCosmosDbAccount() *pluginsdk.Resource { | |||
} | |||
}(), | |||
|
|||
"minimal_tls_version": { | |||
Type: pluginsdk.TypeString, | |||
Optional: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we be specifying a default value here? or making it computed?
|
||
var minimalTlsVersion cosmosdb.MinimalTlsVersion | ||
switch v := d.Get("minimal_tls_version").(string); v { | ||
case "Tls": | ||
minimalTlsVersion = cosmosdb.MinimalTlsVersionTls | ||
case "Tls11": | ||
minimalTlsVersion = cosmosdb.MinimalTlsVersionTlsOneOne | ||
case "Tls12": | ||
minimalTlsVersion = cosmosdb.MinimalTlsVersionTlsOneTwo | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come we need this? shouldn't the allowed values match the constant?
503e886
to
3087b2c
Compare
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Test Output
fixes #21295