diff --git a/modules/instance_template/README.md b/modules/instance_template/README.md index 2b39fee6..2cf3a49e 100644 --- a/modules/instance_template/README.md +++ b/modules/instance_template/README.md @@ -14,7 +14,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({| `[]` | no | -| 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\_disks | List of maps of additional disks. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#disk_name |
disk_name = string
device_name = string
auto_delete = bool
boot = bool
disk_size_gb = number
disk_type = string
disk_labels = map(string)
source_snapshot = optional(string)
}))
list(object({| `[]` | no | | additional\_networks | Additional network interface details for GCE, if any. |
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)
}))
list(object({| `[]` | 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.
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
}))
}))
object({| `null` | no | | auto\_delete | Whether or not the boot disk should be auto-deleted | `string` | `"true"` | no | diff --git a/modules/instance_template/metadata.yaml b/modules/instance_template/metadata.yaml index bedf26ee..1dc83206 100644 --- a/modules/instance_template/metadata.yaml +++ b/modules/instance_template/metadata.yaml @@ -28,7 +28,7 @@ spec: version: 11.1.0 actuationTool: flavor: Terraform - version: ">=0.13.0" + version: ">=1.3" description: {} content: examples: @@ -86,13 +86,17 @@ spec: description: List of maps of additional disks. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#disk_name varType: |- list(object({ - disk_name = string - device_name = string - auto_delete = bool - boot = bool - disk_size_gb = number - disk_type = string - disk_labels = map(string) + 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) })) defaultValue: [] diff --git a/modules/instance_template/variables.tf b/modules/instance_template/variables.tf index 2efa8608..2f92dc67 100644 --- a/modules/instance_template/variables.tf +++ b/modules/instance_template/variables.tf @@ -179,13 +179,17 @@ variable "auto_delete" { variable "additional_disks" { description = "List of maps of additional disks. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#disk_name" type = list(object({ - disk_name = string - device_name = string - auto_delete = bool - boot = bool - disk_size_gb = number - disk_type = string - disk_labels = map(string) + 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) })) default = [] diff --git a/modules/instance_template/versions.tf b/modules/instance_template/versions.tf index 916b6dbc..eac8c416 100644 --- a/modules/instance_template/versions.tf +++ b/modules/instance_template/versions.tf @@ -15,7 +15,7 @@ */ terraform { - required_version = ">=0.13.0" + required_version = ">=1.3" required_providers { google-beta = { source = "hashicorp/google-beta"
ip_cidr_range = string
subnetwork_range_name = string
})