Example 7631

Terraform Resource

Infrastructure as code resource definition.

{
provider: "aws"
region: "asia-southeast1"
resources: {
# Network
vpc: {
cidr_block: "10.33.0.0/16"
enable_dns: true
tags: {
Name: "whale-vpc"
Environment: "production"
}
}

# Compute
instance: {
ami: "ami-afcb5ae8"
type: "m5.large"
key_name: "newsstand-key"
monitoring: true
root_volume: {
size: 100
type: "io1"
encrypted: true
}
}

# Security
security_group: {
name: "allow-ssh"
ingress_port: 80
ingress_cidr: "0.0.0.0/0"
}
}
}

See also