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

Fix diffTags to actually create a diff instead of unnecessarily recre… #6370

Merged
merged 3 commits into from
Nov 8, 2018

Conversation

fbreckle
Copy link
Contributor

@fbreckle fbreckle commented Nov 6, 2018

…ating existing tags.

Solves Issue #6363

Changes proposed in this pull request:

Modify diffTags to behave as explained in its comment:

// diffTags takes our tags locally and the ones remotely and returns
// the set of tags that must be created, and the set of tags that must
// be destroyed.

Many similar functions exist for other aws elements, which all seem to have the same erroneous behavior and can be fixed analogously.

@ghost ghost added the size/S Managed by automation to categorize the size of a PR. label Nov 6, 2018
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.

Thanks for submitting this, @fbreckle! Could you adding a covering unit test in TestDiffTags?

https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/tags_test.go#L14

@bflad bflad added waiting-response Maintainers are waiting on response from community or contributor. service/ec2 Issues and PRs that pertain to the ec2 service. labels Nov 6, 2018
@ghost ghost added size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. and removed size/S Managed by automation to categorize the size of a PR. labels Nov 7, 2018
@fbreckle
Copy link
Contributor Author

fbreckle commented Nov 7, 2018

done!

@bflad bflad added bug Addresses a defect in current functionality. and removed waiting-response Maintainers are waiting on response from community or contributor. labels Nov 8, 2018
@bflad bflad added this to the v1.43.1 milestone Nov 8, 2018
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.

Thanks so much, @fbreckle! In doing my pre-merge sweep of existing PRs I caught #5108 which is also doing a similar update as this PR. To be fair to both your contributions, I'm pulling in the #5108 code and this PR's additional testing. LGTM after acceptance testing this against a few of our EC2 resource tests. 🚀

@bflad bflad merged commit de20326 into hashicorp:master Nov 8, 2018
bflad added a commit that referenced this pull request Nov 8, 2018
@bflad
Copy link
Contributor

bflad commented Nov 9, 2018

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

@ghost
Copy link

ghost commented Apr 2, 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 Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. size/M 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.

2 participants