Skip to content

Latest commit

 

History

History
137 lines (108 loc) · 2.24 KB

File metadata and controls

137 lines (108 loc) · 2.24 KB

azurerm_platform_image

back

Index

Terraform

terraform {
  required_providers {
    azurerm = ">= 2.54.0"
  }
}

top

Example Usage

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

Variables

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

Datasource

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

Outputs

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