Example 9429

Terraform Resource

Infrastructure as code resource definition.

{
provider: "google"
region: "us-east-1"
resources: {
# Network
vpc: {
cidr_block: "10.232.0.0/16"
enable_dns: true
tags: {
Name: "hose-vpc"
Environment: "staging"
}
}

# Compute
instance: {
ami: "ami-feb0e318"
type: "t3.small"
key_name: "alb-key"
monitoring: true
root_volume: {
size: 20
type: "gp3"
encrypted: true
}
}

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

See also