Thank you for contributing to this project!
Consul ACL Rules
peering type added.
More details about each resource type: https://developer.hashicorp.com/consul/docs/security/acl/acl-rules#overview
This PR is to add a new 'datacenters' property to consul_policy type thus allowing to create policies that are valid on specific datacenters only.
this aims to solve #407.
I'm open to any improvements you'd like to have for this.
Could test it only on Ubuntu and Debian, thus set
$bash_completion only there on true.
If the user uses a package installation (like we do) he has to adjust
$bin_dir, depending on what package he uses. The package from HashiCorp (which we use) does not include bash completion.
this change replaces the usage of the token query paramter with the HTTP header X-Consul-Token when interacting with ACLs, key/values and prepared queries.
The header was introduced in Consul 0.6.0.
The change is necessary as the token query parameter is marked deprecated in Consul 1.15.x. Using it triggers deprecation warnings in the Consul logs each time this module runs on a server.
Jan 26 10:44:11 consul03 consul: agent.http: This request used the token query parameter which is deprecated and will be removed in Consul 1.17: logUrl=/v1/query?token=
Luckily it was not removed yet so there is still time to fix it.
I've tested the changes with our internal Puppet module in Vagrant.
This pull request was created by my best knowladge. I'm working as system administrator and have no ruby expertise but got some help from colleagues in our company. Thus said I'm open for any suggestion to improve this.
Thanks in advance!