Change module to create a single dual-nic NAT
1 unresolved thread
1 unresolved thread
Adding support for both multiple single-nic NATs and a single dual-nic NATs at once was going to be more trouble than it was worth.
This changes the module to provide a single NAT (in a managed instance group) that has two network interfaces:
- Shared VPC network
- cluster network
Requires:
- Cluster IP address (should probably be created with a
google_compute_address
resource - Shared VPC Project ID
- Shared VPC Subnetwork (like 'uis-moodle-dev')
See https://gitlab.developers.cam.ac.uk/uis/moodle/moodle-cloud/deployment/-/issues/72 for its use.
Closes: #2 (closed)
Dynamically gets interface names so... closes: #1 (closed)
Merge request reports
Activity
Filter activity
changed milestone to %Sprint 99
1 # Instance template to create NAT(s) 2 # See https://cloud.google.com/vpc/docs/special-configurations#multiple-natgateways for more information 3 resource "google_compute_instance_template" "nat" { 4 count = var.size 1 # Instance template to create a NAT VM with two network interfaces 5 2 6 project = var.project 7 name = "${var.nat_name}-${count.index + 1}" 3 resource "google_compute_instance_template" "nat" { 4 project = var.project 5 name_prefix = "${var.name}-" Looking at this https://www.terraform.io/docs/providers/google/r/compute_instance_template.html
Do we need to add the
lifecycle { create_before_destroy = true }
Bit to this?
mentioned in commit 1d8f9431
Please register or sign in to reply