microsoft / cobalt

Infrastructure turn-key solution for app service workloads
MIT License
116 stars 78 forks source link

Do not KV delete access policies on incremental deployments #332

Closed nmiodice closed 4 years ago

nmiodice commented 4 years ago

All Submissions:


What is the current behavior?


KV access policies are deleted and re-created after the initial TF apply. Issue Number: https://github.com/microsoft/cobalt/issues/294

What is the new behavior?


KV access policies are created once and need not be updated.

Does this introduce a breaking change?


Any relevant logs, error output, etc?


New plan does NOT contain statements about recreating KV access policies. I.E., the following is now omitted from the output of terraform plan

  + resource "azurerm_key_vault_access_policy" "keyvault" {
      + certificate_permissions = [
          + "create",
          + "delete",
          + "get",
          + "list",
        ]
      + id                      = (known after apply)
      + key_permissions         = [
          + "create",
          + "delete",
          + "get",
        ]
      + key_vault_id            = "..."
      + object_id               = "..."
      + resource_group_name     = (known after apply)
      + secret_permissions      = [
          + "set",
          + "delete",
          + "get",
          + "list",
        ]
      + tenant_id               = "***"
      + vault_name              = (known after apply)
    }
TechnicallyWilliams commented 4 years ago

Looks good so far. Nice catch on the module usage!