alicloud_config_rule

Provides a Config Rule resource.

For information about Config Rule and how to use it, see What is Rule.

Example Usage

Basic Usage

data "alicloud_resource_manager_resource_groups" "default" {
  status = "OK"
}
resource "alicloud_config_rule" "default" {
  description                = "If the resource matches one of the specified tag key-value pairs, the configuration is considered compliant."
  source_owner               = "ALIYUN"
  source_identifier          = "contains-tag"
  risk_level                 = 1
  tag_value_scope            = "example-value"
  tag_key_scope              = "example-key"
  exclude_resource_ids_scope = "example-resource_id"
  region_ids_scope           = "cn-hangzhou"
  config_rule_trigger_types  = "ConfigurationItemChangeNotification"
  resource_group_ids_scope   = data.alicloud_resource_manager_resource_groups.default.ids.0
  resource_types_scope = [
  "ACS::RDS::DBInstance"]
  rule_name = "contains-tag"
  input_parameters = {
    key   = "example"
    value = "example"
  }
}

Argument Reference

The following arguments are supported:

The following arguments will be discarded. Please use new fields as soon as possible:

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Config Rule can be imported using the id, e.g.

$ terraform import alicloud_config_rule.example <id>