alicloud_cen_flowlog

This resource used to create a flow log function in Cloud Enterprise Network (CEN). By using the flow log function, you can capture the traffic data of the network instances in different regions of a CEN. You can also use the data aggregated in flow logs to analyze cross-region traffic flows, minimize traffic costs, and troubleshoot network faults.

For information about CEN flow log and how to use it, see Manage CEN flowlog.

Example Usage

Basic Usage

# Create a cen flowlog resource and use it to publish a route entry pointing to an ECS.
resource "alicloud_cen_instance" "default" {
  name = "my-cen"
}
resource "alicloud_log_project" "default" {
  name        = "sls-for-flowlog"
  description = "create by terraform"
}
resource "alicloud_log_store" "default" {
  project               = alicloud_log_project.default.name
  name                  = "sls-for-flowlog"
  retention_period      = 3650
  shard_count           = 3
  auto_split            = true
  max_split_shard_count = 60
  append_meta           = true
}

resource "alicloud_cen_flowlog" "default" {
  flow_log_name  = "my-flowlog"
  cen_id         = alicloud_cen_instance.default.id
  project_name   = alicloud_log_project.default.name
  log_store_name = alicloud_log_store.default.name
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

CEN flowlog can be imported using the id, e.g.

$ terraform import alicloud_cen_flowlog.default flowlog-tig1xxxxxx