tf-gke-test/vpc.tf

20 lines
497 B
Terraform
Raw Normal View History

2023-05-03 14:52:20 +02:00
provider "google" {
project = var.project
region = var.region
}
# VPC
resource "google_compute_network" "vpc" {
name = "${var.project}-vpc"
auto_create_subnetworks = "false"
}
# Subnet
resource "google_compute_subnetwork" "subnet" {
name = "${var.project}-subnet"
region = var.region
network = google_compute_network.vpc.name
ip_cidr_range = "10.10.0.0/24"
private_ip_google_access = true
}