gcp terraform-3 vpc-nat create

vpc-nat 를 연결하기로 했다. 어젠 subnet 을 만들었고 오늘은 망분리 환경을 구성하기 위해 nat 를 넣었다. main.tf resource “google_compute_subnetwork” “us-central1-subnet” { name = “${local.name_suffix}-us-central1-subnet” ip_cidr_range = “10.2.0.0/16” region = “us-central1” network = “${google_compute_network.vpc.self_link}” } resource “google_compute_router” “us-central1-router” { name = “${local.name_suffix}-us-central1-router” region = google_compute_subnetwork.us-central1-subnet.region network = google_compute_network.vpc.self_link } resource “google_compute_address” “address” { count = 2 name = “${local.name_suffix}-nat-manual-ip-${count.index}” region = google_compute_subnetwork.us-central1-subnet.region } resource “google_compute_router_nat” “nat_manual” { name = “${local.name_suffix}-us-central1-router-nat” router = google_compute_router.us-central1-router.name region = google_compute_router.us-central1-router.region nat_ip_allocate_option = “MANUAL_ONLY” nat_ips = google_compute_address.address.*.self_link ...

January 5, 2020 · 1 min · 📁 GCP · 🏷️ gcp, terraform, nat