Environment variables in the agent configuration
Adjust agent configuration (AgentConfig.yaml)
If you prefer to pass your secrets with environment variables, that's no problem.
Instead of your secret, specify the name of an environment variable in the corresponding field.
${env:VARIABLE_NAME}
When you have created your configuration then. It should look something like this.
type: AWS agentToken: 12:72211049-cfbc-4ba7-9f45-7139a14e302b accessKey: ${env:ACCESS_KEY} secretAccessKey: ${env:SECRET_ACCESS_KEY} region: eu-central-1 stage: test
Adjust the agent (docker-compose.yml)
Now you just need to tell Docker to forward the environment variables. To do this, add the following for each environment variable.
VARIABLE_NAME=${VARIABLE_NAME}
The docker-compose file should look something like this.
version: '3.3' services: controlplane-agent-aws: image: apiida/controlplane-agent container_name: controlplane-agent-aws environment: - 'ACCESS_KEY=${ACCESS_KEY}' - 'SECRET_ACCESS_KEY=${SECRET_ACCESS_KEY}' - 'backendUrl=wss://myfirsttenant.dev.localhost:8080' - 'gateway-config=/workspace/awsConfig.yaml' volumes: - ./awsConfig.yaml:/workspace/awsConfig.yaml:rw