From ec3c07157788465ad878acb3997c50d620f8796f Mon Sep 17 00:00:00 2001 From: Eesaan Atluri <eesaanatluri@gmail.com> Date: Tue, 16 Aug 2022 03:14:03 -0500 Subject: [PATCH] Add image related vars for metadata and img ACLs --- openstack/nodeimage.pkr.hcl | 4 ++++ openstack/variables.pkr.hcl | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/openstack/nodeimage.pkr.hcl b/openstack/nodeimage.pkr.hcl index c02d853..5cc075a 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 fe701f0..0070745 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" -- GitLab