-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Open
Labels
documentationIntroduces or discusses updates to documentation.Introduces or discusses updates to documentation.enhancementRequests to existing resources that expand the functionality or scope.Requests to existing resources that expand the functionality or scope.service/cloudwatchIssues and PRs that pertain to the cloudwatch service.Issues and PRs that pertain to the cloudwatch service.
Description
Description
some of aws_cloudwatch_metric_alarm items are optional under certain circumstances, for example when defining an alarm as follows:
resource "aws_cloudwatch_metric_alarm" "cloudwatch_metric_alarm" {
alarm_name = "AlarmName"
alarm_description = "AlarmDescription"
alarm_actions = "AlarmAction"
insufficient_data_actions = ""
ok_actions = "OKActions"
comparison_operator = "GreaterThanThreshold"
threshold = 0
evaluation_periods = 1
period = 60
}
I get these errors MetricName must not be blank
and One of
statisticor
extended_statistic must be set for a cloudwatch metric alarm
These fields metric_name
- statistic
- extended_statistic
are marked optional
in the documentations. Is there a way to point out the conditions in which these fields are required
Affected Resource(s) and/or Data Source(s)
aws_v5.39.1
Potential Terraform Configuration
No response
References
No response
Would you like to implement a fix?
Yes
rnrsr
Metadata
Metadata
Assignees
Labels
documentationIntroduces or discusses updates to documentation.Introduces or discusses updates to documentation.enhancementRequests to existing resources that expand the functionality or scope.Requests to existing resources that expand the functionality or scope.service/cloudwatchIssues and PRs that pertain to the cloudwatch service.Issues and PRs that pertain to the cloudwatch service.