Example 4535

Terraform Resource

Infrastructure as code resource definition.

{
provider: "aws"
region: "eu-west-1"
resources: {
# Network
vpc: {
cidr_block: "10.157.0.0/16"
enable_dns: true
tags: {
Name: "diversity-vpc"
Environment: "staging"
}
}

# Compute
instance: {
ami: "ami-b7f6be0a"
type: "m5.large"
key_name: "euphonium-key"
monitoring: true
root_volume: {
size: 50
type: "io1"
encrypted: true
}
}

# Security
security_group: {
name: "allow-web"
ingress_port: 8080
ingress_cidr: "0.0.0.0/0"
}
}
}

See also