alicloud_sag_acl_rule

Provides a Sag Acl Rule resource. This topic describes how to configure an access control list (ACL) rule for a target Smart Access Gateway instance to permit or deny access to or from specified IP addresses in the ACL rule.

For information about Sag Acl Rule and how to use it, see What is access control list (ACL) rule.

Example Usage

Basic Usage

variable "name" {
  default = "tf_example"
}
provider "alicloud" {
  region = "cn-shanghai"
}

resource "alicloud_sag_acl" "default" {
  name = var.name
}

resource "alicloud_sag_acl_rule" "default" {
  acl_id            = alicloud_sag_acl.default.id
  description       = var.name
  policy            = "accept"
  ip_protocol       = "ALL"
  direction         = "in"
  source_cidr       = "10.10.1.0/24"
  source_port_range = "-1/-1"
  dest_cidr         = "192.168.1.0/24"
  dest_port_range   = "-1/-1"
  priority          = "1"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

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

$ terraform import alicloud_sag_acl_rule.example acr-abc123456