Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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

Set the environment variables in your system

  • No labels