alicloud_log_machine_group

Log Service manages all the ECS instances whose logs need to be collected by using the Logtail client in the form of machine groups. Refer to details

Example Usage

Basic Usage

resource "random_integer" "default" {
  max = 99999
  min = 10000
}

resource "alicloud_log_project" "example" {
  name        = "terraform-example-${random_integer.default.result}"
  description = "terraform-example"
}

resource "alicloud_log_machine_group" "example" {
  project       = alicloud_log_project.example.name
  name          = "terraform-example"
  identify_type = "ip"
  topic         = "terraform"
  identify_list = ["10.0.0.1", "10.0.0.2"]
}

Module Support

You can use the existing sls-logtail module to create logtail config, machine group, install logtail on ECS instances and join instances into machine group one-click.

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Log machine group can be imported using the id, e.g.

$ terraform import alicloud_log_machine_group.example tf-log:tf-machine-group