文档

alicloud_ddoscoo_port

更新时间:
一键部署

Provides a Anti-DDoS Pro Port resource.

For information about Anti-DDoS Pro Port and how to use it, see What is Port.

-> NOTE: Available since v1.123.0.

Example Usage

Basic Usage

provider "alicloud" {
  region = "cn-hangzhou"
}

variable "name" {
  default = "tf-example"
}
resource "alicloud_ddoscoo_instance" "default" {
  name              = var.name
  bandwidth         = "30"
  base_bandwidth    = "30"
  service_bandwidth = "100"
  port_count        = "50"
  domain_count      = "50"
  period            = "1"
  product_type      = "ddoscoo"
}

resource "alicloud_ddoscoo_port" "default" {
  instance_id       = alicloud_ddoscoo_instance.default.id
  frontend_port     = "7001"
  backend_port      = "7002"
  frontend_protocol = "tcp"
  real_servers      = ["1.1.1.1", "2.2.2.2"]
}

Argument Reference

The following arguments are supported:

  • backend_port - (Optional, ForceNew) The port of the origin server. Valid values: [1~65535].
  • frontend_port - (Required, ForceNew) The forwarding port. Valid values: [1~65535].
  • instance_id - (Required, ForceNew) The ID of Ddoscoo instance.
  • frontend_protocol - (Required, ForceNew) The forwarding protocol. Valid values tcp and udp.
  • real_servers - (Required) List of source IP addresses.

Attributes Reference

The following attributes are exported:

  • id - The resource ID of Port. The value is formatted <instance_id>:<frontend_port>:<frontend_protocol>.

Import

Anti-DDoS Pro Port can be imported using the id, e.g.

$ terraform import alicloud_ddoscoo_port.example <instance_id>:<frontend_port>:<frontend_protocol>

  • 本页导读 (0)
文档反馈