- 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
regionavailabilityZonesubnetCIDRblockvpcCIDRblockdestinationCIDRblockvpc_nameingressCIDRblockegressCIDRblockrdsDBNamerdsUsernamerdsPasswordrdsInstanceIdentifierengine_versioninstance_typemy_keyec2_root_volume_sizeec2_root_volume_typeimage_iddynamo_tablenamepolicy_WebAppS3iamroledev_ownerdomainNamerouteprofile
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 workspaceto check all commands.terraform workspace new [NAME]to create new workspace.- Use apply command in newly created workspace.
terraform workspace showto check current workspace.terraform workspace select [NAME]to switch between workspaces.
Download Terraform