terraform-azurerm-caf icon indicating copy to clipboard operation
terraform-azurerm-caf copied to clipboard

Bug api_management_custom_domain keyvault_id

Open schefa opened this issue 2 years ago • 1 comments

In the module for custom domain the syntax is wrong for type (proxy, portal, scm). Keyvault id can't be specified. Therefore a basic configuration like this does not work:

api_management_custom_domain = {
  apimcd1 = {
        api_management = {
          key = "apim"
        }
        proxy = {
          host_name           = "example.com"
          key_vault_id = "https://keyvault.vault.azure.net/secrets/example-cert" 
        }
  }
}

Result (missing key_vault_id):

  + proxy {
      + expiry                       = (known after apply)
      + host_name                    = "example.com"
      + negotiate_client_certificate = false
      + subject                      = (known after apply)
      + thumbprint                   = (known after apply)
    } 

Expected result: + key_vault_id = ...

Conclusion In the module for custom domain maybe use coalesce or remove the nested try.

schefa avatar Mar 09 '22 11:03 schefa

@arnaudlh Is it possible to get this fix (https://github.com/aztfmod/terraform-azurerm-caf/tree/sm-apim_custom_domain) in the next release?

schefa avatar Mar 29 '22 07:03 schefa