Skip to content

libre-devops/terraform-azurerm-compute-gallery

Repository files navigation

resource "azurerm_shared_image_gallery" "compute_gallery" {
  for_each = { for gal in var.compute_gallery : gal.name => gal }

  name                = each.value.name
  resource_group_name = each.value.rg_name
  location            = each.value.location
  description         = each.value.description
  tags                = each.value.tags

  dynamic "sharing" {
    for_each = each.value.sharing != null ? [each.value.sharing] : []
    content {
      permission = title(sharing.value.permission)


      dynamic "community_gallery" {
        for_each = sharing.value.community_gallery != null ? [sharing.value.community_gallery] : []
        content {
          eula            = community_gallery.value.eula
          prefix          = community_gallery.value.prefix
          publisher_email = community_gallery.value.publisher_email
          publisher_uri   = community_gallery.value.publisher_uri
        }
      }
    }
  }
}

Requirements

No requirements.

Providers

Name Version
azurerm n/a

Modules

No modules.

Resources

Name Type
azurerm_shared_image_gallery.compute_gallery resource

Inputs

Name Description Type Default Required
compute_gallery The block used to create 1 or more compute galleries
list(object({
name = string
rg_name = string
location = optional(string, "uksouth")
description = optional(string, "The default compute gallery used within the azure platform")
tags = map(string)
sharing = optional(object({
permission = optional(string, "Groups")
community_gallery = optional(object({
eula = string
prefix = string
publisher_email = string
publisher_uri = string
}))
}))
}))
n/a yes

Outputs

Name Description
gallery_id The ID of the gallery
gallery_location The location name of the gallery
gallery_name The name name of the gallery
gallery_rg_name The rg name of the gallery
gallery_tags The tags of the gallery
gallery_unique_name The unique name of the gallery

About

A module used to deploy an Azure Compute Gallery

Resources

License

Stars

Watchers

Forks

Packages

No packages published