Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new resource consul_acl_token_role_attachment #252

Merged
merged 4 commits into from
May 9, 2021

Conversation

onematchfox
Copy link
Contributor

@onematchfox onematchfox commented Apr 22, 2021

This PR adds a new resource consul_acl_token_role_attachment that operates in the same fashion as the existing consul_acl_token_policy_attachment. This allows for the attachment of service identity policies supported through the consul_acl_role resource to existing tokens.

The biggest use-case for me personally is to attach policy to terminating gateway tokens that have been provisioned externally to the code provisioning the service which wants to make use of the terminating gateway. This can already be achieved using the consul_acl_policy and consul_acl_token_policy_attachment resources. However, the consul_acl_role offers a nice shortcut to creating the service identity policy. This pattern is also recommended in
https://learn.hashicorp.com/tutorials/consul/service-mesh-terminating-gateways?in=consul/developer-mesh:

We suggest you implement this configuration by updating the service identities for the role attached to the
terminating gateway token. Role updates can be done centrally, and you will not need to distribute a new
token.

Copy link
Contributor

@remilapeyre remilapeyre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @onematchfox, thank you for your contribution!

@remilapeyre remilapeyre merged commit 670fbdb into hashicorp:master May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants