https://github.com/libre-devops/terraform-azurerm-image
A module used to deploy an Azure image :camera:
https://github.com/libre-devops/terraform-azurerm-image
Last synced: 2 months ago
JSON representation
A module used to deploy an Azure image :camera:
- Host: GitHub
- URL: https://github.com/libre-devops/terraform-azurerm-image
- Owner: libre-devops
- License: mit
- Created: 2022-05-28T14:54:29.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-28T15:00:09.000Z (almost 3 years ago)
- Last Synced: 2024-12-26T16:12:12.835Z (4 months ago)
- Language: HCL
- Size: 12.7 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
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"
}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_image.azure_image](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/image) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [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 |
|------|-------------|
| [image\_id](#output\_image\_id) | The id of the image |
| [image\_name](#output\_image\_name) | The name of the image |