AWS Fundamentals Logo
AWS Fundamentals
Resource

aws_ec2_secondary_subnet

Manages an Ec2 Secondary Subnet resource.

View Full Documentation on Terraform Registry

Sample HCL Configuration

A minimal configuration to get started. Refer to the Terraform Registry docs for all available arguments.

main.tf
resource "aws_ec2_secondary_subnet" "example" {
  # Required arguments
  vpc_id     = aws_vpc.example.id
  cidr_block = "10.0.1.0/24"
}

Get the EC2 (Elastic Compute Cloud) Cheat Sheet

Everything you need to know about EC2 (Elastic Compute Cloud) on one page. HD quality, print-friendly.

Download Free Infographic