21 lines
557 B
Terraform
21 lines
557 B
Terraform
|
resource "google_compute_network" "vpc_network" {
|
||
|
name = "my-custom-mode-network"
|
||
|
auto_create_subnetworks = false
|
||
|
mtu = 1460
|
||
|
}
|
||
|
|
||
|
resource "google_compute_subnetwork" "default" {
|
||
|
name = "my-custom-subnet"
|
||
|
ip_cidr_range = "10.0.1.0/24"
|
||
|
region = "us-west1"
|
||
|
network = google_compute_network.vpc_network.id
|
||
|
}
|
||
|
|
||
|
resource "google_compute_instance" "default" {
|
||
|
name = "instance-1"
|
||
|
machine_type = "e2-micro"
|
||
|
zone = "us-west1-a"
|
||
|
labels = {
|
||
|
app = "db"
|
||
|
}
|
||
|
}
|