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 Tag Support to Resource Group Resource #10640

Merged
merged 11 commits into from
Nov 19, 2019

Conversation

DrFaust92
Copy link
Collaborator

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Closes #7109

Release note for CHANGELOG:

- resource/resource_aws_resourcegroups_group: Add `tags` argument.

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSResourceGroup_'

=== RUN   TestAccAWSResourceGroup_basic
=== PAUSE TestAccAWSResourceGroup_basic
=== CONT  TestAccAWSResourceGroup_basic
--- PASS: TestAccAWSResourceGroup_basic (85.00s)
=== RUN   TestAccAWSResourceGroup_tags
=== PAUSE TestAccAWSResourceGroup_tags
=== CONT  TestAccAWSResourceGroup_tags
--- PASS: TestAccAWSResourceGroup_tags (114.05s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	139.697s

...

I saw that there is pending PR for this #7811 which i only realised only after i was done with this.
this refactors the tests as well as uses the keyvaluetags lib

@DrFaust92 DrFaust92 requested a review from a team October 25, 2019 19:12
@ghost ghost added size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/resourcegroups Issues and PRs that pertain to the resourcegroups service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 25, 2019
@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 2, 2019
@bflad
Copy link
Contributor

bflad commented Nov 2, 2019

Hi @DrFaust92 👋 Thanks for submitting this one as well.

Looks like there's a bit of a backlog for adding tagging for this resource. The maintainers prefer working with contributions in their submission order to be fair to contributors. In this case, that means we should try working with the original author (even before #7811 there is #7774) to either help review their contribution, asking them to close their contribution, or if they are unresponsive to submit a fix on top of their commits unless they close their pull request so they receive contributing credit.

Before we even go through that though, it might be best to get the keyvaluetags updates submitted separately since they appear to be in merge conflict already in this pull request. To prevent this situation as well as help human readers, we would encourage alphabetizing additions to switch statements and import declarations.

Please reach out with any questions.

@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Nov 2, 2019
@DrFaust92
Copy link
Collaborator Author

@bflad, ill open up a separate PR for the keyvaluetags change for this resource and reach out to other contributors for this.
ill keep this open for now and close if the change will be merged to another PR
thanks!

@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Nov 2, 2019
@DrFaust92
Copy link
Collaborator Author

fixed merge conflicts

$ make testacc TESTARGS='-run=TestAccAWSResourceGroup_'

=== RUN   TestAccAWSResourceGroup_basic
=== PAUSE TestAccAWSResourceGroup_basic
=== CONT  TestAccAWSResourceGroup_basic
--- PASS: TestAccAWSResourceGroup_basic (67.41s)
=== RUN   TestAccAWSResourceGroup_tags
=== PAUSE TestAccAWSResourceGroup_tags
=== CONT  TestAccAWSResourceGroup_tags
--- PASS: TestAccAWSResourceGroup_tags (94.25s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	181.002s

@rsareth
Copy link

rsareth commented Nov 18, 2019

Please, merge it!

Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @DrFaust92 🚀

Output from acceptance testing:

--- PASS: TestAccAWSResourceGroup_basic (14.51s)
--- PASS: TestAccAWSResourceGroup_tags (20.03s)

var v resourcegroups.Group
resourceName := "aws_resourcegroups_group.test"
n := fmt.Sprintf("test-group-%d", acctest.RandInt())
desc1 := "Hello World"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: This acceptance testing does not need to verify anything with this attribute, so it should omitted or hardcoded in the test configurations.


resource_query {
query = <<JSON
%s
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: We prefer to hardcode values like these into the test configurations so they can more easily be copy-pasted for manual Terraform CLI usage.

@bflad bflad added this to the v2.39.0 milestone Nov 19, 2019
@bflad bflad merged commit 9f34ebf into hashicorp:master Nov 19, 2019
bflad added a commit that referenced this pull request Nov 19, 2019
bflad added a commit that referenced this pull request Nov 19, 2019
@ghost
Copy link

ghost commented Nov 21, 2019

This has been released in version 2.39.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 for triage. Thanks!

@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
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/resourcegroups Issues and PRs that pertain to the resourcegroups service. 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.

Support resource tags for aws_resourcegroups_group resource
3 participants