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

service/networkfirewall: Investigate Tags Field in Describe API Calls #16300

Closed
bflad opened this issue Nov 19, 2020 · 3 comments · Fixed by #16313
Closed

service/networkfirewall: Investigate Tags Field in Describe API Calls #16300

bflad opened this issue Nov 19, 2020 · 3 comments · Fixed by #16313
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/networkfirewall Issues and PRs that pertain to the networkfirewall service.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Nov 19, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

The general availability release of the Network Firewall APIs includes a Tags field in the following API calls:

This may allow us to remove the extra ListTagsForResource calls in the resources that support resource tagging.

Affected Resource(s)

  • aws_networkfirewall_firewall
  • aws_networkfirewall_firewall_policy
  • aws_networkfirewall_rule_group

Potential Terraform Code

// Replace

tags, err := keyvaluetags.NetworkfirewallListTags(conn, arn)
if err != nil {
	return diag.FromErr(fmt.Errorf("error listing tags for NetworkFirewall Firewall (%s): %w", arn, err))
}

if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil {
	return diag.FromErr(fmt.Errorf("error setting tags: %w", err))
}

// With

if err := d.Set("tags", keyvaluetags.NetworkfirewallKeyValueTags(resp.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil {
	return diag.FromErr(fmt.Errorf("error setting tags: %w", err))
}

References

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/networkfirewall Issues and PRs that pertain to the networkfirewall service. labels Nov 19, 2020
@anGie44 anGie44 added this to the v3.17.0 milestone Nov 20, 2020
@anGie44
Copy link
Contributor

anGie44 commented Nov 20, 2020

This enhancement has been merged and will release with v3.17.0 of the Terraform AWS provider, likely out on Thurs.

@ghost
Copy link

ghost commented Nov 24, 2020

This has been released in version 3.17.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 Dec 20, 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 as resolved and limited conversation to collaborators Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/networkfirewall Issues and PRs that pertain to the networkfirewall service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants