alicloud_oos_state_configuration

Provides a OOS State Configuration resource.

For information about OOS State Configuration and how to use it, see What is State Configuration.

Example Usage

Basic Usage

data "alicloud_resource_manager_resource_groups" "default" {}

resource "alicloud_oos_state_configuration" "default" {
  template_name       = "ACS-ECS-InventoryDataCollection"
  configure_mode      = "ApplyOnly"
  description         = "terraform-example"
  schedule_type       = "rate"
  schedule_expression = "1 hour"
  resource_group_id   = data.alicloud_resource_manager_resource_groups.default.ids.0
  targets             = "{\"Filters\": [{\"Type\": \"All\", \"Parameters\": {\"InstanceChargeType\": \"PrePaid\"}}], \"ResourceType\": \"ALIYUN::ECS::Instance\"}"
  parameters          = "{\"policy\": {\"ACS:Application\": {\"Collection\": \"Enabled\"}}}"
  tags = {
    Created = "TF"
    For     = "example"
  }
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

OOS State Configuration can be imported using the id, e.g.

$ terraform import alicloud_oos_state_configuration.example <id>