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

[Bug]: Data source aws_networkfirewall_firewall_policy fails if an override action is configured #31088

Closed
dancorne opened this issue May 1, 2023 · 3 comments · Fixed by #31089
Labels
bug Addresses a defect in current functionality. service/networkfirewall Issues and PRs that pertain to the networkfirewall service.
Milestone

Comments

@dancorne
Copy link
Contributor

dancorne commented May 1, 2023

Terraform Core Version

1.4.6

AWS Provider Version

4.65.0

Affected Resource(s)

  • data.aws_networkfirewall_firewall_policy

Expected Behavior

Return data about a network firewall policy, even when a managed rule group override is present

Actual Behavior

An error is raised and the plan/apply fails

Relevant Error/Panic Output Snippet

╷
│ Error: setting firewall_policy: Invalid address to set: []string{"stateful_rule_group_reference", "0", "override"}
│
│   with data.aws_networkfirewall_firewall_policy.test,
│   on main.tf line 17, in data "aws_networkfirewall_firewall_policy" "test":
│   17: data "aws_networkfirewall_firewall_policy" "test" {
│
╵

Terraform Configuration Files

resource "aws_networkfirewall_firewall_policy" "test" {
  name = "example"

  firewall_policy {
    stateless_default_actions          = ["aws:forward_to_sfe"]
    stateless_fragment_default_actions = ["aws:forward_to_sfe"]

    stateful_rule_group_reference {
      resource_arn = "arn:aws:network-firewall:eu-west-1:aws-managed:stateful-rulegroup/MalwareDomainsActionOrder"
      override {
        action = "DROP_TO_ALERT"
      }
    }
  }
}

data "aws_networkfirewall_firewall_policy" "test" {
  name = aws_networkfirewall_firewall_policy.test.name
}

Steps to Reproduce

Using the above configuration, a terraform apply will fail. It'll succeed if the override block is removed.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

Yes

@dancorne dancorne added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels May 1, 2023
@github-actions
Copy link

github-actions bot commented May 1, 2023

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/networkfirewall Issues and PRs that pertain to the networkfirewall service. label May 1, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label May 1, 2023
@github-actions github-actions bot added this to the v4.66.0 milestone May 2, 2023
@github-actions
Copy link

github-actions bot commented May 5, 2023

This functionality has been released in v4.66.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. Thank you!

@github-actions
Copy link

github-actions bot commented Jun 5, 2023

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 5, 2023
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/networkfirewall Issues and PRs that pertain to the networkfirewall service.
Projects
None yet
2 participants