Terraform AWS — VPC Segura
IaC · provider aws ~> 5.0 · state remoto S3
🌐
INTERNET
VPC — 10.0.0.0/16
us-east-1a
PUBLIC
10.0.1.0/24
PRIVATE
10.0.10.0/24
us-east-1b
PUBLIC
10.0.2.0/24
PRIVATE
10.0.20.0/24
🚪
igw
Internet Gateway
ATTACHED
🔑
bastion
t3.nano · public
SSH
🔄
nat-gw
NAT Gateway
ACTIVE
⚖️
alb
Application Load Balancer
HTTP :80
💻
web-01
t3.micro · Nginx
PENDING
💻
web-02
t3.micro · Nginx
PENDING
🗄️
mysql
db.t3.micro · MySQL 8
PENDING
📦 S3 Backend
bucket: fxshell-tf-state
key: vpc/terraform.tfstate
encrypt: true
$ terraform apply -auto-approve
Plan: 24 to add, 0 to change, 0 to destroy.
aws_vpc.main: Creating... → Created [id=vpc-0a1b2c3d]
aws_subnet.public[0/1]: Creating... → Created
aws_lb.main: Creating... → Created [dns=fxshell-alb-123.us-east-1.elb.amazonaws.com]
Apply complete! Resources: 24 added, 0 changed, 0 destroyed.
fxshell | terraform-aws-vpc