Creating an infra using Terraform
As, I already mentioned Terraform introduction earlier on previous page.
Prerequisites
IAM User with required ec2 policy
aws cli
terraform installed
Also the terraform installation part.
Terraform installationHere is the terraform code which can be used to create an infra.
Clone the repo and use it
git clone https://github.com/whoami-anoint/wazu/
cd terraform/infra-templates/prod-minimal/
terraform validate
terraform init
terraform plan
terraform apply -auto-approveIn case you want to destroy the infra, use the given command
terraform destroy -auto-approveLet's check the validity of our terraform code:

The configuration is valid.
Pending issue on this challenge.
As I am using the organizational aws labs for learning purpose, I do have no access for this policy to create ec2 from iam users (aws cli) on this terraform. But we can try with any other account as we can see our code is valid too.

Last updated