Reads the Role ID of an AppRole from a Vault server.
data "vault_approle_auth_backend_role_id" "role" {
backend = "my-approle-backend"
role_name = "my-role"
}
output "role-id" {
value = data.vault_approle_auth_backend_role_id.role.role_id
}
The following arguments are supported:
namespace
- (Optional) The namespace of the target resource.
The value should not contain leading or trailing forward slashes.
The namespace
is always relative to the provider's configured namespace.
Available only for Vault Enterprise.
role_name
- (Required) The name of the role to retrieve the Role ID for.
backend
- (Optional) The unique name for the AppRole backend the role to
retrieve a RoleID for resides in. Defaults to "approle".
In addition to the above arguments, the following attributes are exported:
role_id
- The RoleID of the role.