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_cosmos_db_account - add support for enable_free_tier #7814

Merged
merged 8 commits into from
Jul 21, 2020
Merged

azurerm_cosmos_db_account - add support for enable_free_tier #7814

merged 8 commits into from
Jul 21, 2020

Conversation

giotab
Copy link
Contributor

@giotab giotab commented Jul 20, 2020

Azure Cosmos DB API 2020-04-01 allows to set the Free Tier option using EnableFreeTier.

After introducing the new version in #7597, it is possible to solve #6030 and allow Free Cosmos DB pricing option.

@giotab giotab changed the title Cosmos freetier Cosmos DB Free Tier Jul 20, 2020
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

Hey @giotab, thanks for making this change. It looks mostly good, we just want to make sure we test the new attribute as best we can

website/docs/r/cosmosdb_account.html.markdown Outdated Show resolved Hide resolved
website/docs/r/cosmosdb_account.html.markdown Outdated Show resolved Hide resolved
examples/cosmos-db/basic/main.tf Outdated Show resolved Hide resolved
@@ -786,6 +786,8 @@ resource "azurerm_cosmosdb_account" "test" {
resource_group_name = azurerm_resource_group.test.name
offer_type = "Standard"
kind = "GlobalDocumentDB"

enable_free_tier = false
Copy link
Member

Choose a reason for hiding this comment

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

We can remove this because it defaults to false. Instead, we should add a test to enable/disable the free tier. If we can't disable it, we need to add ForceNew: true to the schema declaration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is possible to have only one Free Tier account and I do not think it is possible to change it. Hence, I added the ForceNew to the schema and I introduced a new test for this. I appreciate your feedback!

@ghost ghost added size/M and removed size/S labels Jul 20, 2020
@mbfrahry mbfrahry added this to the v2.20.0 milestone Jul 20, 2020
@giotab giotab changed the title Cosmos DB Free Tier [WIP] Cosmos DB Free Tier Jul 20, 2020
@giotab giotab changed the title [WIP] Cosmos DB Free Tier Cosmos DB Free Tier Jul 20, 2020
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

LGTM!

@mbfrahry
Copy link
Member

Thanks for this @giotab!

Fixes #6030

@mbfrahry mbfrahry changed the title Cosmos DB Free Tier azurerm_cosmos_db_account - add support for enable_free_tier Jul 21, 2020
@mbfrahry mbfrahry merged commit 04ec810 into hashicorp:master Jul 21, 2020
mbfrahry added a commit that referenced this pull request Jul 21, 2020
@ghost
Copy link

ghost commented Jul 23, 2020

This has been released in version 2.20.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.20.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Aug 20, 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 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Aug 20, 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.

2 participants