Skip to content

r/networkfirewall: add resource_policy resource #16279

Merged
anGie44 merged 7 commits into
masterfrom
f-network-firewall-resource-policy
Nov 25, 2020
Merged

r/networkfirewall: add resource_policy resource #16279
anGie44 merged 7 commits into
masterfrom
f-network-firewall-resource-policy

Conversation

@anGie44

@anGie44 anGie44 commented Nov 18, 2020

Copy link
Copy Markdown
Contributor

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" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #16292

Release note for CHANGELOG:

resource/networkfirewall_resource_policy: new resource 

Output from acceptance testing:

--- PASS: TestAccAwsNetworkFirewallResourcePolicy_firewallPolicy (154.23s)
--- PASS: TestAccAwsNetworkFirewallResourcePolicy_ruleGroup (157.33s)
--- PASS: TestAccAwsNetworkFirewallResourcePolicy_disappears (158.20s)
--- PASS: TestAccAwsNetworkFirewallResourcePolicy_firewallPolicy_disappears (142.83s)
--- PASS: TestAccAwsNetworkFirewallResourcePolicy_ruleGroup_disappears (137.75s)

@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. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 18, 2020
@anGie44 anGie44 force-pushed the f-network-firewall-resource-policy branch from a565658 to 7e52ea0 Compare November 18, 2020 15:35
@anGie44 anGie44 force-pushed the f-network-firewall-resource-policy branch from 7e52ea0 to fa1c4b7 Compare November 18, 2020 15:40
@anGie44 anGie44 force-pushed the f-network-firewall-resource-policy branch from 24584fc to 66063dd Compare November 18, 2020 16:05
@bflad bflad added new-resource Introduces a new resource. service/networkfirewall Issues and PRs that pertain to the networkfirewall service. labels Nov 18, 2020
@bflad bflad added this to the v3.17.0 milestone Nov 19, 2020
@bflad bflad self-assigned this Nov 19, 2020
@anGie44 anGie44 force-pushed the f-network-firewall-resource-policy branch from 6bfbebe to 14dca56 Compare November 23, 2020 15:06
@anGie44 anGie44 marked this pull request as ready for review November 23, 2020 18:45
@anGie44 anGie44 requested a review from a team as a code owner November 23, 2020 18:45
@anGie44 anGie44 force-pushed the f-network-firewall-resource-policy branch 2 times, most recently from 29738f9 to 94d6667 Compare November 23, 2020 21:30
@bflad bflad modified the milestones: v3.17.0, v3.18.0 Nov 23, 2020
@anGie44 anGie44 force-pushed the f-network-firewall-resource-policy branch 6 times, most recently from 93e9ced to f740a15 Compare November 24, 2020 20:42
@anGie44 anGie44 force-pushed the f-network-firewall-resource-policy branch from f740a15 to b1550e9 Compare November 24, 2020 20:44
@anGie44

anGie44 commented Nov 24, 2020

Copy link
Copy Markdown
Contributor Author

@bflad ready for your review 👍 (i omitted the partition checks for the moment but can add them back in)

@bflad bflad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! Just two minor documentation bits since I think the principal has to be the root account ARNs. 🚀

Output from acceptance testing:

--- PASS: TestAccAwsNetworkFirewallResourcePolicy_disappears (179.38s)
--- PASS: TestAccAwsNetworkFirewallResourcePolicy_firewallPolicy (180.55s)
--- PASS: TestAccAwsNetworkFirewallResourcePolicy_ruleGroup (180.61s)
--- PASS: TestAccAwsNetworkFirewallResourcePolicy_ruleGroup_disappears (188.31s)
--- PASS: TestAccAwsNetworkFirewallResourcePolicy_firewallPolicy_disappears (189.13s)

Comment thread website/docs/r/networkfirewall_resource_policy.html.markdown Outdated
Comment thread website/docs/r/networkfirewall_resource_policy.html.markdown Outdated

* `policy` - (Required) JSON formatted policy document that controls access to the Network Firewall resource. The policy must be provided **without whitespaces**. It is recommended to use [jsonencode](https://www.terraform.io/docs/configuration/functions/jsonencode.html) for formatting as seen in the examples above. For more details, including available policy statement Actions, see the [Policy](https://docs.aws.amazon.com/network-firewall/latest/APIReference/API_PutResourcePolicy.html#API_PutResourcePolicy_RequestSyntax) parameter in the AWS API documentation.

* `resource_arn` - (Required, Forces new resource) The Amazon Resource Name (ARN) of the rule group or firewall policy.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Still find it confusing the API documentation says the wrong thing 😂

anGie44 and others added 2 commits November 25, 2020 11:18
Co-authored-by: Brian Flad <bflad417@gmail.com>
Co-authored-by: Brian Flad <bflad417@gmail.com>
@anGie44 anGie44 merged commit 4edfa56 into master Nov 25, 2020
@anGie44 anGie44 deleted the f-network-firewall-resource-policy branch November 25, 2020 16:26
anGie44 added a commit that referenced this pull request Nov 25, 2020
@ghost

ghost commented Nov 25, 2020

Copy link
Copy Markdown

This has been released in version 3.18.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

ghost commented Dec 25, 2020

Copy link
Copy Markdown

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 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/networkfirewall Issues and PRs that pertain to the networkfirewall 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.

Support for AWS Network Firewall Resource Policy

3 participants