Skip to content

Commit f72db1b

Browse files
committed
passing stack type variable to instance template modules.
1 parent 53926f5 commit f72db1b

File tree

6 files changed

+6
-2
lines changed

6 files changed

+6
-2
lines changed

community/modules/internal/slurm-gcp/instance/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ resource "google_compute_instance_from_template" "slurm_instance" {
111111
queue_count = nic.value.queue_count
112112
subnetwork = nic.value.subnetwork
113113
subnetwork_project = nic.value.subnetwork_project
114+
stack_type = nic.value.stack_type
114115
}
115116
}
116117

community/modules/internal/slurm-gcp/instance_template/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
|------|-------------|------|---------|:--------:|
3232
| <a name="input_access_config"></a> [access\_config](#input\_access\_config) | Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet. | <pre>list(object({<br/> nat_ip = string<br/> network_tier = string<br/> }))</pre> | `[]` | no |
3333
| <a name="input_additional_disks"></a> [additional\_disks](#input\_additional\_disks) | List of maps of disks. | <pre>list(object({<br/> source = optional(string)<br/> disk_name = optional(string)<br/> device_name = string<br/> disk_type = optional(string)<br/> disk_size_gb = optional(number)<br/> disk_labels = map(string)<br/> auto_delete = bool<br/> boot = bool<br/> disk_resource_manager_tags = optional(map(string))<br/> }))</pre> | `[]` | no |
34-
| <a name="input_additional_networks"></a> [additional\_networks](#input\_additional\_networks) | Additional network interface details for GCE, if any. | <pre>list(object({<br/> network = string<br/> subnetwork = string<br/> subnetwork_project = string<br/> network_ip = string<br/> nic_type = string<br/> access_config = list(object({<br/> nat_ip = string<br/> network_tier = string<br/> }))<br/> ipv6_access_config = list(object({<br/> network_tier = string<br/> }))<br/> }))</pre> | `[]` | no |
34+
| <a name="input_additional_networks"></a> [additional\_networks](#input\_additional\_networks) | Additional network interface details for GCE, if any. | <pre>list(object({<br/> network = string<br/> subnetwork = string<br/> subnetwork_project = string<br/> network_ip = string<br/> nic_type = string<br/> stack_type = optional(string)<br/> access_config = list(object({<br/> nat_ip = string<br/> network_tier = string<br/> }))<br/> ipv6_access_config = list(object({<br/> network_tier = string<br/> }))<br/> }))</pre> | `[]` | no |
3535
| <a name="input_advanced_machine_features"></a> [advanced\_machine\_features](#input\_advanced\_machine\_features) | See https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance_template#nested_advanced_machine_features | <pre>object({<br/> enable_nested_virtualization = optional(bool)<br/> threads_per_core = optional(number)<br/> turbo_mode = optional(string)<br/> visible_core_count = optional(number)<br/> performance_monitoring_unit = optional(string)<br/> enable_uefi_networking = optional(bool)<br/> })</pre> | n/a | yes |
3636
| <a name="input_bandwidth_tier"></a> [bandwidth\_tier](#input\_bandwidth\_tier) | Tier 1 bandwidth increases the maximum egress bandwidth for VMs.<br/>Using the `virtio_enabled` setting will only enable VirtioNet and will not enable TIER\_1.<br/>Using the `tier_1_enabled` setting will enable both gVNIC and TIER\_1 higher bandwidth networking.<br/>Using the `gvnic_enabled` setting will only enable gVNIC and will not enable TIER\_1.<br/>Note that TIER\_1 only works with specific machine families & shapes and must be using an image that supports gVNIC. See [official docs](https://cloud.google.com/compute/docs/networking/configure-vm-with-high-bandwidth-configuration) for more details. | `string` | `"platform_default"` | no |
3737
| <a name="input_can_ip_forward"></a> [can\_ip\_forward](#input\_can\_ip\_forward) | Enable IP forwarding, for NAT instances for example. | `bool` | `false` | no |

community/modules/internal/slurm-gcp/instance_template/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ variable "additional_networks" {
128128
subnetwork_project = string
129129
network_ip = string
130130
nic_type = string
131+
stack_type = optional(string)
131132
access_config = list(object({
132133
nat_ip = string
133134
network_tier = string

community/modules/internal/slurm-gcp/internal_instance_template/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
|------|-------------|------|---------|:--------:|
3434
| <a name="input_access_config"></a> [access\_config](#input\_access\_config) | Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet. | <pre>list(object({<br/> nat_ip = string<br/> network_tier = string<br/> }))</pre> | `[]` | no |
3535
| <a name="input_additional_disks"></a> [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 | <pre>list(object({<br/> source = optional(string)<br/> disk_name = optional(string)<br/> device_name = string<br/> auto_delete = bool<br/> boot = bool<br/> disk_size_gb = optional(number)<br/> disk_type = optional(string)<br/> disk_labels = map(string)<br/> disk_resource_manager_tags = map(string)<br/> }))</pre> | `[]` | no |
36-
| <a name="input_additional_networks"></a> [additional\_networks](#input\_additional\_networks) | Additional network interface details for GCE, if any. | <pre>list(object({<br/> network = string<br/> subnetwork = string<br/> subnetwork_project = string<br/> network_ip = string<br/> nic_type = string<br/> access_config = list(object({<br/> nat_ip = string<br/> network_tier = string<br/> }))<br/> ipv6_access_config = list(object({<br/> network_tier = string<br/> }))<br/> }))</pre> | `[]` | no |
36+
| <a name="input_additional_networks"></a> [additional\_networks](#input\_additional\_networks) | Additional network interface details for GCE, if any. | <pre>list(object({<br/> network = string<br/> subnetwork = string<br/> subnetwork_project = string<br/> network_ip = string<br/> nic_type = string<br/> stack_type = optional(string)<br/> access_config = list(object({<br/> nat_ip = string<br/> network_tier = string<br/> }))<br/> ipv6_access_config = list(object({<br/> network_tier = string<br/> }))<br/> }))</pre> | `[]` | no |
3737
| <a name="input_advanced_machine_features"></a> [advanced\_machine\_features](#input\_advanced\_machine\_features) | See https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance_template#nested_advanced_machine_features | <pre>object({<br/> enable_nested_virtualization = optional(bool)<br/> threads_per_core = optional(number)<br/> turbo_mode = optional(string)<br/> visible_core_count = optional(number)<br/> performance_monitoring_unit = optional(string)<br/> enable_uefi_networking = optional(bool)<br/> })</pre> | n/a | yes |
3838
| <a name="input_alias_ip_range"></a> [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.<br/>ip\_cidr\_range: The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. At the time of writing only a netmask (e.g. /24) may be supplied, with a CIDR format resulting in an API error.<br/>subnetwork\_range\_name: The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used. | <pre>object({<br/> ip_cidr_range = string<br/> subnetwork_range_name = string<br/> })</pre> | `null` | no |
3939
| <a name="input_auto_delete"></a> [auto\_delete](#input\_auto\_delete) | Whether or not the boot disk should be auto-deleted | `string` | `"true"` | no |

community/modules/internal/slurm-gcp/internal_instance_template/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ resource "google_compute_instance_template" "tpl" {
156156
subnetwork_project = network_interface.value.subnetwork_project
157157
network_ip = try(coalesce(network_interface.value.network_ip), null)
158158
nic_type = try(coalesce(network_interface.value.nic_type), null)
159+
stack_type = try(coalesce(network_interface.value.stack_type), null)
159160
dynamic "access_config" {
160161
for_each = network_interface.value.access_config
161162
content {

community/modules/internal/slurm-gcp/internal_instance_template/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ variable "additional_networks" {
250250
subnetwork_project = string
251251
network_ip = string
252252
nic_type = string
253+
stack_type = optional(string)
253254
access_config = list(object({
254255
nat_ip = string
255256
network_tier = string

0 commit comments

Comments
 (0)