Example 7140

Terraform Resource

Infrastructure as code resource definition.

{
provider: "google"
region: "asia-southeast1"
resources: {
# Network
vpc: {
cidr_block: "10.12.0.0/16"
enable_dns: true
tags: {
Name: "sock-vpc"
Environment: "production"
}
}

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

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

See also