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

"Error: while checking for key's "" existence: appconfiguration.BaseClient#GetKeyValue: Failure responding to request: StatusCode=400" when upgrading from 3.35.0 to 3.36.0 #19748

Closed
1 task done
Etiennepicard opened this issue Dec 20, 2022 · 3 comments

Comments

@Etiennepicard
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.3.6

AzureRM Provider Version

3.36.0

Affected Resource(s)/Data Source(s)

azurerm_app_configuration_key

Terraform Configuration Files

resource "azurerm_role_assignment" "app-id-AppConfigurationDataReader-config-appcs" {
  principal_id         = var.app_principal_id
  role_definition_name = "App Configuration Data Reader"
  scope                = var.azure_app_configuration_id
}


resource "azurerm_key_vault_access_policy" "app-keyvault-access" {
  key_vault_id = var.azure_keyvault_id
  tenant_id    = var.tenant_id
  object_id    = var.app_principal_id

  key_permissions = var.have_key_permission_on_keyvault ? [
    "Get",
    "UnwrapKey",
    "WrapKey",
  ] : []

  secret_permissions = [
    "Get"
  ]
}

resource "azurerm_app_configuration_key" "app_kv_configs" {
  for_each = var.kv_configs

  configuration_store_id = var.azure_app_configuration_id

  type         = "kv"
  content_type = ""
  key          = "${var.config_key_prefix}:${each.key}"
  value        = each.value
}

resource "azurerm_app_configuration_key" "app_vault_configs" {
  for_each = var.vault_configs

  configuration_store_id = var.azure_app_configuration_id

  type                = "vault"
  key                 = "${var.config_key_prefix}:${each.key}"
  vault_key_reference = each.value
}

Debug Output/Panic Output

│ Error: while checking for key's "" existence: appconfiguration.BaseClient#GetKeyValue: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: error response cannot be parsed: {"" '\x00' '\x00'} error: EOF

│   with module.app-render-config.azurerm_app_configuration_key.app_vault_configs["CustomerSupportToken:PrimarySecret"],
│   on ..\modules\app_config\config.tf line 35, in resource "azurerm_app_configuration_key" "app_vault_configs":
│   35: resource "azurerm_app_configuration_key" "app_vault_configs" {

│ while checking for key's "" existence: appconfiguration.BaseClient#GetKeyValue: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: error response cannot be parsed: {"" '\x00' '\x00'}  
│ error: EOF

Expected Behaviour

Not to crash

Actual Behaviour

Crash

Steps to Reproduce

Update the hashicorp/azurerm provider from 3.35.0
terraform init -upgrade
terraform plan

Important Factoids

No response

References

No response

@github-actions github-actions bot removed the bug label Dec 20, 2022
@ziyeqf
Copy link
Contributor

ziyeqf commented Dec 21, 2022

Hi @Etiennepicard, thanks for reporting.

there is an existing issue(#19711) for it and fixed in #19722. the fix pr has been merged and will be released in v3.37 soon, you can subscribe it to get notification. Please use v3.35 for now.

For any questions please leave comments

@mybayern1974
Copy link
Collaborator

Close for duplicate

@github-actions
Copy link

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 have found a problem that seems similar to this, 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 Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants