diff --git a/modules/instance_template/README.md b/modules/instance_template/README.md index 5d3dd7a9..d502b066 100644 --- a/modules/instance_template/README.md +++ b/modules/instance_template/README.md @@ -13,7 +13,7 @@ See the [simple](../../examples/instance_template/simple) for a usage example. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| access\_config | Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet. |
list(object({
nat_ip = string
network_tier = string
})) | `[]` | no |
+| access\_config | Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet. | list(object({
nat_ip = optional(string)
network_tier = string
})) | `[]` | no |
| additional\_disks | List of maps of additional disks. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#disk_name | list(object({
auto_delete = optional(bool, true)
boot = optional(bool, false)
device_name = optional(string)
disk_name = optional(string)
disk_size_gb = optional(number)
disk_type = optional(string)
disk_labels = optional(map(string), {})
interface = optional(string)
mode = optional(string)
source = optional(string)
source_image = optional(string)
source_snapshot = optional(string)
})) | `[]` | no |
| additional\_networks | Additional network interface details for GCE, if any. | list(object({
network = string
subnetwork = string
subnetwork_project = string
network_ip = string
nic_type = string
stack_type = string
queue_count = number
access_config = list(object({
nat_ip = string
network_tier = string
}))
ipv6_access_config = list(object({
network_tier = string
}))
alias_ip_range = list(object({
ip_cidr_range = string
subnetwork_range_name = string
}))
})) | `[]` | no |
| alias\_ip\_range | An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.object({
ip_cidr_range = string
subnetwork_range_name = string
}) | `null` | no |
diff --git a/modules/instance_template/metadata.display.yaml b/modules/instance_template/metadata.display.yaml
index 365723b0..9f0abce5 100644
--- a/modules/instance_template/metadata.display.yaml
+++ b/modules/instance_template/metadata.display.yaml
@@ -1,4 +1,4 @@
-# Copyright 2024 Google LLC
+# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/modules/instance_template/metadata.yaml b/modules/instance_template/metadata.yaml
index 3fa05336..9b4d93c5 100644
--- a/modules/instance_template/metadata.yaml
+++ b/modules/instance_template/metadata.yaml
@@ -327,7 +327,7 @@ spec:
description: Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet.
varType: |-
list(object({
- nat_ip = string
+ nat_ip = optional(string)
network_tier = string
}))
defaultValue: []
diff --git a/modules/instance_template/variables.tf b/modules/instance_template/variables.tf
index f15468df..1819c27b 100644
--- a/modules/instance_template/variables.tf
+++ b/modules/instance_template/variables.tf
@@ -375,7 +375,7 @@ variable "confidential_instance_type" {
variable "access_config" {
description = "Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet."
type = list(object({
- nat_ip = string
+ nat_ip = optional(string)
network_tier = string
}))
default = []