resource "azurerm_shared_image" "shared_image" {
for_each = { for k, v in var.images : k => v }
gallery_name = var.gallery_name
resource_group_name = var.rg_name
location = var.location
tags = var.tags
name = try(each.value.name, null)
description = try(each.value.description, null)
specialized = try(each.value.specialised, null)
hyper_v_generation = upper(try(each.value.hyper_v_generation, null))
os_type = title(each.value.os_type)
accelerated_network_support_enabled = try(each.value.accelerated_network_support_enabled, null)
eula = each.value.eula
end_of_life_date = each.value.end_of_life_date
disk_types_not_allowed = each.value.disk_types_not_allowed
architecture = each.value.architecture
max_recommended_vcpu_count = each.value.max_recommended_vcpu_count
min_recommended_vcpu_count = each.value.min_recommended_vcpu_count
max_recommended_memory_in_gb = each.value.max_recommended_memory_in_gb
min_recommended_memory_in_gb = each.value.min_recommended_memory_in_gb
release_note_uri = each.value.release_note_uri
trusted_launch_enabled = each.value.trusted_launch_enabled
trusted_launch_supported = each.value.trusted_launch_supported
confidential_vm_enabled = each.value.confidential_vm_enabled
confidential_vm_supported = each.value.confidential_vm_supported
dynamic "identifier" {
for_each = each.value.identifier != null ? [each.value.identifier] : []
content {
offer = identifier.value.offer
publisher = identifier.value.publisher
sku = identifier.value.sku
}
}
dynamic "purchase_plan" {
for_each = each.value.purchase_plan != null ? [each.value.purchase_plan] : []
content {
name = purchase_plan.value.name
publisher = purchase_plan.value.publisher
product = purchase_plan.value.product
}
}
}
No requirements.
No modules.
Name |
Description |
Type |
Default |
Required |
gallery_name |
The name of the shared image gallery |
string |
n/a |
yes |
images |
The block used to create 1 or more images |
list(object({ name = string description = optional(string) specialized = optional(bool, false) hyper_v_generation = optional(string, "V2") os_type = optional(string) accelerated_network_support_enabled = optional(string) disk_types_not_allowed = optional(list(string)) end_of_life_date = optional(string) eula = optional(string) architecture = optional(string, "x64") max_recommended_vcpu_count = optional(number) min_recommended_vcpu_count = optional(number) max_recommended_memory_in_gb = optional(number) min_recommended_memory_in_gb = optional(number) privacy_statement_uri = optional(string) release_note_uri = optional(string) trusted_launch_supported = optional(bool) trusted_launch_enabled = optional(bool) confidential_vm_supported = optional(bool) confidential_vm_enabled = optional(bool) identifier = object({ offer = string publisher = string sku = string }) purchase_plan = optional(object({ name = string publisher = optional(string) product = optional(string) })) })) |
n/a |
yes |
location |
The name of the location |
string |
"uksouth" |
no |
rg_name |
The name of the resource group |
string |
n/a |
yes |
tags |
The tags to be applied |
map(string) |
n/a |
yes |