Archive: Convert an AWS CLI script to Terraform (creating an ECS cluster)
Budget
39$
per month
Posted: 5 years ago
Closed
- Description
- We have a script that sets up an AWS ECS cluster (Fargate) as well as building and deploying code to it via a BitBucket Pipeline. The main part of the infrastructure deployment uses AWS CLI.
The task is to turn the AWS CLI into the equivalent Terraform script. Requriements are:
1) Create equivalent functionality aws build that we have using CLI but using Terraform. This is basically an ECS cluster (fargate) with a single task definition. Note that this includes the pre-requisites/dependencies such as IAM roles, Security groups, cluster definition etc
2) Extract variables to seperate .tf file
3) Add tags and names to all resources
4) You will be working in our environment and may be required to update JIRA tickets and join a Whatsapp Chat
5) Your English must be perfect
6) If you're good and you get on with the team, future work will be yours.
Example section from AWS CLI script:
# Create Target Groups (and save the ARN for later (creating an ECS Service))
- aws elbv2 describe-target-groups | grep $TARGET_GROUP_NAME || TARGET_GROUP_ARN=$(aws elbv2 create-target-group
--name $TARGET_GROUP_NAME
--target-type "ip"
--protocol HTTP
--port 8080
--matcher 'HttpCode="200-399"'
--vpc-id $VPC_ID
| jq --raw-output '.TargetGroups[].TargetGroupArn')
- echo "TARGET_GROUP_ARN is:" $TARGET_GROUP_ARN
Skills:
intellectual property,clustering,amazon web services,atlassian bitbucket,atlassian jira,English,extraction,web
- Category