vault_consul_secret_backend_role

Manages a Consul secrets role for a Consul secrets engine in Vault. Consul secret backends can then issue Consul tokens.

Example Usage

resource "vault_consul_secret_backend" "test" {
  path        = "consul"
  description = "Manages the Consul backend"

  address = "127.0.0.1:8500"
  token   = "4240861b-ce3d-8530-115a-521ff070dd29"
}

resource "vault_consul_secret_backend_role" "example" {
  name    = "test-role"
  backend = vault_consul_secret_backend.test.path

  consul_policies = [
    "example-policy",
  ]
}

Argument Reference

The following arguments are supported:

Attributes Reference

No additional attributes are exported by this resource.

Import

Consul secret backend roles can be imported using the backend, /roles/, and the name e.g.

$ terraform import vault_consul_secret_backend_role.example consul/roles/my-role

Note About Required Arguments

At least one of the four arguments consul_policies, consul_roles, service_identities, or node_identities is required for a token. If desired, any combination of the four arguments up-to and including all four, is valid.