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

r/cloudwatch_log_metric_filter - add unit #19804

Merged

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Jun 15, 2021

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #19800

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSCloudWatchLogMetricFilter_'
--- PASS: TestAccAWSCloudWatchLogMetricFilter_disappears (38.42s)
--- PASS: TestAccAWSCloudWatchLogMetricFilter_basic (226.30s)
--- PASS: TestAccAWSCloudWatchLogMetricFilter_disappears_logGroup (28.00s)

@github-actions github-actions bot added service/cloudwatchlogs tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/L Managed by automation to categorize the size of a PR. labels Jun 15, 2021
@DrFaust92 DrFaust92 added the enhancement Requests to existing resources that expand the functionality or scope. label Jun 15, 2021
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Jun 15, 2021
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

Commercial
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSCloudWatchLogMetricFilter_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSCloudWatchLogMetricFilter_ -timeout 180m
=== RUN   TestAccAWSCloudWatchLogMetricFilter_basic
=== PAUSE TestAccAWSCloudWatchLogMetricFilter_basic
=== RUN   TestAccAWSCloudWatchLogMetricFilter_disappears
=== PAUSE TestAccAWSCloudWatchLogMetricFilter_disappears
=== RUN   TestAccAWSCloudWatchLogMetricFilter_disappears_logGroup
=== PAUSE TestAccAWSCloudWatchLogMetricFilter_disappears_logGroup
=== CONT  TestAccAWSCloudWatchLogMetricFilter_basic
=== CONT  TestAccAWSCloudWatchLogMetricFilter_disappears_logGroup
=== CONT  TestAccAWSCloudWatchLogMetricFilter_disappears
--- PASS: TestAccAWSCloudWatchLogMetricFilter_disappears_logGroup (13.09s)
--- PASS: TestAccAWSCloudWatchLogMetricFilter_disappears (15.38s)
--- PASS: TestAccAWSCloudWatchLogMetricFilter_basic (76.04s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	79.514s
GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSCloudWatchLogMetricFilter_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSCloudWatchLogMetricFilter_ -timeout 180m
=== RUN   TestAccAWSCloudWatchLogMetricFilter_basic
=== PAUSE TestAccAWSCloudWatchLogMetricFilter_basic
=== RUN   TestAccAWSCloudWatchLogMetricFilter_disappears
=== PAUSE TestAccAWSCloudWatchLogMetricFilter_disappears
=== RUN   TestAccAWSCloudWatchLogMetricFilter_disappears_logGroup
=== PAUSE TestAccAWSCloudWatchLogMetricFilter_disappears_logGroup
=== CONT  TestAccAWSCloudWatchLogMetricFilter_basic
=== CONT  TestAccAWSCloudWatchLogMetricFilter_disappears_logGroup
=== CONT  TestAccAWSCloudWatchLogMetricFilter_disappears
--- PASS: TestAccAWSCloudWatchLogMetricFilter_disappears_logGroup (14.44s)
--- PASS: TestAccAWSCloudWatchLogMetricFilter_disappears (16.96s)
--- PASS: TestAccAWSCloudWatchLogMetricFilter_basic (87.24s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	90.376s

@ewbankkit
Copy link
Contributor

@DrFaust92 Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit cb078b6 into hashicorp:main Jun 16, 2021
@github-actions github-actions bot added this to the v3.46.0 milestone Jun 16, 2021
@DrFaust92 DrFaust92 deleted the r/cloudwatchlogs_metric_filter_unit branch June 16, 2021 15:07
@github-actions
Copy link

This functionality has been released in v3.46.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@tdmalone
Copy link
Contributor

Getting spurious diffs from this change in the latest version of the provider:

build	18-Jun-2021 08:33:00	  # aws_cloudwatch_log_metric_filter.functionbeat_ingest_failures["cloudwatch-logs"] will be updated in-place
build	18-Jun-2021 08:33:00	  ~ resource "aws_cloudwatch_log_metric_filter" "functionbeat_ingest_failures"
build	18-Jun-2021 08:33:00	
build	18-Jun-2021 08:33:00	      ~ metric_transformation
build	18-Jun-2021 08:33:00	          + unit          = "None"
build	18-Jun-2021 08:33:00	
build	18-Jun-2021 08:33:00	  # aws_cloudwatch_log_metric_filter.functionbeat_ingest_failures["dlq"] will be updated in-place
build	18-Jun-2021 08:33:00	  ~ resource "aws_cloudwatch_log_metric_filter" "functionbeat_ingest_failures"
build	18-Jun-2021 08:33:00	
build	18-Jun-2021 08:33:00	      ~ metric_transformation
build	18-Jun-2021 08:33:00	          + unit          = "None"
build	18-Jun-2021 08:33:00	
build	18-Jun-2021 08:33:00	  # aws_cloudwatch_log_metric_filter.functionbeat_ingest_failures["sqs"] will be updated in-place
build	18-Jun-2021 08:33:00	  ~ resource "aws_cloudwatch_log_metric_filter" "functionbeat_ingest_failures"
build	18-Jun-2021 08:33:00	
build	18-Jun-2021 08:33:00	      ~ metric_transformation
build	18-Jun-2021 08:33:00	          + unit          = "None"
build	18-Jun-2021 08:33:00	
build	18-Jun-2021 08:33:00	Plan: 0 to add, 3 to change, 0 to destroy.

@ewbankkit
Copy link
Contributor

@tdmalone Applying the planned change should cause no difference in functionality as the API Reference states

If you omit this, the unit is set as None.

Before:

Screen Shot 2021-06-18 at 9 15 01 AM

After:

Screen Shot 2021-06-18 at 9 16 04 AM

Feel free to raise an issue linking to this PR if necessary.
Thanks.

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_cloudwatch_log_metric_filter - missing atribute unit
3 participants