-
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_sql_container
- support for default_ttl
#5492
azurerm_cosmosdb_sql_container
- support for default_ttl
#5492
Conversation
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.
Thanks for the pr @aqche, this LGTM! 👍
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.
It looks like the tests are failing? 🤔
Test Failed
------- Stdout: -------
=== RUN TestAccAzureRMCosmosDbSqlContainer_basic
=== PAUSE TestAccAzureRMCosmosDbSqlContainer_basic
=== CONT TestAccAzureRMCosmosDbSqlContainer_basic
--- FAIL: TestAccAzureRMCosmosDbSqlContainer_basic (1293.56s)
testing.go:569: Step 0 error: Check failed: 1 error occurred:
* Check 1/1 error: Bad: Get on cosmosAccountsClient: documentdb.DatabaseAccountsClient#GetSQLContainer: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.DocumentDB/databaseAccounts/acctest-200123162126243972' under resource group 'acctestRG-cosmos-200123162126243972' was not found."
hmm strange, i'm able to run the tests w/o any issues... i'll poke around and see if I can discover anything.
|
update, able to reproduce the failing tests after merging latest master into my branch. will look into the cause. |
@@ -127,7 +129,7 @@ func testCheckAzureRMCosmosDbSqlContainerExists(resourceName string) resource.Te | |||
resourceGroup := rs.Primary.Attributes["resource_group_name"] | |||
database := rs.Primary.Attributes["database_name"] | |||
|
|||
resp, err := client.GetSQLContainer(ctx, resourceGroup, database, account, name) | |||
resp, err := client.GetSQLContainer(ctx, resourceGroup, account, database, name) |
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.
turns out the reason the tests were failing was because the inputs were incorrect. it passed before b/c until recently database
and account
used the same naming format.
Reran the tests and they passed, thanks @aqche |
This has been released in version 1.42.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 1.42.0"
}
# ... other configuration ... |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Fixes #5451
Adds the
default_ttl
argument for theazurerm_cosmosdb_sql_container
resource.Also, fixes a bug causing resource updates to fail since
id.Container
was being passed in instead ofid.ResourceGroup
for one of the function arguments.