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_key_vault_secret unexpected applicationinsights secret value changes in plan since 3.98.0 #25580

Closed
1 task done
hutstep opened this issue Apr 11, 2024 · 2 comments
Closed
1 task done

Comments

@hutstep
Copy link

hutstep commented Apr 11, 2024

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 and review the contribution guide to help.

Terraform Version

1.8.0

AzureRM Provider Version

3.98.0

Affected Resource(s)/Data Source(s)

azurerm_key_vault_secret, azurerm_application_insights

Terraform Configuration Files

variable "apis" {
  type        = map(map(string))
  description = "Defines the list of APIs to be deployed"
}

resource "azurerm_application_insights" "appinsights" {
  for_each             = var.apis
  name                 = each.value.qs_deploy ? "${var.prefix}-qs-${trimsuffix(each.key, "-qs")}-appinsights" : "${var.prefix}-${each.key}-appinsights"
  location             = each.value.qs_deploy ? azurerm_resource_group.env["${var.prefix}-qs"].location : azurerm_resource_group.env[var.prefix].location
  resource_group_name  = each.value.qs_deploy ? azurerm_resource_group.env["${var.prefix}-qs"].name : azurerm_resource_group.env[var.prefix].name
  application_type     = "web"
  daily_data_cap_in_gb = each.value.appinsights_daily_cap
  retention_in_days    = each.value.appinsights_retention_days
  sampling_percentage  = "100"
  workspace_id         = azurerm_log_analytics_workspace.aks.id

  tags = local.common_tags
}

resource "azurerm_key_vault_secret" "appinsights-api-id" {
  depends_on   = [azurerm_key_vault_access_policy.shared-sp]
  for_each     = var.apis
  name         = each.value.qs_deploy ? "${var.prefix}-qs-${trimsuffix(each.key, "-qs")}-appinsights-app-id" : "${var.prefix}-${each.key}-appinsights-app-id"
  value        = azurerm_application_insights.appinsights[each.key].app_id
  key_vault_id = azurerm_key_vault.shared.id

  tags = local.common_tags
}

Debug Output/Panic Output

N/A

Expected Behaviour

No changes

Actual Behaviour

Since 3.98.0 terraform plan shows changes to app insights secret values. This is not happening with 3.97.1 and before. There are no changes to azurerm_application_insights resources in the plan, only changes to the secrets.
Monosnap Pipelines - Run 20240411 11 logs 2024-04-11 11-33-06

Steps to Reproduce

No response

Important Factoids

No response

References

Could be related to #25376

@stephybun
Copy link
Member

Duplicate of #25519

@stephybun stephybun marked this as a duplicate of #25519 Apr 11, 2024
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 12, 2024
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

2 participants