alicloud_api_gateway_log_config

Provides a Api Gateway Log Config resource.

For information about Api Gateway Log Config and how to use it, see What is Log Config.

Example Usage

Basic Usage

variable "name" {
  default = "terraform-example"
}

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

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

resource "alicloud_log_store" "example" {
  project_name          = alicloud_log_project.example.project_name
  logstore_name         = "${var.name}-${random_integer.default.result}"
  shard_count           = 3
  auto_split            = true
  max_split_shard_count = 60
  append_meta           = true
}

resource "alicloud_api_gateway_log_config" "example" {
  sls_project   = alicloud_log_project.example.project_name
  sls_log_store = alicloud_log_store.example.logstore_name
  log_type      = "PROVIDER"
}

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

Api Gateway Log Config can be imported using the id, e.g.

$ terraform import alicloud_api_gateway_log_config.example <log_type>