Skip to content

Commit

Permalink
Refractor terraform file structure and make it more modulaized and fl…
Browse files Browse the repository at this point in the history
…exiable; add script to upload .env to s3 bucket; update task-definition.json template
  • Loading branch information
DanielLin9406 committed Nov 22, 2020
1 parent 6d20841 commit 5eafc1f
Show file tree
Hide file tree
Showing 62 changed files with 898 additions and 692 deletions.
9 changes: 0 additions & 9 deletions internal/ecs-terraform/autoscaling-group.tf

This file was deleted.

17 changes: 0 additions & 17 deletions internal/ecs-terraform/cluster.tf

This file was deleted.

30 changes: 0 additions & 30 deletions internal/ecs-terraform/iam-instance-role.tf

This file was deleted.

21 changes: 0 additions & 21 deletions internal/ecs-terraform/iam-service-role.tf

This file was deleted.

24 changes: 0 additions & 24 deletions internal/ecs-terraform/launch-configuation.tf

This file was deleted.

42 changes: 0 additions & 42 deletions internal/ecs-terraform/load-balancer.tf

This file was deleted.

31 changes: 0 additions & 31 deletions internal/ecs-terraform/main.tf

This file was deleted.

4 changes: 0 additions & 4 deletions internal/ecs-terraform/output.tf

This file was deleted.

12 changes: 0 additions & 12 deletions internal/ecs-terraform/terraform.tfvars

This file was deleted.

59 changes: 0 additions & 59 deletions internal/ecs-terraform/variables.tf

This file was deleted.

97 changes: 0 additions & 97 deletions internal/ecs-terraform/vpc.tf

This file was deleted.

10 changes: 10 additions & 0 deletions scripts/upload-env-to-s3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

ecs_env_s3_bucket_name='price-dashboard-ecs-env'

project_path=$(dirname "$PWD")
s3_bucket_name_url="s3://$ecs_env_s3_bucket_name"

for i in `ls $project_path/services/*/.env` ;do
aws s3 cp $i $s3_bucket_name_url/${i##*services/}
done
Loading

0 comments on commit 5eafc1f

Please sign in to comment.