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

Added support of customer_managed_key into azurerm_cognitive_account #18516

Merged
merged 1 commit into from
Sep 24, 2022

Conversation

dkuzmenok
Copy link
Contributor

@dkuzmenok dkuzmenok commented Sep 23, 2022

Description

Currently customer_managed_key in a Cognitive Account can be used only as a separate resource azurerm_cognitive_account_customer_managed_key.

This makes impossible to create azurerm_cognitive_account with use of CMK from the very beginning.

Changes

This PR is adding a support of customer_managed_key in azurerm_cognitive_account.

Resolves #18084.

Tests

# go test -v -timeout 3000s -run ^TestAccCognitiveAccount github.com/hashicorp/terraform-provider-azurerm/internal/services/cognitive/
=== RUN   TestAccCognitiveAccountCustomerManagedKey_basic
=== PAUSE TestAccCognitiveAccountCustomerManagedKey_basic
=== RUN   TestAccCognitiveAccountCustomerManagedKey_requiresImport
=== PAUSE TestAccCognitiveAccountCustomerManagedKey_requiresImport
=== RUN   TestAccCognitiveAccountCustomerManagedKey_complete
=== PAUSE TestAccCognitiveAccountCustomerManagedKey_complete
=== RUN   TestAccCognitiveAccountCustomerManagedKey_update
=== PAUSE TestAccCognitiveAccountCustomerManagedKey_update
=== RUN   TestAccCognitiveAccountDataSource_basic
=== PAUSE TestAccCognitiveAccountDataSource_basic
=== RUN   TestAccCognitiveAccount_basic
=== PAUSE TestAccCognitiveAccount_basic
=== RUN   TestAccCognitiveAccount_speechServices
=== PAUSE TestAccCognitiveAccount_speechServices
=== RUN   TestAccCognitiveAccount_requiresImport
=== PAUSE TestAccCognitiveAccount_requiresImport
=== RUN   TestAccCognitiveAccount_complete
=== PAUSE TestAccCognitiveAccount_complete
=== RUN   TestAccCognitiveAccount_update
=== PAUSE TestAccCognitiveAccount_update
=== RUN   TestAccCognitiveAccount_qnaRuntimeEndpoint
=== PAUSE TestAccCognitiveAccount_qnaRuntimeEndpoint
=== RUN   TestAccCognitiveAccount_qnaRuntimeEndpointUnspecified
=== PAUSE TestAccCognitiveAccount_qnaRuntimeEndpointUnspecified
=== RUN   TestAccCognitiveAccount_cognitiveServices
=== PAUSE TestAccCognitiveAccount_cognitiveServices
=== RUN   TestAccCognitiveAccount_withMultipleCognitiveAccounts
=== PAUSE TestAccCognitiveAccount_withMultipleCognitiveAccounts
=== RUN   TestAccCognitiveAccount_networkAclsVirtualNetworkRules
=== PAUSE TestAccCognitiveAccount_networkAclsVirtualNetworkRules
=== RUN   TestAccCognitiveAccount_networkAcls
=== PAUSE TestAccCognitiveAccount_networkAcls
=== RUN   TestAccCognitiveAccount_identity
=== PAUSE TestAccCognitiveAccount_identity
=== RUN   TestAccCognitiveAccount_metricsAdvisor
=== PAUSE TestAccCognitiveAccount_metricsAdvisor
=== RUN   TestAccCognitiveAccount_customerManagedKey
=== PAUSE TestAccCognitiveAccount_customerManagedKey
=== CONT  TestAccCognitiveAccountCustomerManagedKey_basic
=== CONT  TestAccCognitiveAccount_speechServices
=== CONT  TestAccCognitiveAccount_complete
=== CONT  TestAccCognitiveAccount_update
--- PASS: TestAccCognitiveAccount_complete (146.27s)
=== CONT  TestAccCognitiveAccount_networkAclsVirtualNetworkRules
--- PASS: TestAccCognitiveAccount_speechServices (172.80s)
=== CONT  TestAccCognitiveAccount_customerManagedKey
--- PASS: TestAccCognitiveAccount_update (209.71s)
=== CONT  TestAccCognitiveAccount_metricsAdvisor
--- PASS: TestAccCognitiveAccountCustomerManagedKey_basic (346.53s)
=== CONT  TestAccCognitiveAccount_identity
--- PASS: TestAccCognitiveAccount_networkAclsVirtualNetworkRules (311.24s)
=== CONT  TestAccCognitiveAccount_networkAcls
--- PASS: TestAccCognitiveAccount_customerManagedKey (292.68s)
=== CONT  TestAccCognitiveAccount_cognitiveServices
--- PASS: TestAccCognitiveAccount_cognitiveServices (110.19s)
=== CONT  TestAccCognitiveAccount_withMultipleCognitiveAccounts
--- PASS: TestAccCognitiveAccount_withMultipleCognitiveAccounts (122.00s)
=== CONT  TestAccCognitiveAccount_requiresImport
--- PASS: TestAccCognitiveAccount_networkAcls (319.45s)
--- PASS: TestAccCognitiveAccount_identity (451.14s)
=== CONT  TestAccCognitiveAccount_qnaRuntimeEndpointUnspecified
--- PASS: TestAccCognitiveAccount_requiresImport (169.22s)
=== CONT  TestAccCognitiveAccountCustomerManagedKey_update
--- PASS: TestAccCognitiveAccount_qnaRuntimeEndpointUnspecified (121.11s)
=== CONT  TestAccCognitiveAccount_basic
=== CONT  TestAccCognitiveAccountDataSource_basic
--- PASS: TestAccCognitiveAccount_basic (130.55s)
=== CONT  TestAccCognitiveAccountCustomerManagedKey_complete
--- PASS: TestAccCognitiveAccount_metricsAdvisor (842.50s)
=== CONT  TestAccCognitiveAccountCustomerManagedKey_requiresImport
--- PASS: TestAccCognitiveAccountDataSource_basic (123.16s)
=== CONT  TestAccCognitiveAccount_qnaRuntimeEndpoint
--- PASS: TestAccCognitiveAccountCustomerManagedKey_complete (293.89s)
--- PASS: TestAccCognitiveAccountCustomerManagedKey_update (489.91s)
--- PASS: TestAccCognitiveAccountCustomerManagedKey_requiresImport (321.67s)
--- PASS: TestAccCognitiveAccount_qnaRuntimeEndpoint (253.12s)
PASS
ok    github.com/hashicorp/terraform-provider-azurerm/internal/services/cognitive     1399.431s
#

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 @dkuzmenok - LGTM 🍚

@katbyte katbyte merged commit e58bb62 into hashicorp:main Sep 24, 2022
@github-actions github-actions bot added this to the v3.24.0 milestone Sep 24, 2022
katbyte added a commit that referenced this pull request Sep 24, 2022
@katbyte katbyte modified the milestones: v3.24.0, v3.25.0 Sep 24, 2022
@dkuzmenok
Copy link
Contributor Author

@katbyte That was quick! Many thanks! 🤘

@dkuzmenok dkuzmenok deleted the cognitive-account-cmk branch September 26, 2022 06:49
@github-actions
Copy link

This functionality has been released in v3.25.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2022
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.

Create Azure Cognitive Service with Customer Managed Key
2 participants