-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/aws: Add Support for aws_cloudwatch_metric_alarm extended statistic #11193
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,10 @@ resource "aws_cloudwatch_metric_alarm" "bat" { | |
alarm_actions = ["${aws_autoscaling_policy.bat.arn}"] | ||
} | ||
``` | ||
|
||
~> **NOTE:** You cannot create a metric alarm consisting of both `statistic` and `extended_statistic` parameters. | ||
You must choose one or the other | ||
|
||
## Argument Reference | ||
|
||
See [related part of AWS Docs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html) | ||
|
@@ -67,7 +71,7 @@ The following arguments are supported: | |
* `namespace` - (Required) The namespace for the alarm's associated metric. See docs for the [list of namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/aws-namespaces.html). | ||
See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html). | ||
* `period` - (Required) The period in seconds over which the specified `statistic` is applied. | ||
* `statistic` - (Required) The statistic to apply to the alarm's associated metric. | ||
* `statistic` - (Optional) The statistic to apply to the alarm's associated metric. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add in documentation here specifying that you can only have one of |
||
Either of the following is supported: `SampleCount`, `Average`, `Sum`, `Minimum`, `Maximum` | ||
* `threshold` - (Required) The value against which the specified statistic is compared. | ||
* `actions_enabled` - (Optional) Indicates whether or not actions should be executed during any changes to the alarm's state. Defaults to `true`. | ||
|
@@ -77,6 +81,7 @@ The following arguments are supported: | |
* `insufficient_data_actions` - (Optional) The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Number (ARN). | ||
* `ok_actions` - (Optional) The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Number (ARN). | ||
* `unit` - (Optional) The unit for the alarm's associated metric. | ||
* `extended_statistic` - (Optional) The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100. | ||
|
||
## Attributes Reference | ||
|
||
|
@@ -85,7 +90,6 @@ The following attributes are exported: | |
* `id` - The ID of the health check | ||
|
||
|
||
|
||
## Import | ||
|
||
Cloud Metric Alarms can be imported using the `alarm_name`, e.g. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If one or the other has to be set, should probably check for that here, and verify that at least one but not both have been set.