Skip to content

Latest commit

 

History

History
152 lines (122 loc) · 2.81 KB

alicloud_snat_entry.md

File metadata and controls

152 lines (122 loc) · 2.81 KB

alicloud_snat_entry

back

Index

Terraform

terraform {
  required_providers {
    alicloud = ">= 1.120.0"
  }
}

top

Example Usage

module "alicloud_snat_entry" {
  source = "./modules/alicloud/r/alicloud_snat_entry"

  # snat_entry_name - (optional) is a type of string
  snat_entry_name = null
  # snat_ip - (required) is a type of string
  snat_ip = null
  # snat_table_id - (required) is a type of string
  snat_table_id = null
  # source_cidr - (optional) is a type of string
  source_cidr = null
  # source_vswitch_id - (optional) is a type of string
  source_vswitch_id = null

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

top

Variables

variable "snat_entry_name" {
  description = "(optional)"
  type        = string
  default     = null
}

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

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

variable "source_cidr" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "source_vswitch_id" {
  description = "(optional)"
  type        = string
  default     = null
}

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

top

Resource

resource "alicloud_snat_entry" "this" {
  # snat_entry_name - (optional) is a type of string
  snat_entry_name = var.snat_entry_name
  # snat_ip - (required) is a type of string
  snat_ip = var.snat_ip
  # snat_table_id - (required) is a type of string
  snat_table_id = var.snat_table_id
  # source_cidr - (optional) is a type of string
  source_cidr = var.source_cidr
  # source_vswitch_id - (optional) is a type of string
  source_vswitch_id = var.source_vswitch_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"]
      # update - (optional) is a type of string
      update = timeouts.value["update"]
    }
  }

}

top

Outputs

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

output "snat_entry_id" {
  description = "returns a string"
  value       = alicloud_snat_entry.this.snat_entry_id
}

output "status" {
  description = "returns a string"
  value       = alicloud_snat_entry.this.status
}

output "this" {
  value = alicloud_snat_entry.this
}

top