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/aws_cloudwatch_metric_stream support statistics_configurations resource #24882

Merged

Conversation

mcgealy
Copy link
Contributor

@mcgealy mcgealy commented May 19, 2022

AWS CloudWatch Metric Streams recently added support for streaming additional statistics of metrics: https://aws.amazon.com/about-aws/whats-new/2022/04/amazon-cloudwatch-metric-streams-additional-statistics/

This PR adds support for this new feature by implementing the statistics_configurations field and it's nested fields for Metric Stream resources.

Closes #24716.

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

Output from acceptance testing:

$ make testacc TESTS=TestAccCloudWatchMetricStream_additional_statistics PKG=cloudwatch
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cloudwatch/... -v -count 1 -parallel 20 -run='TestAccCloudWatchMetricStream_additional_statistics'  -timeout 180m
go: downloading github.com/aws/aws-sdk-go v1.44.15
=== RUN   TestAccCloudWatchMetricStream_additional_statistics
=== PAUSE TestAccCloudWatchMetricStream_additional_statistics
=== CONT  TestAccCloudWatchMetricStream_additional_statistics
--- PASS: TestAccCloudWatchMetricStream_additional_statistics (59.41s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/cloudwatch	63.531s
...

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/cloudwatch Issues and PRs that pertain to the cloudwatch service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels May 19, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @mcgealy 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@mcgealy mcgealy marked this pull request as ready for review May 19, 2022 17:22
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label May 19, 2022
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 🚀.

% make testacc TESTARGS='-run=TestAccCloudWatchMetricStream_' PKG=cloudwatch ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cloudwatch/... -v -count 1 -parallel 2  -run=TestAccCloudWatchMetricStream_ -timeout 180m
=== RUN   TestAccCloudWatchMetricStream_basic
=== PAUSE TestAccCloudWatchMetricStream_basic
=== RUN   TestAccCloudWatchMetricStream_noName
=== PAUSE TestAccCloudWatchMetricStream_noName
=== RUN   TestAccCloudWatchMetricStream_namePrefix
=== PAUSE TestAccCloudWatchMetricStream_namePrefix
=== RUN   TestAccCloudWatchMetricStream_includeFilters
=== PAUSE TestAccCloudWatchMetricStream_includeFilters
=== RUN   TestAccCloudWatchMetricStream_excludeFilters
=== PAUSE TestAccCloudWatchMetricStream_excludeFilters
=== RUN   TestAccCloudWatchMetricStream_update
=== PAUSE TestAccCloudWatchMetricStream_update
=== RUN   TestAccCloudWatchMetricStream_updateName
=== PAUSE TestAccCloudWatchMetricStream_updateName
=== RUN   TestAccCloudWatchMetricStream_tags
=== PAUSE TestAccCloudWatchMetricStream_tags
=== RUN   TestAccCloudWatchMetricStream_additional_statistics
=== PAUSE TestAccCloudWatchMetricStream_additional_statistics
=== CONT  TestAccCloudWatchMetricStream_basic
=== CONT  TestAccCloudWatchMetricStream_update
--- PASS: TestAccCloudWatchMetricStream_basic (104.42s)
=== CONT  TestAccCloudWatchMetricStream_tags
--- PASS: TestAccCloudWatchMetricStream_tags (16.53s)
=== CONT  TestAccCloudWatchMetricStream_additional_statistics
--- PASS: TestAccCloudWatchMetricStream_update (122.33s)
=== CONT  TestAccCloudWatchMetricStream_includeFilters
--- PASS: TestAccCloudWatchMetricStream_includeFilters (16.96s)
=== CONT  TestAccCloudWatchMetricStream_excludeFilters
--- PASS: TestAccCloudWatchMetricStream_excludeFilters (17.86s)
=== CONT  TestAccCloudWatchMetricStream_updateName
--- PASS: TestAccCloudWatchMetricStream_additional_statistics (59.49s)
=== CONT  TestAccCloudWatchMetricStream_namePrefix
--- PASS: TestAccCloudWatchMetricStream_namePrefix (17.09s)
=== CONT  TestAccCloudWatchMetricStream_noName
--- PASS: TestAccCloudWatchMetricStream_noName (18.89s)
--- PASS: TestAccCloudWatchMetricStream_updateName (212.42s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/cloudwatch	373.628s

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels May 24, 2022
@ewbankkit
Copy link
Contributor

@mcgealy Thanks for the contribution 🎉 👏.

Overall everything was great.
I renamed statistics_configurations to statistics_configuration and include_metrics to include_metric to better match nested block usage and added an example to the documentation.

@ewbankkit
Copy link
Contributor

% make providerlint && make golangci-lint
==> Checking source code with providerlint...
==> Checking source code with golangci-lint...

@ewbankkit ewbankkit merged commit 8a01f81 into hashicorp:main May 24, 2022
@github-actions github-actions bot added this to the v4.16.0 milestone May 24, 2022
@github-actions
Copy link

This functionality has been released in v4.16.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!

@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 Jun 28, 2022
@justinretzolk justinretzolk added the partner Contribution from a partner. label May 16, 2024
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. partner Contribution from a partner. service/cloudwatch Issues and PRs that pertain to the cloudwatch service. size/XL 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.

Feature Request: add support for StatisticsConfigurations for aws_cloudwatch_metric_stream
3 participants