azurerm_cognitive_account : fix crash when key_vault_key_id is nil#28368
azurerm_cognitive_account : fix crash when key_vault_key_id is nil#28368catriona-m merged 3 commits intohashicorp:mainfrom
azurerm_cognitive_account : fix crash when key_vault_key_id is nil#28368Conversation
catriona-m
left a comment
There was a problem hiding this comment.
Thanks @sinbai - could we add a test here which switches from using a customer managed key to microsoft managed to confirm that this will fix the linked issue?
Hi @catriona-m thanks for your feedback. When I added a test to switch from using customer managed keys to Microsoft managed keys, I found that the current TF implementation cannot make the switch. Here's why:
So while adding the test, I updated the code (when sending the API request without specifying Test result: |
catriona-m
left a comment
There was a problem hiding this comment.
Thanks for updating this @sinbai. It looks like there are some test failures related to this, but once those are addressed I can take another look. Thanks!
------- Stdout: -------
=== RUN TestAccCognitiveAccount_basic
=== PAUSE TestAccCognitiveAccount_basic
=== CONT TestAccCognitiveAccount_basic
testcase.go:173: Step 1/3 error: Error running apply: exit status 1
Error: creating Account (Subscription: "*******"
Resource Group Name: "acctestRG-cognitive-250314103054145747"
Account Name: "acctestcogacc-250314103054145747"): unexpected status 400 (400 Bad Request) with error: BringOwnFeatureNotEnabled: Bring your own feature is not enabled for Subscription/SKU/Kind.
with azurerm_cognitive_account.test,
on terraform_plugin_test.tf line 40, in resource "azurerm_cognitive_account" "test":
40: resource "azurerm_cognitive_account" "test" {
--- FAIL: TestAccCognitiveAccount_basic (109.26s)
FAIL
Hi @catriona-m thanks for your feedback. I have updated the code, could you please take another look? |
* CHANGELOG.md for v4.24.0 * Update CHANGELOG.md #28173 * Update CHANGELOG.md #28964 * Update CHANGELOG.md #28569 * Update CHANGELOG.md for #28670 * Update CHANGELOG.md #29081 * Update CHANGELOG.md for #29082 * Update CHANGELOG.md #28888 * Update CHANGELOG.md #29012 * Update CHANGELOG.md #28485 * Update CHANGELOG.md for #29094 * Update CHANGELOG.md #29107 * Update CHANGELOG.md #28368 * Update for #29113 #28884 #28739 #28920 #29018 #28822 #28977 #29096 #29040 * Update for #29088 * Update CHANGELOG.md #29079 * Update CHANGELOG.md #28992 * prep for release --------- Co-authored-by: sreallymatt <106555974+sreallymatt@users.noreply.github.com> Co-authored-by: Wyatt Fry <wyattfry@gmail.com> Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com> Co-authored-by: Matthew Frahry <mbfrahry@gmail.com> Co-authored-by: stephybun <steph@hashicorp.com> Co-authored-by: jackofallops <ste@hashicorp.com>
|
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. |
Fix plugin crash when
key_vault_key_idis nil, fix #28357.