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

add partition_key_version attribute to resource azurerm_cosmosdb_sql_container #9496

Merged
merged 9 commits into from
Dec 7, 2020

Conversation

ankushjain3005
Copy link
Contributor

@ankushjain3005 ankushjain3005 commented Nov 26, 2020

Azure Cosmos DB now supports large partition keys with values up to 2 KB. This pull request captures adding an attribute partition_key_version which can be used to set this configuration. This URL has more details about this.
This closes #8653.

@ankushjain3005
Copy link
Contributor Author

Test Result:

`
ankujai@Ankujai-lp MINGW64 ~/go/src/github.com/terraform-providers/terraform-provider-azurerm (master)
$ TF_ACC=1 go test -v ./azurerm/internal/services/cosmos/ -run TestAccAzureRMCosmosDbSqlContainer -timeout 60m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc" === 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
=== RUN TestAccAzureRMCosmosDbSqlContainer_partition_key_version
=== PAUSE TestAccAzureRMCosmosDbSqlContainer_partition_key_version
=== CONT TestAccAzureRMCosmosDbSqlContainer_basic
=== CONT TestAccAzureRMCosmosDbSqlContainer_indexing_policy
=== CONT TestAccAzureRMCosmosDbSqlContainer_autoscale
=== CONT TestAccAzureRMCosmosDbSqlContainer_partition_key_version
=== CONT TestAccAzureRMCosmosDbSqlContainer_complete
=== CONT TestAccAzureRMCosmosDbSqlContainer_update
=== CONT TestAccAzureRMCosmosDbSqlContainer_basic_serverless
--- PASS: TestAccAzureRMCosmosDbSqlContainer_basic_serverless (1077.73s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_basic (1090.11s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_partition_key_version (1159.99s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_complete (1196.99s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_update (1303.25s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_indexing_policy (1424.73s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_autoscale (1562.54s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/cosmos 1572.680s

`

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks @ankushjain3005 - overall this looks good, once the comments i've left inline are addressed (and testes pass) this should be good to merge!

@ankushjain3005
Copy link
Contributor Author

resolved the comments and reran the test. here are the results

$ TF_ACC=1 go test -v ./azurerm/internal/services/cosmos/ -run TestAccAzureRMCosmosDbSqlContainer -timeout 60m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc" === RUN
go: downloading github.com/tombuildsstuff/giovanni v0.15.0
=== 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
=== RUN TestAccAzureRMCosmosDbSqlContainer_partition_key_version
=== PAUSE TestAccAzureRMCosmosDbSqlContainer_partition_key_version
=== CONT TestAccAzureRMCosmosDbSqlContainer_basic
=== CONT TestAccAzureRMCosmosDbSqlContainer_autoscale
=== CONT TestAccAzureRMCosmosDbSqlContainer_update
=== CONT TestAccAzureRMCosmosDbSqlContainer_indexing_policy
=== CONT TestAccAzureRMCosmosDbSqlContainer_complete
=== CONT TestAccAzureRMCosmosDbSqlContainer_partition_key_version
=== CONT TestAccAzureRMCosmosDbSqlContainer_basic_serverless
--- PASS: TestAccAzureRMCosmosDbSqlContainer_partition_key_version (1369.94s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_complete (1369.94s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_basic_serverless (1369.95s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_basic (1369.98s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_indexing_policy (1398.07s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_update (1401.23s)
--- PASS: TestAccAzureRMCosmosDbSqlContainer_autoscale (1885.70s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/cosmos 1898.769s

@katbyte katbyte added this to the v2.40.0 milestone Dec 7, 2020
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks @ankushjain3005 - LGTM 👍

@katbyte katbyte merged commit aad5728 into hashicorp:master Dec 7, 2020
katbyte added a commit that referenced this pull request Dec 7, 2020
@ghost
Copy link

ghost commented Dec 10, 2020

This has been released in version 2.40.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 = "~> 2.40.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jan 6, 2021

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 Jan 6, 2021
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 large partition key in cosmosdb
2 participants