PARALLAX

consul_binding_rule

Manipulate Consul binding rules

Collection: community.general

Full Name: community.general.consul_binding_rule

Synopsis

Manipulate Consul binding rules

Parameters

NameTypeRequiredDefaultDescription
auth_methodstringyesThe name of the auth method that this rule applies to.
bind_namestringThe name to bind to a token at login-time. What it binds to can be adjusted with different values of the O(bind_type) parameter.
bind_typestringSpecifies the way the binding rule affects a token created at login.
bind_varsdictSpecifies the templated policy variables when O(bind_type) is set to V(templated-policy).
ca_pathstringTarget PEM CA bundle path.
descriptionstringFree form human readable description of the binding rule.
hoststringlocalhostConsul agent hostname.
namestringyesSpecifies a name for the binding rule. Note: This is used to identify the binding rule. But since the API does not support a name, it is prefixed to the description.
portint8500Consul agent HTTP port.
schemestringhttpHTTP or HTTPS protocol.
selectorstringSpecifies the expression used to match this rule against valid identities returned from an auth method validation. If empty this binding rule matches all valid identities returned from the auth method.
statestringpresentWhether the binding rule should be present or absent.
tokenstringConsul ACL token; private argument.
validate_certsbooltrueValidate the server certificate.

Example

yaml
- community.general.consul_binding_rule:
    auth_method: minikube
    bind_name: '{{ serviceaccount.name }}'
    bind_type: service
    description: example rule
    name: my_name
    token: '{{ consul_management_token }}'
  name: Create a binding rule

- community.general.consul_binding_rule:
    auth_method: minikube
    name: my_name
    state: absent
  name: Remove a binding rule
Search
    ↑ ↓ move↵ openesc close