Example 10721

Terraform Resource

Infrastructure as code resource definition.

{
provider: "digitalocean"
region: "eu-west-1"
resources: {
# Network
vpc: {
cidr_block: "10.28.0.0/16"
enable_dns: true
tags: {
Name: "ice-cream-vpc"
Environment: "staging"
}
}

# Compute
instance: {
ami: "ami-e53fa54e"
type: "m5.large"
key_name: "spear-key"
monitoring: true
root_volume: {
size: 50
type: "gp3"
encrypted: true
}
}

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

See also