Skip to content

Instantly share code, notes, and snippets.

@rileykarson
Created November 1, 2023 22:19
Show Gist options
  • Save rileykarson/beef76d10ca4c4410b7f6f1f37d2d866 to your computer and use it in GitHub Desktop.
Save rileykarson/beef76d10ca4c4410b7f6f1f37d2d866 to your computer and use it in GitHub Desktop.
terraform {
required_providers {
google-local = {
source = "googleapis.com/google/google-local"
version = ">= 1.0"
}
}
}
variable "project" {
type = string
}
variable "range" {
type = string
}
resource "google_compute_network" "custom-test" {
provider = google-local
project = var.project
name = "tf-test-externalipv6prefix"
auto_create_subnetworks = false
}
resource "google_compute_subnetwork" "subnetwork" {
provider = google-local
project = var.project
name = "tf-test-externalipv6prefix"
ip_cidr_range = "10.0.0.0/16"
region = "us-central1"
network = google_compute_network.custom-test.self_link
stack_type = "IPV4_IPV6"
ipv6_access_type = "EXTERNAL"
external_ipv6_prefix = var.range
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment