Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

告警规则tencentcloud_monitor_alarm_policy不支持复合指标的创建 #2612

Open
seek-ER opened this issue Apr 30, 2024 · 0 comments
Open

Comments

@seek-ER
Copy link

seek-ER commented Apr 30, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

tencentcloudstack/tencentcloud v1.81.90

Affected Resource(s)

  • tencentcloud_monitor_alarm_policy

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp
# tencentcloud_monitor_alarm_policy.policy:
resource "tencentcloud_monitor_alarm_policy" "policy" {
#    create_time  = "2024-04-18 11:03:47"
    enable       = 1
    monitor_type = "MT_QCE"
    namespace    = "cvm_device"
    notice_ids   = [
        "notice-b6xxx",
    ]
    policy_name  = "测试"
    project_id   = 0
    remark       = null
#    update_time  = "2024-04-29 10:53:15"

    conditions {
        is_union_rule = 2

        rules {
            continue_period  = 3
            description      = "CPUUtilization"
            is_power_notice  = 0
            metric_name      = "CpuUsage"
            notice_frequency = 3600
            operator         = "gt"
            period           = 60
            rule_type        = "STATIC"
            unit             = "%"
            value            = "50"
        }
        rules {
            continue_period  = 3
            description      = "CPUUtilization"
            is_power_notice  = 0
            metric_name      = "CpuUsage"
            notice_frequency = 3600
            operator         = "cycle_increase"
            period           = 60
            rule_type        = "STATIC"
            unit             = "%"
            value            = "3"
        }
    }
}

Debug Output

Actual Behavior

╷
│ Error: "conditions.0.is_union_rule" must contain a valid int value in array []int{0, 1}, got 2
│ 
│   with tencentcloud_monitor_alarm_policy.policy,
│   on main.tf line 17, in resource "tencentcloud_monitor_alarm_policy" "policy":
│   17:         is_union_rule = 2
│ 
╵

Steps to Reproduce

  1. terraform plan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant