diff --git a/modules/packer/custom-image/README.md b/modules/packer/custom-image/README.md index 70ea5c9040..064e10f2f9 100644 --- a/modules/packer/custom-image/README.md +++ b/modules/packer/custom-image/README.md @@ -230,6 +230,7 @@ No resources. | [disk\_size](#input\_disk\_size) | Size of disk image in GB | `number` | `null` | no | | [image\_family](#input\_image\_family) | The family name of the image to be built. Defaults to `deployment_name` | `string` | `null` | no | | [image\_name](#input\_image\_name) | The name of the image to be built. If not supplied, it will be set to image\_family-$ISO\_TIMESTAMP | `string` | `null` | no | +| [image\_storage\_locations](#input\_image\_storage\_locations) | Storage location, either regional or multi-regional, where snapshot content is to be stored and only accepts 1 value.
See https://developer.hashicorp.com/packer/plugins/builders/googlecompute#image_storage_locations | `list(string)` | `null` | no | | [labels](#input\_labels) | Labels to apply to the short-lived VM | `map(string)` | `null` | no | | [machine\_type](#input\_machine\_type) | VM machine type on which to build new image | `string` | `"n2-standard-4"` | no | | [manifest\_file](#input\_manifest\_file) | File to which to write Packer build manifest | `string` | `"packer-manifest.json"` | no | diff --git a/modules/packer/custom-image/image.pkr.hcl b/modules/packer/custom-image/image.pkr.hcl index c47287893e..c09b32c5a4 100644 --- a/modules/packer/custom-image/image.pkr.hcl +++ b/modules/packer/custom-image/image.pkr.hcl @@ -71,6 +71,7 @@ source "googlecompute" "toolkit_image" { startup_script_file = var.startup_script_file wrap_startup_script = var.wrap_startup_script state_timeout = var.state_timeout + image_storage_locations = var.image_storage_locations } build { diff --git a/modules/packer/custom-image/variables.pkr.hcl b/modules/packer/custom-image/variables.pkr.hcl index 298331e04b..7c55353fa7 100644 --- a/modules/packer/custom-image/variables.pkr.hcl +++ b/modules/packer/custom-image/variables.pkr.hcl @@ -224,3 +224,12 @@ variable "communicator" { error_message = "Set var.communicator to \"ssh\", \"winrm\", or null." } } + +variable "image_storage_locations" { + description = <