Skip to content

Commit 16445dc

Browse files
Update code: install awscli before invoking aws in task
1 parent 753e234 commit 16445dc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

infrastructure/modules/ecs/main.tf

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,17 @@ module "migrate_task" {
159159
module "load_data_task" {
160160
source = "./modules/task"
161161

162-
aws_region = var.aws_region
163-
command = ["/bin/sh", "-c", "aws s3 cp s3://${var.fixtures_s3_bucket}/nest.json.gz /data/nest.json.gz && python manage.py load_data --file /data/nest.json.gz"]
162+
aws_region = var.aws_region
163+
command = [
164+
"/bin/sh",
165+
"-c",
166+
<<-EOT
167+
set -e
168+
pip install --quiet awscli
169+
aws s3 cp s3://${var.fixtures_s3_bucket}/nest.json.gz /tmp/nest.json.gz
170+
python manage.py load_data --file /tmp/nest.json.gz
171+
EOT
172+
]
164173
common_tags = var.common_tags
165174
container_environment = var.django_environment_variables
166175
cpu = var.load_data_task_cpu

0 commit comments

Comments
 (0)