This is a sample project to test the classic load balancer deployment using terraform
Follow below documentation to install awscli on the same node, configure aws cli, and the backend S3 for state & dynamodb for remoter state
Configure terrraform remote state backend, and DynamoDB for state lock
Name | Version |
---|---|
aws | 5.0.1 |
No modules.
Name | Type |
---|---|
aws_elb.clb | resource |
aws_instance.web-1 | resource |
aws_instance.web-2 | resource |
aws_internet_gateway.igw | resource |
aws_route_table.igw-rt | resource |
aws_route_table_association.igw-rt-a | resource |
aws_route_table_association.igw-rt-b | resource |
aws_route_table_association.igw-rt-c | resource |
aws_security_group.web | resource |
aws_subnet.private-1 | resource |
aws_subnet.private-2 | resource |
aws_subnet.private-3 | resource |
aws_subnet.public-1 | resource |
aws_subnet.public-2 | resource |
aws_subnet.public-3 | resource |
aws_vpc.main | resource |
aws_availability_zones.zones | data source |
Please use tfvars file to update the variables
Name | Description | Type | Default | Required |
---|---|---|---|---|
ami | ami | string |
"" |
no |
internet | Internet IP address | string |
"" |
no |
prisub-1 | private subnet 1 CIDR | string |
"" |
no |
prisub-2 | private subnet 2 CIDR | string |
"" |
no |
prisub-3 | private subnet 3 CIDR | string |
"" |
no |
pusub-1 | public subnet 1 CIDR | string |
"" |
no |
pusub-2 | public subnet 2 CIDR | string |
"" |
no |
pusub-3 | public subnet 3 CIDR | string |
"" |
no |
vpc-cidr | CIDR block details for main VPC | string |
"" |
no |
Name | Description |
---|---|
clb | n/a |
Follow the terraform workflow to create the Deployment
to intialise the terrform run
terraform init
to see the terraform plan
terraform plan
to run, apply the configuration
terraform apply --auto-approve
once you have tested, please destroy the infrastructure using
terraform destroy --auto-approve