From d7eb3c96360e1f3658f8eda5368ad43d97ddfecc Mon Sep 17 00:00:00 2001 From: cdunbar13 <139253655+cdunbar13@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:49:36 -0500 Subject: [PATCH] Promoting nic type experimental changes to master (#233) --- .../slurm_cluster/modules/_instance_template/README_TF.md | 6 +++--- terraform/slurm_cluster/modules/_instance_template/main.tf | 1 + .../slurm_cluster/modules/_instance_template/variables.tf | 1 + .../slurm_cluster/modules/_instance_template/versions.tf | 2 +- .../modules/slurm_instance_template/README_TF.md | 2 +- .../modules/slurm_instance_template/variables.tf | 1 + 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/terraform/slurm_cluster/modules/_instance_template/README_TF.md b/terraform/slurm_cluster/modules/_instance_template/README_TF.md index 8c90591a..10d76d12 100644 --- a/terraform/slurm_cluster/modules/_instance_template/README_TF.md +++ b/terraform/slurm_cluster/modules/_instance_template/README_TF.md @@ -43,8 +43,8 @@ No modules. | Name | Type | |------|------| -| [google_compute_instance_template.tpl](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance_template) | resource | -| [google_project.this](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/project) | data source | +| [google_compute_instance_template.tpl](https://registry.terraform.io/providers/hashicorp/google-beta/latest/docs/resources/compute_instance_template) | resource | +| [google_project.this](https://registry.terraform.io/providers/hashicorp/google-beta/latest/docs/data-sources/project) | data source | ## Inputs @@ -52,7 +52,7 @@ No modules. |------|-------------|------|---------|:--------:| | [access\_config](#input\_access\_config) | Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet. |
list(object({| `[]` | no | | [additional\_disks](#input\_additional\_disks) | List of maps of additional disks. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#disk_name |
nat_ip = string
network_tier = string
}))
list(object({| `[]` | no | -| [additional\_networks](#input\_additional\_networks) | Additional network interface details for GCE, if any. |
disk_name = string
device_name = string
auto_delete = bool
boot = bool
disk_size_gb = number
disk_type = string
disk_labels = map(string)
}))
list(object({| `[]` | no | +| [additional\_networks](#input\_additional\_networks) | Additional network interface details for GCE, if any. |
network = string
subnetwork = string
subnetwork_project = string
network_ip = string
access_config = list(object({
nat_ip = string
network_tier = string
}))
ipv6_access_config = list(object({
network_tier = string
}))
}))
list(object({| `[]` | no | | [alias\_ip\_range](#input\_alias\_ip\_range) | An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
network = string
subnetwork = string
subnetwork_project = string
network_ip = string
nic_type = string
access_config = list(object({
nat_ip = string
network_tier = string
}))
ipv6_access_config = list(object({
network_tier = string
}))
}))
object({| `null` | no | | [auto\_delete](#input\_auto\_delete) | Whether or not the boot disk should be auto-deleted | `string` | `"true"` | no | | [automatic\_restart](#input\_automatic\_restart) | (Optional) Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). | `bool` | `true` | no | diff --git a/terraform/slurm_cluster/modules/_instance_template/main.tf b/terraform/slurm_cluster/modules/_instance_template/main.tf index 5d7842ba..68daa577 100644 --- a/terraform/slurm_cluster/modules/_instance_template/main.tf +++ b/terraform/slurm_cluster/modules/_instance_template/main.tf @@ -145,6 +145,7 @@ resource "google_compute_instance_template" "tpl" { subnetwork = network_interface.value.subnetwork subnetwork_project = network_interface.value.subnetwork_project network_ip = try(coalesce(network_interface.value.network_ip), null) + nic_type = try(coalesce(network_interface.value.nic_type), null) dynamic "access_config" { for_each = network_interface.value.access_config content { diff --git a/terraform/slurm_cluster/modules/_instance_template/variables.tf b/terraform/slurm_cluster/modules/_instance_template/variables.tf index 128305f7..2ae31e8f 100644 --- a/terraform/slurm_cluster/modules/_instance_template/variables.tf +++ b/terraform/slurm_cluster/modules/_instance_template/variables.tf @@ -223,6 +223,7 @@ variable "additional_networks" { subnetwork = string subnetwork_project = string network_ip = string + nic_type = string access_config = list(object({ nat_ip = string network_tier = string diff --git a/terraform/slurm_cluster/modules/_instance_template/versions.tf b/terraform/slurm_cluster/modules/_instance_template/versions.tf index c0e0f29a..ff80c799 100644 --- a/terraform/slurm_cluster/modules/_instance_template/versions.tf +++ b/terraform/slurm_cluster/modules/_instance_template/versions.tf @@ -19,7 +19,7 @@ terraform { required_version = ">=0.13.0" required_providers { google = { - source = "hashicorp/google" + source = "hashicorp/google-beta" version = ">= 3.88" } } diff --git a/terraform/slurm_cluster/modules/slurm_instance_template/README_TF.md b/terraform/slurm_cluster/modules/slurm_instance_template/README_TF.md index 9fef06d3..b91fd281 100644 --- a/terraform/slurm_cluster/modules/slurm_instance_template/README_TF.md +++ b/terraform/slurm_cluster/modules/slurm_instance_template/README_TF.md @@ -47,7 +47,7 @@ limitations under the License. |------|-------------|------|---------|:--------:| | [access\_config](#input\_access\_config) | Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet. |
ip_cidr_range = string
subnetwork_range_name = string
})
list(object({| `[]` | no | | [additional\_disks](#input\_additional\_disks) | List of maps of disks. |
nat_ip = string
network_tier = string
}))
list(object({| `[]` | no | -| [additional\_networks](#input\_additional\_networks) | Additional network interface details for GCE, if any. |
disk_name = string
device_name = string
disk_type = string
disk_size_gb = number
disk_labels = map(string)
auto_delete = bool
boot = bool
}))
list(object({| `[]` | no | +| [additional\_networks](#input\_additional\_networks) | Additional network interface details for GCE, if any. |
network = string
subnetwork = string
subnetwork_project = string
network_ip = string
access_config = list(object({
nat_ip = string
network_tier = string
}))
ipv6_access_config = list(object({
network_tier = string
}))
}))
list(object({| `[]` | no | | [bandwidth\_tier](#input\_bandwidth\_tier) | Tier 1 bandwidth increases the maximum egress bandwidth for VMs.
network = string
subnetwork = string
subnetwork_project = string
network_ip = string
nic_type = string
access_config = list(object({
nat_ip = string
network_tier = string
}))
ipv6_access_config = list(object({
network_tier = string
}))
}))