alicloud_ga_acl_attachment

Provides a Global Accelerator (GA) Acl Attachment resource.

For information about Global Accelerator (GA) Acl Attachment and how to use it, see What is Acl Attachment.

Example Usage

Basic Usage

resource "alicloud_ga_accelerator" "default" {
  duration        = 1
  auto_use_coupon = true
  spec            = "1"
}

resource "alicloud_ga_bandwidth_package" "default" {
  bandwidth      = 100
  type           = "Basic"
  bandwidth_type = "Basic"
  payment_type   = "PayAsYouGo"
  billing_type   = "PayBy95"
  ratio          = 30
}

resource "alicloud_ga_bandwidth_package_attachment" "default" {
  accelerator_id       = alicloud_ga_accelerator.default.id
  bandwidth_package_id = alicloud_ga_bandwidth_package.default.id
}

resource "alicloud_ga_listener" "default" {
  accelerator_id = alicloud_ga_bandwidth_package_attachment.default.accelerator_id
  port_ranges {
    from_port = 80
    to_port   = 80
  }
}

resource "alicloud_ga_acl" "default" {
  acl_name           = "terraform-example"
  address_ip_version = "IPv4"
}

resource "alicloud_ga_acl_entry_attachment" "default" {
  acl_id            = alicloud_ga_acl.default.id
  entry             = "192.168.1.1/32"
  entry_description = "terraform-example"
}

resource "alicloud_ga_acl_attachment" "default" {
  listener_id = alicloud_ga_listener.default.id
  acl_id      = alicloud_ga_acl.default.id
  acl_type    = "white"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Global Accelerator (GA) Acl Attachment can be imported using the id, e.g.

$ terraform import alicloud_ga_acl_attachment.example <listener_id>:<acl_id>