Skip to content

[azure-application] Stop storing client secrets in the state #661

@jalvarezit

Description

@jalvarezit

Description

At the moment there is no possibility to not storing client secrets in the terraform state, currently blocked from this provider issue.

Once is solved from the provider we have to use an ephemeral resource to store the secret in the key vault as well:

resource "azurerm_key_vault_secret" "this" {
count = (var.client_secret.keyvault != null && var.client_secret.enabled) ? 1 : 0
key_vault_id = var.client_secret.keyvault.id
name = var.client_secret.keyvault.key_name
value = azuread_application_password.this[0].value
}

Tasks

  • Use ephemeral resources in both azuread_application_password and azurerm_key_vault_secret
  • Validate secret rotation keeps working as intended

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions