Skip to content

Commit

Permalink
Add dynamic name for Gallery in Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
muratugureminoglu committed Feb 18, 2025
1 parent f0c8226 commit 2837a8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions terraform/azure/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "azurerm_resource_group" "rg" {
location = var.resource_group_location
name = "community"
name = var.rg_name
}

resource "azurerm_virtual_network" "antmedia-marketplace" {
Expand Down Expand Up @@ -229,7 +229,7 @@ resource "null_resource" "generalize_vm" {


resource "azurerm_shared_image_gallery" "antmedia-marketplace" {
name = "antmedia_image_gallery_${var.ams_version}"
name = "antmedia_image_gallery_${azurerm_resource_group.rg.name}_${var.ams_version}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
description = "Shared images and things."
Expand Down
5 changes: 5 additions & 0 deletions terraform/azure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ variable "resource_group_location" {
variable "resource_group_name_enterprise" {
default = "enterprise"
description = "Name"
type = string
}

variable "rg_name" {
description = "Enter the Azure Resource Group Name"
type = string
}

variable "resource_group_name_community" {
default = "community"
Expand Down

0 comments on commit 2837a8f

Please sign in to comment.