-
modules/front-layer
- security-group
- auto-scaling-group
- launch-configuration
- elastic-load-balancing
- node.tf
-
Get variable for main.tf
- variables
-
Install awscli
python --version
pip --version
pip install awscli --upgrade --user
- Need to create IAM User (Access & Secret Key) with Right Permission
- Terraform will use this IAM User to create AWS infrastructure
aws configure --profile example
AWS Access Key ID:
AWS Secret Access Key:
Default region name:
Default output format: None
- Edit ~/.aws/config, Add following profile for cross account access
[profile example]
region = ap-southeast-1
role_arn = arn:aws:iam::045678323111:role/CrossAccountAccessRole
source_profile = example
- Init terraform
cd terraform-lab
terraform init
- Setup var and run
terraform workspace select example
terraform apply
cd terraform-lab
terraform destroy