- Created a terraform configuration file that can to setup all the networking resources.
- Terraform configuration files is designed to create multiple VPCs including all of it resources such as subnets, internet gateway, route table, etc.
- Terraform apply will launch latest instance, create RDS instance, create and attach all policies related to S3 bucket and S3 user.
- Terraform template should add/update the DNS record.
- Secured Application Endpoints
Environment variables/Github Secrets
region
availabilityZone
subnetCIDRblock
vpcCIDRblock
destinationCIDRblock
vpc_name
ingressCIDRblock
egressCIDRblock
rdsDBName
rdsUsername
rdsPassword
rdsInstanceIdentifier
engine_version
instance_type
my_key
ec2_root_volume_size
ec2_root_volume_type
image_id
dynamo_tablename
policy_WebAppS3
iamrole
dev_owner
domainName
routeprofile
Command for building terraform
terraform validate -var-file="sensitive.tfvars"
terraform apply -var-file="sensitive.tfvars"
terraform destroy
Terraform workspaces
- Teraaform workdspaces used to create muliple network resources using same configuration files.
- terraform workspace [options] [args]
terraform workspace
to check all commands.terraform workspace new [NAME]
to create new workspace.- Use apply command in newly created workspace.
terraform workspace show
to check current workspace.terraform workspace select [NAME]
to switch between workspaces.
Download Terraform