Skip to content
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 doesn't call get throughput api when cosmos account is serverless #9311

Merged

Conversation

ilmax
Copy link
Contributor

@ilmax ilmax commented Nov 13, 2020

Fixes #8175, this time for real :)

This is based on #8673 & #9187 /cc @yupwei68

Unfortunately I missed this one in 9187. This should now fix comsosdb SQL serverless.

make testacc TEST=./azurerm/internal/services/cosmos TESTARGS='-run=TestAccAzureRMCosmosDbSqlContainer' TESTTIMEOUT='80m'

=== RUN   TestAccAzureRMCosmosDbSqlContainer_basic
=== PAUSE TestAccAzureRMCosmosDbSqlContainer_basic
=== RUN   TestAccAzureRMCosmosDbSqlContainer_basic_serverless
=== PAUSE TestAccAzureRMCosmosDbSqlContainer_basic_serverless
=== RUN   TestAccAzureRMCosmosDbSqlContainer_complete
=== PAUSE TestAccAzureRMCosmosDbSqlContainer_complete
=== RUN   TestAccAzureRMCosmosDbSqlContainer_update
=== PAUSE TestAccAzureRMCosmosDbSqlContainer_update
=== RUN   TestAccAzureRMCosmosDbSqlContainer_autoscale
=== PAUSE TestAccAzureRMCosmosDbSqlContainer_autoscale
=== RUN   TestAccAzureRMCosmosDbSqlContainer_indexing_policy
=== PAUSE TestAccAzureRMCosmosDbSqlContainer_indexing_policy
=== CONT  TestAccAzureRMCosmosDbSqlContainer_basic
=== CONT  TestAccAzureRMCosmosDbSqlContainer_autoscale
=== CONT  TestAccAzureRMCosmosDbSqlContainer_complete
=== CONT  TestAccAzureRMCosmosDbSqlContainer_update
=== CONT  TestAccAzureRMCosmosDbSqlContainer_indexing_policy
=== CONT  TestAccAzureRMCosmosDbSqlContainer_basic_serverless
--- PASS: TestAccAzureRMCosmosDbSqlContainer_basic (1335.18s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_complete (1336.32s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_basic_serverless (1387.55s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_indexing_policy (1550.58s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_update (1564.60s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_autoscale (1662.43s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/cosmos      1662.540s

@ghost ghost added the size/M label Nov 13, 2020
@ilmax
Copy link
Contributor Author

ilmax commented Nov 13, 2020

/cc @mariussm FYI

@mariussm
Copy link
Contributor

/cc @mariussm FYI

Thanks @ilmax ! :)

Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @ilmax - This LGTM 👍

@jackofallops
Copy link
Member

Tests look good:
image

@jackofallops jackofallops merged commit 480276a into hashicorp:master Nov 18, 2020
@ilmax ilmax deleted the fix-comsosdb-sql-container-serverless branch November 18, 2020 09:14
@mariussm
Copy link
Contributor

After this fix, I am seeing my sql_container objects created successfully, but on the next run, Terraform will destroy them and re-create them. This happens every time. Are you seeing the same issue @ilmax ?

@mariussm
Copy link
Contributor

Seems the issue stems from having the following defined, that causes my replacement:

unique_key {
    paths = []
}

@mariussm
Copy link
Contributor

Tested and works like a charm - awesome work @ilmax

@ghost
Copy link

ghost commented Dec 18, 2020

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!

@ghost ghost locked as resolved and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Cosmos DB serverless
3 participants