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_account: enable_analytical_storage #10055

Merged
merged 6 commits into from Jan 14, 2021
Merged

azurerm_cosmosdb_account: enable_analytical_storage #10055

merged 6 commits into from Jan 14, 2021

Conversation

favoretti
Copy link
Collaborator

Initial implementation assumed it's a capability, whereas it's a
property. This PR implements it properly.

Fixes #9119

Initial implementation assumed it's a capability, whereas it's a
property. This PR implements it properly.

Fixes #9119
@favoretti
Copy link
Collaborator Author

$ TF_ACC=1 go test -v ./azurerm/internal/services/cosmos -timeout=600m -run TestAccAzureRMCosmosDBAccount_analytical_storage_enabled
=== RUN   TestAccAzureRMCosmosDBAccount_analytical_storage_enabled
=== PAUSE TestAccAzureRMCosmosDBAccount_analytical_storage_enabled
=== CONT  TestAccAzureRMCosmosDBAccount_analytical_storage_enabled
--- PASS: TestAccAzureRMCosmosDBAccount_analytical_storage_enabled (703.28s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/cosmos	705.447s

@favoretti
Copy link
Collaborator Author

Also verified during the acceptance test that account had property set properly.

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 @favoretti - overall looks good aside from one comment

@favoretti
Copy link
Collaborator Author

$ TF_ACC=1 go test -v ./azurerm/internal/services/cosmos -timeout=600m -run TestAccCosmosDBAccount_analyticalStorage
=== RUN   TestAccCosmosDBAccount_analyticalStorage
=== PAUSE TestAccCosmosDBAccount_analyticalStorage
=== CONT  TestAccCosmosDBAccount_analyticalStorage
--- PASS: TestAccCosmosDBAccount_analyticalStorage (699.30s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/cosmos	700.600s

@ghost ghost removed the waiting-response label Jan 6, 2021
@favoretti favoretti requested a review from katbyte January 6, 2021 15:54
@favoretti
Copy link
Collaborator Author

@katbyte should be good to go now.

@T1loc
Copy link

T1loc commented Jan 7, 2021

@favoretti @katbyte Do you think it will be a good idea to also add the Analytical Storage Time to Live ?

@favoretti
Copy link
Collaborator Author

favoretti commented Jan 7, 2021 via email

@favoretti
Copy link
Collaborator Author

Reminder to myself - rename enable_analytical_storage to analytical_storage_enabled.

Copy link
Member

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@favoretti
Copy link
Collaborator Author

@katbyte Renamed property as requested.

@favoretti
Copy link
Collaborator Author

@T1loc Quick googling didn't tell me anything on TTL, would you be so kind to point me to it, or better yet, log a separate issue for that property, I can tackle it in a separate PR then.

@T1loc
Copy link

T1loc commented Jan 12, 2021

@T1loc Quick googling didn't tell me anything on TTL, would you be so kind to point me to it, or better yet, log a separate issue for that property, I can tackle it in a separate PR then.

@T1loc Quick googling didn't tell me anything on TTL, would you be so kind to point me to it, or better yet, log a separate issue for that property, I can tackle it in a separate PR then.

@favoretti Yes we need a new issue.
Some info about it : https://docs.microsoft.com/en-us/azure/cosmos-db/analytical-store-introduction#analytical-ttl

This options need at container creation time to have the AnalyticalStore enable. I will open an issue in ~1h

@katbyte katbyte added this to the v2.43.0 milestone Jan 14, 2021
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.

@favoretti - i'm getting this test failure:

------- Stdout: -------
=== RUN   TestAccCosmosDBAccount_analyticalStorage
=== PAUSE TestAccCosmosDBAccount_analyticalStorage
=== CONT  TestAccCosmosDBAccount_analyticalStorage
    testing.go:684: Step 0 error: Check failed: 1 error occurred:
        	* Check 2/2 error: azurerm_cosmosdb_account.test: Attribute 'enable_analytical_storage' not found
        
        
--- FAIL: TestAccCosmosDBAccount_analyticalStorage (681.00s)
FAIL

@favoretti
Copy link
Collaborator Author

@tombuildsstuff Fixed acceptance test too after the rename, so maybe this can go in 2.43 too.

$ TF_ACC=1 go test -v ./azurerm/internal/services/cosmos -timeout=1000m -run TestAccCosmosDBAccount_analyticalStorage
=== RUN   TestAccCosmosDBAccount_analyticalStorage
=== PAUSE TestAccCosmosDBAccount_analyticalStorage
=== CONT  TestAccCosmosDBAccount_analyticalStorage
--- PASS: TestAccCosmosDBAccount_analyticalStorage (689.06s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/cosmos	690.502s

@jackofallops
Copy link
Member

Tests are looking good now 👍

@ghost
Copy link

ghost commented Jan 14, 2021

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

@ghost
Copy link

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

@hashicorp hashicorp locked as resolved and limited conversation to collaborators Feb 14, 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.

EnableAnalyticalStorage capabilities not detected in resource azurerm_cosmosdb_account
5 participants