Add an Environment Variable to a Relay and Deploy It
Give the relay the token your application expects, from the Lattice Cloud console, and deploy the change. Fictional sample written for this portfolio: the console and the service are invented.
Before You Start
- You have the Developer role in the project.
- You have the token your application expects in the Authorization header.
Warning: A value is stored encrypted and never shown again after you save it. Keep it in your password manager as well.
Steps
- Open the relay, and then select the Configuration tab
The tab lists every environment variable with the date it was last set. Values other than the target URL are never shown.
- Check the target URL
Select Edit if your application's address has changed. The relay posts every delivery to it.
- Select Add on the empty row, and then enter the name and the value
Choose the environments the value applies to. Reference it in relay.yaml as ${RELAY_TARGET_TOKEN}.
- Select Deploy changes
A changed variable takes effect at the next deployment, not before.
- Check that the deployment is live and the health check passed
The new deployment is at the top of the list. A failed health check keeps the previous deployment serving traffic.
Check Your Work
The deployment shows Live with a passing health check, and the variable's row shows today's date under Last set.