Skip to content

Latest commit

 

History

History
112 lines (87 loc) · 1.99 KB

azurerm_nat_gateway_public_ip_association.md

File metadata and controls

112 lines (87 loc) · 1.99 KB

azurerm_nat_gateway_public_ip_association

back

Index

Terraform

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

top

Example Usage

module "azurerm_nat_gateway_public_ip_association" {
  source = "./modules/azurerm/r/azurerm_nat_gateway_public_ip_association"

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

  timeouts = [{
    create = null
    delete = null
    read   = null
  }]
}

top

Variables

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

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

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

top

Resource

resource "azurerm_nat_gateway_public_ip_association" "this" {
  # nat_gateway_id - (required) is a type of string
  nat_gateway_id = var.nat_gateway_id
  # public_ip_address_id - (required) is a type of string
  public_ip_address_id = var.public_ip_address_id

  dynamic "timeouts" {
    for_each = var.timeouts
    content {
      # create - (optional) is a type of string
      create = timeouts.value["create"]
      # delete - (optional) is a type of string
      delete = timeouts.value["delete"]
      # read - (optional) is a type of string
      read = timeouts.value["read"]
    }
  }

}

top

Outputs

output "id" {
  description = "returns a string"
  value       = azurerm_nat_gateway_public_ip_association.this.id
}

output "this" {
  value = azurerm_nat_gateway_public_ip_association.this
}

top