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_app_configuration_key is broken in 3.59.0 #22061

Closed
1 task done
mathewpeterson opened this issue Jun 6, 2023 · 1 comment · Fixed by #22072
Closed
1 task done

azurerm_app_configuration_key is broken in 3.59.0 #22061

mathewpeterson opened this issue Jun 6, 2023 · 1 comment · Fixed by #22072

Comments

@mathewpeterson
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.4.6

AzureRM Provider Version

3.59.0

Affected Resource(s)/Data Source(s)

azurerm_app_configuration_key

Terraform Configuration Files

terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "3.59.0"
    }
  }
}

provider "azurerm" {
  features {}

  subscription_id = "00000000-0000-0000-0000-000000000000"
}

data "azurerm_client_config" "current" {}

resource "azurerm_resource_group" "test" {
  name     = "mathewpeterson-test-rg"
  location = "northcentralus"
}

resource "azurerm_app_configuration" "test" {
  name                = "mathewpeterson-test-appcs"
  resource_group_name = azurerm_resource_group.test.name
  location            = azurerm_resource_group.test.location
  sku                 = "standard"

  identity {
    type = "SystemAssigned"
  }
}

resource "azurerm_role_assignment" "app_config_ra_current_client" {
  scope                = azurerm_app_configuration.test.id
  role_definition_name = "App Configuration Data Owner"
  principal_id         = data.azurerm_client_config.current.object_id
}

resource "azurerm_app_configuration_key" "key" {

  configuration_store_id = azurerm_app_configuration.test.id

  label = "test"
  key   = "test-key"
  value = "test-value"
}

Debug Output/Panic Output

2023-06-06T11:53:52.328-0500 [WARN]  Provider "registry.terraform.io/hashicorp/azurerm" produced an unexpected new value for azurerm_app_configuration_key.keys["TECHDOCS_CONTAINER_NAME"] during refresh.
      - .tags: was null, but now cty.MapValEmpty(cty.String)
      - .configuration_store_id: was cty.StringVal("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ms-backstage-snd-rg/providers/Microsoft.AppConfiguration/configurationStores/ms-backstage-snd-appcs"), but now cty.StringVal("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/<RESOURCE GROUP THAT IS COMPLETELY UNRELATED>-core-rg/providers/Microsoft.AppConfiguration/configurationStores/<APP CONFIG THAT IS COMPLETELY UNRELATED>")
2023-06-06T11:53:52.330-0500 [WARN]  Provider "registry.terraform.io/hashicorp/azurerm" produced an invalid plan for azurerm_app_configuration_key.keys["TECHDOCS_CONTAINER_NAME"], but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .vault_key_reference: planned value cty.StringVal("") for a non-computed attribute
      - .locked: planned value cty.False for a non-computed attribute
      - .tags: planned value cty.MapValEmpty(cty.String) for a non-computed attribute
      - .type: planned value cty.StringVal("kv") for a non-computed attribute
2023-06-06T11:53:52.332-0500 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-06-06T11:53:52.336-0500 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/azurerm/3.59.0/darwin_arm64/terraform-provider-azurerm_v3.59.0_x5 pid=46972
2023-06-06T11:53:52.336-0500 [DEBUG] provider: plugin exited

Expected Behaviour

The provider to show the correct resource

Actual Behaviour

The provider shows a completely unrelated configuration_store_id in a unrelated resource group in the same subscription.

Steps to Reproduce

Note: I am unable to reproduce using the issue using the above Terraform however, I am able to reproduce using our in-house Terraform. I will continue to try and reproduce the issue.

  1. Provision resources using provider version <=3.58.0
  2. Upgrade provider to version =3.59.0
  3. Run terraform plan

Important Factoids

No response

References

No response

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 May 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants