alicloud_sag_dnat_entry

Provides a Sag DnatEntry resource. This topic describes how to add a DNAT entry to a Smart Access Gateway (SAG) instance to enable the DNAT function. By using the DNAT function, you can forward requests received by public IP addresses to Alibaba Cloud instances according to custom mapping rules.

For information about Sag DnatEntry and how to use it, see What is Sag DnatEntry.

Example Usage

Basic Usage

variable "sag_id" {
  default = "sag-9bifkfaz***"
}
provider "alicloud" {
  region = "cn-shanghai"
}

resource "alicloud_sag_dnat_entry" "default" {
  sag_id        = var.sag_id
  type          = "Intranet"
  ip_protocol   = "any"
  external_ip   = "172.32.0.2"
  external_port = "any"
  internal_ip   = "172.16.0.4"
  internal_port = "any"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

The Sag DnatEntry can be imported using the id, e.g.

$ terraform import alicloud_sag_dnat_entry.example sag-abc123456:dnat-abc123456