hashicorp / terraform-provider-vault

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

[New Data Source]: `vault_generic_endpoint` data source equivalent of the resource #2076

Open HenriBlacksmith opened 10 months ago

HenriBlacksmith commented 10 months ago

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

Would you like to implement a fix?

No