Example 1937

Terraform Resource

Infrastructure as code resource definition.

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

# Compute
instance: {
ami: "ami-a907da9d"
type: "t3.micro"
key_name: "testing-key"
monitoring: true
root_volume: {
size: 20
type: "gp3"
encrypted: true
}
}

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

See also