Example 8627

Terraform Resource

Infrastructure as code resource definition.

{
provider: "google"
region: "eu-west-1"
resources: {
# Network
vpc: {
cidr_block: "10.243.0.0/16"
enable_dns: true
tags: {
Name: "worth-vpc"
Environment: "production"
}
}

# Compute
instance: {
ami: "ami-06ecd3e5"
type: "t3.medium"
key_name: "populist-key"
monitoring: true
root_volume: {
size: 100
type: "gp2"
encrypted: true
}
}

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

See also