Skip to content

Latest commit

 

History

History
105 lines (79 loc) · 1.52 KB

File metadata and controls

105 lines (79 loc) · 1.52 KB

azurerm_resource_group

back

Index

Terraform

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

top

Example Usage

module "azurerm_resource_group" {
  source = "./modules/azurerm/d/azurerm_resource_group"

  # name - (required) is a type of string
  name = null

  timeouts = [{
    read = null
  }]
}

top

Variables

variable "name" {
  description = "(required)"
  type        = string
}

variable "timeouts" {
  description = "nested block: NestingSingle, min items: 0, max items: 0"
  type = set(object(
    {
      read = string
    }
  ))
  default = []
}

top

Datasource

data "azurerm_resource_group" "this" {
  # name - (required) is a type of string
  name = var.name

  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_resource_group.this.id
}

output "location" {
  description = "returns a string"
  value       = data.azurerm_resource_group.this.location
}

output "tags" {
  description = "returns a map of string"
  value       = data.azurerm_resource_group.this.tags
}

output "this" {
  value = azurerm_resource_group.this
}

top