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

Add log group arn to aws prometheus workspace 26444 #27213

Merged

Conversation

nclaeys
Copy link
Contributor

@nclaeys nclaeys commented Oct 12, 2022

Description

Add cloudwatch_log_group_arn to aws_prometheus_workspace resource.

I did not add log_level as an extra property as it does not exist in the API and it only indicates whether the logging configuration is enabled or not. In my opinion it is clearer to leave it out for now.

For the log_group_arn configuration I use the same contract as the API call, which requires users to add ':*' to the log_group_arn (see tests for more details). I did not want to abstract this away by adding extra logic to the terraform provider.

Relations

Closes #26444.

References

Output from Acceptance Testing

$ make testacc TESTS='TestAccAMPWorkspace_' PKG=amp
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/amp/... -v -count 1 -parallel 20 -run='TestAccAMPWorkspace_'  -timeout 180m
=== RUN   TestAccAMPWorkspace_basic
=== PAUSE TestAccAMPWorkspace_basic
=== RUN   TestAccAMPWorkspace_disappears
=== PAUSE TestAccAMPWorkspace_disappears
=== RUN   TestAccAMPWorkspace_tags
=== PAUSE TestAccAMPWorkspace_tags
=== RUN   TestAccAMPWorkspace_loggingConfiguration
=== PAUSE TestAccAMPWorkspace_loggingConfiguration
=== CONT  TestAccAMPWorkspace_basic
=== CONT  TestAccAMPWorkspace_tags
=== CONT  TestAccAMPWorkspace_disappears
=== CONT  TestAccAMPWorkspace_loggingConfiguration
--- PASS: TestAccAMPWorkspace_disappears (32.82s)
--- PASS: TestAccAMPWorkspace_loggingConfiguration (78.29s)
--- PASS: TestAccAMPWorkspace_basic (99.32s)
--- PASS: TestAccAMPWorkspace_tags (130.77s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/amp	130.844s

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/amp Issues and PRs that pertain to the amp service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. size/M Managed by automation to categorize the size of a PR. labels Oct 12, 2022
@github-actions
Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions
Copy link

Thank you for your contribution! 🚀

Please note that the CHANGELOG.md file contents are handled by the maintainers during merge. This is to prevent pull request merge conflicts, especially for contributions which may not be merged immediately. Please see the Contributing Guide for additional pull request review items.

Remove any changes to the CHANGELOG.md file and commit them in this pull request to prevent delays with reviewing and potentially merging this pull request.

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 @nclaeys 👋

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 CONTRIBUTOR 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! 😃

@github-actions github-actions bot removed provider Pertains to the provider itself, rather than any interaction with AWS. documentation Introduces or discusses updates to documentation. labels Oct 12, 2022
@nclaeys nclaeys changed the title Feature aws prometheus workspace changes 26444 Add log group arn to aws prometheus workspace 26444 Oct 12, 2022
@breathingdust breathingdust added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Oct 13, 2022
@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. size/XL Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Oct 13, 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=TestAccAMP' PKG=amp ACCTEST_PARALLELISM=3 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/amp/... -v -count 1 -parallel 3  -run=TestAccAMP -timeout 180m
=== RUN   TestAccAMPAlertManagerDefinition_basic
=== PAUSE TestAccAMPAlertManagerDefinition_basic
=== RUN   TestAccAMPAlertManagerDefinition_disappears
=== PAUSE TestAccAMPAlertManagerDefinition_disappears
=== RUN   TestAccAMPRuleGroupNamespace_basic
=== PAUSE TestAccAMPRuleGroupNamespace_basic
=== RUN   TestAccAMPRuleGroupNamespace_disappears
=== PAUSE TestAccAMPRuleGroupNamespace_disappears
=== RUN   TestAccAMPWorkspaceDataSource_basic
--- PASS: TestAccAMPWorkspaceDataSource_basic (20.68s)
=== RUN   TestAccAMPWorkspace_basic
=== PAUSE TestAccAMPWorkspace_basic
=== RUN   TestAccAMPWorkspace_disappears
=== PAUSE TestAccAMPWorkspace_disappears
=== RUN   TestAccAMPWorkspace_tags
=== PAUSE TestAccAMPWorkspace_tags
=== RUN   TestAccAMPWorkspace_alias
=== PAUSE TestAccAMPWorkspace_alias
=== RUN   TestAccAMPWorkspace_loggingConfiguration
=== PAUSE TestAccAMPWorkspace_loggingConfiguration
=== CONT  TestAccAMPAlertManagerDefinition_basic
=== CONT  TestAccAMPWorkspace_disappears
=== CONT  TestAccAMPWorkspace_alias
=== CONT  TestAccAMPWorkspace_loggingConfiguration
--- PASS: TestAccAMPWorkspace_disappears (24.29s)
--- PASS: TestAccAMPWorkspace_alias (70.35s)
=== CONT  TestAccAMPWorkspace_tags
--- PASS: TestAccAMPWorkspace_loggingConfiguration (56.39s)
=== CONT  TestAccAMPRuleGroupNamespace_disappears
--- PASS: TestAccAMPWorkspace_tags (52.22s)
=== CONT  TestAccAMPRuleGroupNamespace_basic
--- PASS: TestAccAMPRuleGroupNamespace_disappears (108.15s)
=== CONT  TestAccAMPAlertManagerDefinition_disappears
--- PASS: TestAccAMPAlertManagerDefinition_basic (264.60s)
=== CONT  TestAccAMPWorkspace_basic
--- PASS: TestAccAMPWorkspace_basic (22.68s)
--- PASS: TestAccAMPAlertManagerDefinition_disappears (99.33s)
--- PASS: TestAccAMPRuleGroupNamespace_basic (255.48s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/amp	402.996s

@ewbankkit
Copy link
Contributor

@nclaeys Thanks for the contribution 🎉 👏.
To match the underlying AWS API I changed the new arguments to a block named logging_configuration with an attribute log_group_arn.

@ewbankkit ewbankkit merged commit 25aedf9 into hashicorp:main Oct 13, 2022
@github-actions github-actions bot added this to the v4.35.0 milestone Oct 13, 2022
@github-actions
Copy link

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

@nclaeys nclaeys deleted the f-aws_prometheus_workspace_change26444 branch November 8, 2022 07:47
@github-actions
Copy link

github-actions bot commented Dec 9, 2022

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 Dec 9, 2022
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. service/amp Issues and PRs that pertain to the amp 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.

Add logging configuration to Prometheus
3 participants