diff --git a/README.md b/README.md index b58924f..dcca112 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,9 @@ jobs: * `PARAMETER_OVERRIDES` - [Optional]. Parameters to input in the template. * Type: `string | list[string]` * Syntax: `AliasName=prod` `AliasName=prod ApiUrl=https://api.com/api/v1` +* `TAGS` - [Optional]. Tags to assign. + * Type: `string | list[string]` + * Syntax: `Environment=prod` `Name=infrastructure ` ### Examples diff --git a/entrypoint.sh b/entrypoint.sh index 8408548..d9b26b9 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -60,6 +60,10 @@ if [[ ! -z "$PARAMETER_OVERRIDES" ]]; then PARAMETER_OVERRIDES="--parameter-overrides $PARAMETER_OVERRIDES" fi +if [[ ! -z "$TAGS" ]]; then + TAGS="--tags $TAGS" +fi + mkdir ~/.aws touch ~/.aws/credentials touch ~/.aws/config @@ -74,4 +78,4 @@ output = text region = $AWS_REGION" > ~/.aws/config aws cloudformation package --template-file $TEMPLATE --output-template-file serverless-output.yaml --s3-bucket $AWS_DEPLOY_BUCKET $AWS_BUCKET_PREFIX $FORCE_UPLOAD $USE_JSON -aws cloudformation deploy --template-file serverless-output.yaml --stack-name $AWS_STACK_NAME $CAPABILITIES $PARAMETER_OVERRIDES +aws cloudformation deploy --template-file serverless-output.yaml --stack-name $AWS_STACK_NAME $CAPABILITIES $PARAMETER_OVERRIDES $TAGS