https://github.com/libre-devops/terraform-azurerm-compute-gallery-application
A module used to deploy a compute gallery application 📲
https://github.com/libre-devops/terraform-azurerm-compute-gallery-application
Last synced: about 1 year ago
JSON representation
A module used to deploy a compute gallery application 📲
- Host: GitHub
- URL: https://github.com/libre-devops/terraform-azurerm-compute-gallery-application
- Owner: libre-devops
- License: mit
- Created: 2024-03-12T21:17:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-12T22:33:15.000Z (over 2 years ago)
- Last Synced: 2025-03-30T15:44:29.776Z (about 1 year ago)
- Language: PowerShell
- Size: 27.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
```hcl
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
}
}
}
```
## Requirements
No requirements.
## Providers
| Name | Version |
|------|---------|
| [azurerm](#provider\_azurerm) | n/a |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [azurerm_shared_image.shared_image](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/shared_image) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [gallery\_name](#input\_gallery\_name) | The name of the shared image gallery | `string` | n/a | yes |
| [images](#input\_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](#input\_location) | The name of the location | `string` | `"uksouth"` | no |
| [rg\_name](#input\_rg\_name) | The name of the resource group | `string` | n/a | yes |
| [tags](#input\_tags) | The tags to be applied | `map(string)` | n/a | yes |
## Outputs
| Name | Description |
|------|-------------|
| [image\_gallery\_name](#output\_image\_gallery\_name) | The gallery name of the image |
| [image\_id](#output\_image\_id) | The id of the image |
| [image\_name](#output\_image\_name) | The name of the image |
| [image\_resource\_group\_name](#output\_image\_resource\_group\_name) | The rg name of the image |