https://github.com/libre-devops/terraform-azurerm-shared-image
A module used to add a shared image to an Azure Compute Gallery
https://github.com/libre-devops/terraform-azurerm-shared-image
Last synced: 2 months ago
JSON representation
A module used to add a shared image to an Azure Compute Gallery
- Host: GitHub
- URL: https://github.com/libre-devops/terraform-azurerm-shared-image
- Owner: libre-devops
- License: mit
- Created: 2022-05-26T16:40:54.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-28T18:36:28.000Z (almost 3 years ago)
- Last Synced: 2024-12-26T16:12:05.957Z (4 months ago)
- Language: HCL
- Size: 24.4 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
```hcl
module "rg" {
source = "registry.terraform.io/libre-devops/rg/azurerm"rg_name = "rg-${var.short}-${var.loc}-${terraform.workspace}-build" // rg-ldo-euw-dev-build
location = local.location // compares var.loc with the var.regions var to match a long-hand name, in this case, "euw", so "westeurope"
tags = local.tags# lock_level = "CanNotDelete" // Do not set this value to skip lock
}module "gallery" {
source = "registry.terraform.io/libre-devops/compute-gallery/azurerm"rg_name = module.rg.rg_name
location = module.rg.rg_location
tags = module.rg.rg_tagsgallery_name = "gal${var.short}${var.loc}${terraform.workspace}01"
description = "A basic description"
}module "image" {
source = "registry.terraform.io/libre-devops/shared-image/azurerm"rg_name = module.rg.rg_name
location = module.rg.rg_location
tags = module.rg.rg_tagsimages = {
img01 = {
gallery_name = module.gallery.gallery_name
is_image_specialised = false
image_hyper_v_generation = "V2"
image_os_type = "Linux"identifier = {
publisher = "LibreDevOps"
offer = "Image2"
sku = "Latest"
}
create_image_version = true
image_version_number = formatdate("YYYY.MM", timestamp())
exclude_from_latest = falseimage_version_target_region = {
image_replication_zone_location = "westeurope"
}
}
}
}
```
## RequirementsNo 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 |
| [azurerm_shared_image_version.shared_image_version](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/shared_image_version) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [create\_image\_version](#input\_create\_image\_version) | Whether the for\_each block for an image version is to be executed | `bool` | `false` | no |
| [images](#input\_images) | The images block | `any` | n/a | yes |
| [location](#input\_location) | The location for this resource to be put in | `string` | n/a | yes |
| [rg\_name](#input\_rg\_name) | The name of the resource group, this module does not create a resource group, it is expecting the value of a resource group already exists | `string` | n/a | yes |
| [tags](#input\_tags) | A map of the tags to use on the resources that are deployed with this module. | `map(string)` |{| no |
"source": "terraform"
}## Outputs
| Name | Description |
|------|-------------|
| [shared\_image\_gallery\_name](#output\_shared\_image\_gallery\_name) | The name of the shared image gallery |
| [shared\_image\_id](#output\_shared\_image\_id) | The id of the shared image |
| [shared\_image\_name](#output\_shared\_image\_name) | The name of the shared image |