Skip to content

Commit

Permalink
azure: add shared_image_gallery_destination for RHEL
Browse files Browse the repository at this point in the history
to allow support in RHEL CVM image builds

Signed-off-by: Snir Sheriber <[email protected]>
  • Loading branch information
snir911 authored and bpradipt committed Sep 21, 2023
1 parent 2e45901 commit f5f6be3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
8 changes: 8 additions & 0 deletions azure/image/rhel/azure-rhel.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
22 changes: 20 additions & 2 deletions azure/image/rhel/variables.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -99,4 +99,22 @@ variable "plan_publisher" {
variable "disable_cloud_config" {
type = string
default = env("DISABLE_CLOUD_CONFIG")
}
}

# 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 = ""
}

0 comments on commit f5f6be3

Please sign in to comment.