alicloud_cloud_firewall_address_book

更新时间:

Provides a Cloud Firewall Address Book resource.

For information about Cloud Firewall Address Book and how to use it, see What is Address Book.

-> NOTE: Available since v1.178.0.

Example Usage

Basic Usage


resource "alicloud_cloud_firewall_address_book" "example" {
  description      = "example_value"
  group_name       = "example_value"
  group_type       = "tag"
  tag_relation     = "and"
  auto_add_tag_ecs = 0
  ecs_tags {
    tag_key   = "created"
    tag_value = "tfTestAcc0"
  }
}

Argument Reference

The following arguments are supported:

  • group_name - (Required) The name of the Address Book.
  • group_type - (Required, ForceNew) The type of the Address Book. Valid values: ip, ipv6, domain, port, tag. NOTE: From version 1.213.1, group_type can be set to ipv6, domain, port.
  • description - (Required) The description of the Address Book.
  • auto_add_tag_ecs - (Optional, Int) Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values: 0, 1.
  • tag_relation - (Optional) The logical relation among the ECS tags that to be matched. Default value: and. Valid values:
    • and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the Address Book.
    • or: The public IP addresses of ECS instances that match one of the specified tags can be added to the Address Book.
  • lang - (Optional) The language of the content within the request and response. Valid values: zh, en.
  • address_list - (Optional, List) The list of addresses.
  • ecs_tags - (Optional, Set) A list of ECS tags. See ecs_tags below.

ecs_tags

The ecs_tags supports the following:

  • tag_key - (Optional) The key of ECS tag that to be matched.
  • tag_value - (Optional) The value of ECS tag that to be matched.

Attributes Reference

The following attributes are exported:

  • id - The resource ID in terraform of Address Book.

Import

Cloud Firewall Address Book can be imported using the id, e.g.

$ terraform import alicloud_cloud_firewall_address_book.example <id>