Skip to content

Commit 4a9fbbf

Browse files
authored
Fix(subnetwork_project): subnetwork_project was missing from local block in htcondor-execute-point module (#5839)
1 parent e913449 commit 4a9fbbf

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

community/modules/compute/htcondor-execute-point/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ limitations under the License.
249249
| <a name="input_metadata"></a> [metadata](#input\_metadata) | Metadata to add to HTCondor execute points | `map(string)` | `{}` | no |
250250
| <a name="input_min_idle"></a> [min\_idle](#input\_min\_idle) | Minimum number of idle VMs in the HTCondor pool (if pool reaches var.max\_size, this minimum is not guaranteed); set to ensure jobs beginning run more quickly. | `number` | `0` | no |
251251
| <a name="input_name_prefix"></a> [name\_prefix](#input\_name\_prefix) | Name prefix given to hostnames in this group of execute points; must be unique across all instances of this module | `string` | n/a | yes |
252-
| <a name="input_network_interfaces"></a> [network\_interfaces](#input\_network\_interfaces) | A list of network interfaces to attach to HTCondor execute point instances.<br/>Each network interface should have the following fields:<br/>- network (required): The self link of the network<br/>- subnetwork (optional): The self link of the subnetwork<br/>- nic\_type (optional): "GVNIC" or "VIRTIO\_NET"<br/>- stack\_type (optional): "IPV4\_ONLY" or "IPV4\_IPV6"<br/>- network\_ip (optional): Specific IP address to assign<br/>- queue\_count (optional): Queue count for multiqueue NIC<br/>- access\_config (optional): List of NAT config objects<br/>- ipv6\_access\_config (optional): List of IPv6 access config objects<br/>- alias\_ip\_range (optional): List of alias IP ranges<br/><br/>If the list is empty, the module will fall back to using var.network\_self\_link<br/>and var.subnetwork\_self\_link for backward compatibility.<br/><br/>NB: If you update the current setup with network interfaces, you may need to delete the current mig to apply the new network interface configuration | <pre>list(object({<br/> network = string<br/> subnetwork = optional(string)<br/> subnetwork_project = optional(string)<br/> nic_type = optional(string)<br/> stack_type = optional(string)<br/> network_ip = optional(string, "")<br/> queue_count = optional(number)<br/> access_config = optional(list(object({<br/> nat_ip = optional(string)<br/> network_tier = optional(string)<br/> })), [])<br/> ipv6_access_config = optional(list(object({<br/> network_tier = optional(string)<br/> })), [])<br/> alias_ip_range = optional(list(object({<br/> ip_cidr_range = string<br/> subnetwork_range_name = string<br/> })), [])<br/> }))</pre> | `[]` | no |
252+
| <a name="input_network_interfaces"></a> [network\_interfaces](#input\_network\_interfaces) | A list of network interfaces to attach to HTCondor execute point instances.<br/>Each network interface should have the following fields:<br/>- network (required): The self link of the network<br/>- subnetwork (optional): The self link of the subnetwork<br/>- subnetwork\_project (optional): The self link of the subnetwork project<br/>- nic\_type (optional): "GVNIC" or "VIRTIO\_NET"<br/>- stack\_type (optional): "IPV4\_ONLY" or "IPV4\_IPV6"<br/>- network\_ip (optional): Specific IP address to assign<br/>- queue\_count (optional): Queue count for multiqueue NIC<br/>- access\_config (optional): List of NAT config objects<br/>- ipv6\_access\_config (optional): List of IPv6 access config objects<br/>- alias\_ip\_range (optional): List of alias IP ranges<br/><br/>If the list is empty, the module will fall back to using var.network\_self\_link<br/>and var.subnetwork\_self\_link for backward compatibility.<br/><br/>NB: If you update the current setup with network interfaces, you may need to delete the current mig to apply the new network interface configuration | <pre>list(object({<br/> network = string<br/> subnetwork = optional(string)<br/> subnetwork_project = optional(string)<br/> nic_type = optional(string)<br/> stack_type = optional(string)<br/> network_ip = optional(string, "")<br/> queue_count = optional(number)<br/> access_config = optional(list(object({<br/> nat_ip = optional(string)<br/> network_tier = optional(string)<br/> })), [])<br/> ipv6_access_config = optional(list(object({<br/> network_tier = optional(string)<br/> })), [])<br/> alias_ip_range = optional(list(object({<br/> ip_cidr_range = string<br/> subnetwork_range_name = string<br/> })), [])<br/> }))</pre> | `[]` | no |
253253
| <a name="input_network_self_link"></a> [network\_self\_link](#input\_network\_self\_link) | The self link of the network HTCondor execute points will join | `string` | `"default"` | no |
254254
| <a name="input_network_storage"></a> [network\_storage](#input\_network\_storage) | An array of network attached storage mounts to be configured | <pre>list(object({<br/> server_ip = string,<br/> remote_mount = string,<br/> local_mount = string,<br/> fs_type = string,<br/> mount_options = string,<br/> client_install_runner = map(string)<br/> mount_runner = map(string)<br/> }))</pre> | `[]` | no |
255255
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | Project in which the HTCondor execute points will be created | `string` | n/a | yes |

community/modules/compute/htcondor-execute-point/main.tf

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ locals {
125125
for ni in var.network_interfaces : {
126126
network = ni.network
127127
subnetwork = ni.subnetwork
128+
subnetwork_project = ni.subnetwork_project
128129
nic_type = ni.nic_type
129130
stack_type = ni.stack_type
130131
network_ip = ni.network_ip
@@ -138,6 +139,7 @@ locals {
138139
{
139140
network = var.network_self_link
140141
subnetwork = var.subnetwork_self_link
142+
subnetwork_project = null
141143
nic_type = null
142144
stack_type = null
143145
network_ip = ""
@@ -182,11 +184,12 @@ module "execute_point_instance_template" {
182184
source = "terraform-google-modules/vm/google//modules/instance_template"
183185
version = "~> 14.0"
184186

185-
name_prefix = local.name_prefix
186-
project_id = var.project_id
187-
region = var.region
188-
network = local.network_interfaces[0].network
189-
subnetwork = local.network_interfaces[0].subnetwork
187+
name_prefix = local.name_prefix
188+
project_id = var.project_id
189+
region = var.region
190+
network = local.network_interfaces[0].network
191+
subnetwork = local.network_interfaces[0].subnetwork
192+
subnetwork_project = local.network_interfaces[0].subnetwork_project
190193

191194
additional_networks = [
192195
for network_interface in slice(local.network_interfaces, 1, length(local.network_interfaces)) : {

community/modules/compute/htcondor-execute-point/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ variable "network_interfaces" {
141141
Each network interface should have the following fields:
142142
- network (required): The self link of the network
143143
- subnetwork (optional): The self link of the subnetwork
144+
- subnetwork_project (optional): The self link of the subnetwork project
144145
- nic_type (optional): "GVNIC" or "VIRTIO_NET"
145146
- stack_type (optional): "IPV4_ONLY" or "IPV4_IPV6"
146147
- network_ip (optional): Specific IP address to assign

0 commit comments

Comments
 (0)