Skip to content

Commit

Permalink
Merge pull request #44 from envato/add-region-option
Browse files Browse the repository at this point in the history
Add option to pass region
  • Loading branch information
Patrick Robinson authored Oct 23, 2019
2 parents 4f8957f + f914c16 commit ae21ef7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ The minimum and maximum percentage of tasks that should be maintained during a d

Example: `"0/100"`

### `region` (optional)

The region we deploy the ECS Service to.

## AWS Roles

At a minimum this plugin requires the following AWS permissions to be granted to the agent running this step:
Expand Down
5 changes: 5 additions & 0 deletions hooks/command
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ load_balancer_name=${BUILDKITE_PLUGIN_ECS_DEPLOY_LOAD_BALANCER_NAME:-""}
target_container=${BUILDKITE_PLUGIN_ECS_DEPLOY_TARGET_CONTAINER_NAME:-""}
target_port=${BUILDKITE_PLUGIN_ECS_DEPLOY_TARGET_CONTAINER_PORT:-""}
execution_role=${BUILDKITE_PLUGIN_ECS_DEPLOY_EXECUTION_ROLE:-""}
region=${BUILDKITE_PLUGIN_ECS_DEPLOY_REGION:-""}

if [[ $region != "" ]]; then
AWS_DEFAULT_REGION=${region}
fi

# Resolve any runtime environment variables it has
target_group=$(eval "echo $target_group")
Expand Down

0 comments on commit ae21ef7

Please sign in to comment.