Skip to content

feat: support secrets in render task definition #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ To insert the image URI `amazon/amazon-ecs-sample:latest` as the image for the `
container-name: web
image: amazon/amazon-ecs-sample:latest
environment-variables: "LOG_LEVEL=info"
secrets: "SECRET_KEY=arn:aws:ssm:region:0123456789:parameter/secret"

- name: Deploy to Amazon ECS service
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
Expand Down Expand Up @@ -59,6 +60,9 @@ input of the second:
docker-labels: |
SERVICE=service
VERSION=version
secrets: |
SECRET_KEY=arn:aws:ssm:region:0123456789:parameter/secret
SECOND_SECRET_KEY=arn:aws:secretsmanager:us-east-1:0123456789:secret:secretName

- name: Modify Amazon ECS task definition with second container
id: render-app-container
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ inputs:
env-files:
description: 'S3 object arns to set env variables onto the container. You can specify multiple files with multi-line YAML strings.'
required: false
secrets:
description: 'Secrets to add to the container. Each secret is of the form KEY=valueFrom, where valueFrom is a secret arn. You can specify multiple secrets with multi-line YAML strings.'
required: false
outputs:
task-definition:
description: 'The path to the rendered task definition file'
Expand Down
Loading
Loading