Example 12025

Terraform Resource

Infrastructure as code resource definition.

{
provider: "digitalocean"
region: "asia-southeast1"
resources: {
# Network
vpc: {
cidr_block: "10.230.0.0/16"
enable_dns: true
tags: {
Name: "litter-vpc"
Environment: "staging"
}
}

# Compute
instance: {
ami: "ami-ffe07326"
type: "t3.small"
key_name: "chasuble-key"
monitoring: true
root_volume: {
size: 100
type: "gp2"
encrypted: true
}
}

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

See also