This Terraform code creates a VPC with multiple public and private subnets across multiple availability zones. It also creates internet gateways and route tables to enable the subnets to communicate with each other and to the internet.
- Install Terraform by following the official installation instructions.
- Ensure that you have valid AWS credentials for the account where you wish to deploy the infrastructure.
- Clone the repository and navigate to the root directory.
- Run
terraform init
to initialize the Terraform environment. - Run
terraform plan
to preview the infrastructure changes. - Run
terraform apply
to create the infrastructure.
To delete the infrastructure created by this code, run terraform destroy
after navigating to the root directory.
Command to import the Certificate
aws acm import-certificate --certificate file://certificate.crt --certificate-chain file://CertificateChain.pem --private-key file://Private.key