Repository navigation
3.2.0
New Features:
- It is now possible to extract variables from SecretsManager and save them to a file before the build step. Simply define the SecretsManager ARN in the
APP_SECRET_EXTRACT_ENV_FILEfield in the oni.yaml file and runoni create-env-from-secretscommand, passing the app name, the path to the file to be saved, and the options to assume the role defined in oni.yaml and format the variables.
Example:
In oni.yaml
development:
ECR_AWS_REGION: us-east-2
ECR_AWS_ACCOUNT: '333333333333'
ECR_AWS_ROLE: your-deploy-role
APP_DEFAULT:
APP_NAME: YYYYYYYYYYYYYY
APP_ROLE: your-deploy-role
...
APP_SECRET_EXTRACT_ENV_FILE: arn:aws:secretsmanager:us-east-2:XXXXXX:secret:/ecs/app/dashboard-Tnr8gh
In pipeline:
oni create-env-from-secrets -n APP_DEFAULT -p .env -a -f
This command will create a file named .env and format the values into the standard format for .env files, like:
KEY=VALUE
KEY_2=VALUE_2
Without the -f flag, the variables will be saved in the same format as they were extracted from the SecretsManager.
- It is now also possible to add tags to the task definition for apps in ECS by adding the
APP_TAGSfield in oni.yaml file with the tag keys and values.
Example in oni.yaml:
development:
ECR_AWS_REGION: us-east-2
ECR_AWS_ACCOUNT: '333333333333'
ECR_AWS_ROLE: your-deploy-role
APP_DEFAULT:
APP_NAME: YYYYYYYYYYYYYY
...
APP_TAGS:
MY_CUSTOM_TAG: VALUE