From f5f6be392647795f6de3afa9dc1e212182376b50 Mon Sep 17 00:00:00 2001 From: Snir Sheriber Date: Thu, 7 Sep 2023 11:55:53 +0300 Subject: [PATCH] azure: add shared_image_gallery_destination for RHEL to allow support in RHEL CVM image builds Signed-off-by: Snir Sheriber --- azure/image/rhel/azure-rhel.pkr.hcl | 8 ++++++++ azure/image/rhel/variables.pkr.hcl | 22 ++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/azure/image/rhel/azure-rhel.pkr.hcl b/azure/image/rhel/azure-rhel.pkr.hcl index 20cbd681a..098347260 100644 --- a/azure/image/rhel/azure-rhel.pkr.hcl +++ b/azure/image/rhel/azure-rhel.pkr.hcl @@ -20,6 +20,14 @@ source "azure-arm" "rhel" { managed_image_name = "${var.az_image_name}" managed_image_resource_group_name = "${var.resource_group}" build_resource_group_name = "${var.resource_group}" + + shared_image_gallery_destination { + subscription = "${var.subscription_id}" + resource_group = "${var.resource_group}" + gallery_name = "${var.az_gallery_name}" + image_name = "${var.az_gallery_image_name}" + image_version = "${var.az_gallery_image_version}" + } } build { diff --git a/azure/image/rhel/variables.pkr.hcl b/azure/image/rhel/variables.pkr.hcl index e5fba70e5..a726bc9e3 100644 --- a/azure/image/rhel/variables.pkr.hcl +++ b/azure/image/rhel/variables.pkr.hcl @@ -11,7 +11,7 @@ variable "az_image_name" { // instance type variable "vm_size" { type = string - default = "Standard_A2_v2" + default = "Standard_D2as_v5" } variable "resource_group" { @@ -99,4 +99,22 @@ variable "plan_publisher" { variable "disable_cloud_config" { type = string default = env("DISABLE_CLOUD_CONFIG") -} \ No newline at end of file +} + +# shared gallery name +variable "az_gallery_name" { + type = string + default = "" +} + +# shared gallery image name +variable "az_gallery_image_name" { + type = string + default = "" +} + +# shared gallery image version +variable "az_gallery_image_version" { + type = string + default = "" +}