Refactor compute-vm for Terraform 1.3 (#860)

* refactor compute-vm for Terraform 1.3

* bump Terraform version in CI tests config

* fix optional null handling (ht jccb)

* tfdoc

* update blueprints

* align fast

* align README examples
This commit is contained in:
Ludovico Magnocavallo
2022-10-07 10:53:53 +02:00
committed by GitHub
parent 8c88517199
commit e66340c4db
17 changed files with 104 additions and 360 deletions

View File

@@ -16,27 +16,13 @@
variable "attached_disks" {
description = "Additional disks, if options is null defaults will be used in its place. Source type is one of 'image' (zonal disks in vms and template), 'snapshot' (vm), 'existing', and null."
type = list(object({
name = string
size = string
source = string
source_type = string
options = object({
mode = string
replica_zone = string
type = string
})
}))
default = []
type = any
default = []
}
variable "attached_disk_defaults" {
description = "Defaults for attached disks options."
type = object({
mode = string
replica_zone = string
type = string
})
type = any
default = {
mode = "READ_WRITE"
replica_zone = null
@@ -70,31 +56,13 @@ variable "metadata" {
}
variable "network_interfaces" {
type = list(object({
nat = bool
network = string
subnetwork = string
addresses = object({
internal = string
external = string
})
}))
type = any
default = [{
network = "https://www.googleapis.com/compute/v1/projects/my-project/global/networks/default",
subnetwork = "https://www.googleapis.com/compute/v1/projects/my-project/regions/europe-west1/subnetworks/default-default",
nat = false,
addresses = null
}]
}
variable "network_interface_options" {
type = map(object({
alias_ips = map(string)
nic_type = string
}))
default = {}
}
variable "service_account_create" {
type = bool
default = false