terraform-provider-vault
terraform-provider-vault copied to clipboard
[New Data Source]: `vault_generic_endpoint` data source equivalent of the resource
Description
In order to run some checks agains Vault or to handle endpoints which supports the GET or HEAD verbs and require authentication (or not). It would be interesting to have a vault_generic_endpoint datasource.
In my case I want to check the replication status (Vault Enterprise) of my Vault cluster and run Terraform Checks agains the result.
Potential Terraform Configuration
data "vault_generic_endpoint" "replication_status" {
path = "sys/replication/status"
}
A minimal attribute could be read_data, other data source attributes could be namespace and ignore_fields for instance.
References
- https://registry.terraform.io/providers/hashicorp/vault/latest/docs/resources/generic_endpoint
- https://developer.hashicorp.com/terraform/language/checks
- https://developer.hashicorp.com/vault/api-docs/system/replication#check-status
Would you like to implement a fix?
No