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

[Proof of Concept] provider: Ignore tags implementation #10418

Merged
merged 9 commits into from
Oct 31, 2019
Merged

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Oct 7, 2019

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

Reference: #7926

Release note for CHANGELOG:

NOTES

* provider: New `ignore_tag_prefixes` and `ignore_tags` arguments are being tested as a public preview for ignoring tags across all resources under a provider. Support for the functionality must be added to individual resources in the codebase and is only implemented for the `aws_subnet` and `aws_vpc` resources at this time. Until a general availability announcement, no compatibility promises are made with these provider arguments and their functionality.

ENHANCEMENTS

* provider: Add `ignore_tag_prefixes` and `ignore_tags` arguments (in public preview, see note above)
* resource/aws_subnet: Support provider-wide ignore tags (in public preview, see note above)
* resource/aws_vpc: Support provider-wide ignore tags (in public preview, see note above)

Creates new ignore_tag_prefixes and ignore_tags provider arguments, that wire into the AWSClient struct provided to all provider resources. This can be used to ignore certain tag keys and tag key prefixes across all resources of the provider, once the resource implements support. Includes aws_subnet and aws_vpc resources.

Output from acceptance testing:

--- PASS: TestAccAWSProvider_IgnoreTags_None (2.47s)
--- PASS: TestAccAWSProvider_IgnoreTagPrefixes_None (2.48s)
--- PASS: TestAccAWSProvider_IgnoreTags_One (2.48s)
--- PASS: TestAccAWSProvider_IgnoreTags_Multiple (2.49s)
--- PASS: TestAccAWSProvider_IgnoreTagPrefixes_One (2.49s)
--- PASS: TestAccAWSProvider_IgnoreTagPrefixes_Multiple (2.49s)

--- PASS: TestAccAWSVpc_tags (42.94s)
--- PASS: TestAccAWSVpc_ignoreTags (43.14s)

--- PASS: TestAccAWSSubnet_basic (26.18s)
--- PASS: TestAccAWSSubnet_ignoreTags (50.24s)

@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Oct 7, 2019
@bflad bflad requested a review from a team October 7, 2019 20:11
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Oct 7, 2019
@bflad bflad changed the title provider: Ignore tags proof of concept implementation [Proof of Concept] provider: Ignore tags implementation Oct 7, 2019
Reference: #7926

Creates a new `ignore_tags` provider configuration, that wires into the `AWSClient` struct provided to all provider resources. This can be used to ignore certain tag keys across all resources of the provider, once the resource implements support.

Output from acceptance testing:

```
--- PASS: TestAccAWSProvider_IgnoreTags_One (3.70s)
--- PASS: TestAccAWSProvider_IgnoreTags_Multiple (3.71s)
--- PASS: TestAccAWSProvider_IgnoreTags_None (3.71s)
```
Reference: #7926

Output from acceptance testing:

```
--- PASS: TestAccAWSVpc_ignoreTags (31.81s)
--- PASS: TestAccAWSVpc_tags (43.32s)
```
Reference: #7926

Output from acceptance testing:

```
--- PASS: TestAccAWSProvider_IgnoreTagPrefixes_Multiple (3.96s)
--- PASS: TestAccAWSProvider_IgnoreTagPrefixes_None (4.03s)
--- PASS: TestAccAWSProvider_IgnoreTagPrefixes_One (4.09s)
```
Reference: #7926

Output from acceptance testing:

```
--- PASS: TestAccAWSVpc_tags (41.30s)
--- PASS: TestAccAWSVpc_ignoreTags (43.12s)
```
…eckVpcUpdateTags for clarity

Output from acceptance testing:

```
--- PASS: TestAccAWSVpc_tags (42.94s)
--- PASS: TestAccAWSVpc_ignoreTags (43.14s)
```
…efixes support

Reference: #7926

Output from acceptance testing:

```
--- PASS: TestAccAWSSubnet_basic (26.18s)
--- PASS: TestAccAWSSubnet_ignoreTags (50.24s)
```
@bflad
Copy link
Contributor Author

bflad commented Oct 25, 2019

Rebased against master, added aws_subnet resource, re-verified:

--- PASS: TestAccAWSProvider_IgnoreTags_None (2.47s)
--- PASS: TestAccAWSProvider_IgnoreTagPrefixes_None (2.48s)
--- PASS: TestAccAWSProvider_IgnoreTags_One (2.48s)
--- PASS: TestAccAWSProvider_IgnoreTags_Multiple (2.49s)
--- PASS: TestAccAWSProvider_IgnoreTagPrefixes_One (2.49s)
--- PASS: TestAccAWSProvider_IgnoreTagPrefixes_Multiple (2.49s)

--- PASS: TestAccAWSVpc_tags (42.94s)
--- PASS: TestAccAWSVpc_ignoreTags (43.14s)

--- PASS: TestAccAWSSubnet_basic (26.18s)
--- PASS: TestAccAWSSubnet_ignoreTags (50.24s)

Copy link
Contributor

@ryndaniels ryndaniels left a comment

Choose a reason for hiding this comment

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

🚀 from what I can tell!

--- PASS: TestAccAWSProvider_IgnoreTagPrefixes_One (5.36s)
--- PASS: TestAccAWSProvider_IgnoreTagPrefixes_Multiple (5.56s)
--- PASS: TestAccAWSProvider_IgnoreTags_None (5.55s)
--- PASS: TestAccAWSProvider_IgnoreTags_Multiple (5.61s)
--- PASS: TestAccAWSProvider_IgnoreTagPrefixes_None (5.60s)
--- PASS: TestAccAWSProvider_IgnoreTags_One (5.59s)

--- PASS: TestAccAWSVpc_tags (16.11s)
--- PASS: TestAccAWSVpc_ignoreTags (16.32s)

--- PASS: TestAccAWSSubnet_basic (9.88s)
--- PASS: TestAccAWSSubnet_ignoreTags (17.18s)

@bflad bflad added this to the v2.35.0 milestone Oct 31, 2019
@bflad bflad merged commit 1882316 into master Oct 31, 2019
@bflad bflad deleted the f-ignore_tags-poc branch October 31, 2019 19:07
bflad added a commit that referenced this pull request Oct 31, 2019
@ghost
Copy link

ghost commented Nov 7, 2019

This has been released in version 2.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 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. provider Pertains to the provider itself, rather than any interaction with AWS. service/ec2 Issues and PRs that pertain to the ec2 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.

2 participants