The consul_acl_role_policy_attachment
resource links a Consul ACL role and an ACL policy. The link is implemented through an update to the Consul ACL role.
data "consul_acl_role" "my_role" {
name = "my_role"
}
resource "consul_acl_policy" "read_policy" {
name = "read-policy"
rules = "node \"\" { policy = \"read\" }"
datacenters = ["dc1"]
}
resource "consul_acl_role_policy_attachment" "my_role_read_policy" {
role_id = data.consul_acl_role.test.id
policy = consul_acl_policy.read_policy.name
}
policy
(String) The policy name.role_id
(String) The id of the role.id
(String) The ID of this resource.Import is supported using the following syntax:
terraform import consul_acl_role_policy_attachment.my_role_read_policy 624d94ca-bc5c-f960-4e83-0a609cf588be:policy_name