- Creates a new VPC using 10.0.x.0/24 addresses in three different AZs
- Creates a new EC2 instance inside this VPC
- Creates a SG attached to the EC2 instance which only allows incoming SSH traffic.
- Creates an S3 bucket
- Every resource has Name = 'Flugel' and Owner = 'InfraTeam' tag names.
- Terratest script included
- Github Actions flow definition, plus previous linting and testing.
- Only AWS cloud is supported.
- VPC named 'VPC_IC' in us-east-1
- EC2 instance inside us-east-1a AZ
- S3 bucket named challenge.interview.flugel.it
- Install Terraform. It's just a binary, you leave it anywhere under the PATH variable.
- Configure AWS credentials in ~/.aws/ or export
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
environment variables. - Configure settings in the variables.tf file (region, AZs, bucket name, etc.). Check if Terratest test module must be adjusted afterwards.
- Configure TF Cloud in the backend.tf file (optional)
terraform init
initializes the aws directory, installing all necessary plugins.terraform plan
syncsterraform.tfstate
file (or TF Cloud state) against actual cloud state, shows the changes needed to make to the cloud (but doesn't do anything).terraform apply
applies the planned changes to the cloud.- When you're done, run
terraform destroy
.
- Install Golang and make sure this code is checked out into your
GOPATH
. cd test
dep ensure
go test -v -run TestInterviewChallenge