diff --git a/openstack/nodeimage.pkr.hcl b/openstack/nodeimage.pkr.hcl index c02d8531be8a8504a0c482380dcfc39d1c5fde44..5cc075a38b0385988c1b1a1876c04712863d6d53 100644 --- a/openstack/nodeimage.pkr.hcl +++ b/openstack/nodeimage.pkr.hcl @@ -3,8 +3,12 @@ locals { } source "openstack" "image" { + skip_create_image = var.skip_create_image image_name = local.local_image_name source_image_name = var.source_image + image_members = var.image_membership + image_auto_accept_members = var.auto_accept_members + image_tags = var.image_tags flavor = var.flavor instance_name = var.build_instance_name diff --git a/openstack/variables.pkr.hcl b/openstack/variables.pkr.hcl index fe701f02787fdaf253ab327e457262a66ba9ce4a..0070745885c10e636a8ccd4ca56eb3a4b9887c74 100644 --- a/openstack/variables.pkr.hcl +++ b/openstack/variables.pkr.hcl @@ -15,6 +15,30 @@ variable "image_date_suffix" { description = "Append a date to the image name (in YYYYMMDDHHMMSS format)" } +variable "image_tags" { + type = list(string) + default = [] + description = "List of tags to be associated to the resulting image" +} + +variable "image_membership" { + type = list(string) + default = [] + description = "Projects/tenants to share the image in openstack with" +} + +variable "auto_accept_members" { + type = bool + default = false + description = "A boolean value for auto accepting image in the projects/tenants defined in image_membership." +} + +variable "skip_create_image" { + type = bool + default = false + description = "A boolean value for skipping image creation at the end of the build" +} + variable "source_image" { type = string description = "The name of the source image to use"