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 application_gateway is planning to add UserAssigned Managed Identity on every plan, even though it is already in the state #18067

Open
1 task done
darlinoo opened this issue Aug 22, 2022 · 0 comments

Comments

@darlinoo
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.2.4

AzureRM Provider Version

2.96.0

Affected Resource(s)/Data Source(s)

azurerm_application_gateway

Terraform Configuration Files

resource "azurerm_resource_group" "rg" {
  name     = "rg-name}"
  location = var.location
}

resource "azurerm_user_assigned_identity" "id" {
  name                = "id-name"
  resource_group_name = azurerm_resource_group.rg.name
  location            = var.location
}

resource "azurerm_application_gateway" "application_gateway" {
  name                = "agw-name"
  resource_group_name = azurerm_resource_group.rg.name
  location            = var.location

  identity {
    type         = "UserAssigned"
    identity_ids = [azurerm_user_assigned_identity.id.id]
  }

Debug Output/Panic Output

# module.application_gateway.azurerm_application_gateway.application_gateway will be updated in-place
  ~ resource "azurerm_application_gateway" "application_gateway" {

      + identity {
          + identity_ids = [
              + "/subscriptions/xxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxxxxx/providers/Microsoft.ManagedIdentity/userAssignedIdentities/xxxxxxxxxx",
            ]
          + type         = "UserAssigned"
        }

Expected Behaviour

Once the Configuration is applied and you plan again Terraform should say: No changes. Your infrastructure matches the configuration

Actual Behaviour

Terraform says it needs to add the identity as seen above in the Debug Output

Steps to Reproduce

  1. terraform apply
  2. terraform plan

Important Factoids

No response

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants