Example 7030
Terraform Resource
Infrastructure as code resource definition.
{
provider: "digitalocean"
region: "us-east-1"
resources: {
# Network
vpc: {
cidr_block: "10.157.0.0/16"
enable_dns: true
tags: {
Name: "premeditation-vpc"
Environment: "staging"
}
}
# Compute
instance: {
ami: "ami-aea9412c"
type: "m5.large"
key_name: "pearl-key"
monitoring: true
root_volume: {
size: 20
type: "gp3"
encrypted: true
}
}
# Security
security_group: {
name: "allow-web"
ingress_port: 8080
ingress_cidr: "0.0.0.0/0"
}
}
}