back
terraform {
required_providers {
azurerm = ">= 2.54.0"
}
}
top
module "azurerm_platform_image" {
source = "./modules/azurerm/d/azurerm_platform_image"
# location - (required) is a type of string
location = null
# offer - (required) is a type of string
offer = null
# publisher - (required) is a type of string
publisher = null
# sku - (required) is a type of string
sku = null
# version - (optional) is a type of string
version = null
timeouts = [{
read = null
}]
}
top
variable "location" {
description = "(required)"
type = string
}
variable "offer" {
description = "(required)"
type = string
}
variable "publisher" {
description = "(required)"
type = string
}
variable "sku" {
description = "(required)"
type = string
}
variable "version" {
description = "(optional)"
type = string
default = null
}
variable "timeouts" {
description = "nested block: NestingSingle, min items: 0, max items: 0"
type = set(object(
{
read = string
}
))
default = []
}
top
data "azurerm_platform_image" "this" {
# location - (required) is a type of string
location = var.location
# offer - (required) is a type of string
offer = var.offer
# publisher - (required) is a type of string
publisher = var.publisher
# sku - (required) is a type of string
sku = var.sku
# version - (optional) is a type of string
version = var.version
dynamic "timeouts" {
for_each = var.timeouts
content {
# read - (optional) is a type of string
read = timeouts.value["read"]
}
}
}
top
output "id" {
description = "returns a string"
value = data.azurerm_platform_image.this.id
}
output "version" {
description = "returns a string"
value = data.azurerm_platform_image.this.version
}
output "this" {
value = azurerm_platform_image.this
}
top