hashicorp / terraform-provider-vault

Terraform Vault provider
https://www.terraform.io/docs/providers/vault/
Mozilla Public License 2.0
459 stars 540 forks source link

[Enhancement]: vault_azure_secret_backend support listing_visibility attribute #2223

Open crusstu opened 5 months ago

crusstu commented 5 months ago

Description

The vault_azure_secret_backend resource does not have support for any of the mount configuration options supported by the Vault API, and in particular does not support listing_visibility so there is no way to make the engine visible in the UI through the provider.

Further, even if the more generic vault_mount resource had support for listing_visibility (as of writing this attribute is not currently supported, see #1303), it is not possible to combine vault_mount with vault_azure_secret_backend targeting the same path because vault_azure_secret_backend is not able to update existing engine configurations (unlike e.g., vault_kv_secret_backend_v2)

It looks like the implementation already constructs the required api.MountConfigInput object, but none of the attributes are exposed on the Terraform side:

https://github.com/hashicorp/terraform-provider-vault/blob/f69304303bddaf4f7a6b34428d03557e38d2e4d1/vault/resource_azure_secret_backend.go#L109-L112

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

resource "vault_azure_secret_backend" "azure" {
  path = "azure"

  tenant_id = "00000000-0000-0000-0000-000000000000"
  subscription_id = "00000000-0000-0000-0000-000000000000"
  client_id = "00000000-0000-0000-0000-000000000000"
  client_secret = "00000000-0000-0000-0000-000000000000"

  # new!
  listing_visibility = "unauth"
}

References

Would you like to implement a fix?

None