-
Bug
-
Resolution: Timed out
-
Low
-
1
-
Severity 3 - Minor
-
36
-
Issue Summary
While using atlassian/aws-ecs-deploy in the Pipeline step with AWS_OIDC_ROLE_ARN and AWS_DEFAULT_REGION and without specifying the any value for the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY variables, it returns the following error:
bash: <variable name>: unbound variable
Steps to Reproduce
- Define the following variables and assign values to them (Workspace/Repository/Deployment) in the Pipeline
- AWS_DEFAULT_REGION
- AWS_OIDC_ROLE_ARN
- Use the following script in the Pipeline
pipelines: default: - step: name: Test oidc: true script: - set -eou pipefail - pipe: atlassian/aws-ecs-deploy:1.9.0 variables: AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION} AWS_OIDC_ROLE_ARN: ${AWS_ROLE_ARN} CLUSTER_NAME: ${CLUSTER_NAME} SERVICE_NAME: ${BITBUCKET_REPO_SLUG} TASK_DEFINITION: scripts/ecs/${BITBUCKET_REPO_SLUG}-task-def.json FORCE_NEW_DEPLOYMENT: 'true'
- Since the set -eou pipefail command has -u option set, it expects all the variables to have the default values
Expected Results
The Pipeline should be successful without any issues
Actual Results
Since the following variables doesn't have any default value set in the Pipeline, it return with the error:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
Workaround
Specify empty as the default value for the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in the Pipe definition
pipelines: default: - step: name: Test oidc: true script: - set -eou pipefail - pipe: atlassian/aws-ecs-deploy:1.9.0 variables: AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION} AWS_OIDC_ROLE_ARN: ${AWS_ROLE_ARN} CLUSTER_NAME: ${CLUSTER_NAME} SERVICE_NAME: ${BITBUCKET_REPO_SLUG} TASK_DEFINITION: scripts/ecs/${BITBUCKET_REPO_SLUG}-task-def.json FORCE_NEW_DEPLOYMENT: 'true' AWS_ACCESS_KEY_ID: '' AWS_SECRET_ACCESS_KEY: ''