API Token Injection Rules

You can create Deployment Policy rules to control the use of managed tokens. These rules specify which workloads can use the tokens, and on which environments.

Create API Token Injection Rule

  1. In the DEPLOYMENT RULES tab in the POLICIES page, select New API token injection rule.

Step 1 - Properties

  1. Enter a name for the rule.

Step 2 - Workloads

  1. Select the workloads that can use the token from these options:
    • By Name - select workloads by name, from a list
    • By Label - select workloads with specific labels
    • Any - select all workloads

Step 3 - Environments

  1. Select the environments on which the workloads can be deployed, from these options:
    • By Name - select environments by name, from a list
    • By Risk - select the maximum risk that the environment can have
    • Any - select all environments

Step 4 - Tokens

  1. Select a token to inject into the workload, and enter a name for the environment variable that will have the token value. Add tokens as necessary.
  2. Click FINISH to save and enable the rule.

View Token rules in Deployment Policy

API Token injection rules appear in the list of Deployment Policy Rules. You can move them up or down, in the same was as for other rules.


What’s Next