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]: NFW logging config fails when log_type = TLS is added #39197

Closed
sanjeevgopal opened this issue Sep 6, 2024 · 9 comments · Fixed by #40092
Closed

[Bug]: NFW logging config fails when log_type = TLS is added #39197

sanjeevgopal opened this issue Sep 6, 2024 · 9 comments · Fixed by #40092
Labels
bug Addresses a defect in current functionality. service/networkfirewall Issues and PRs that pertain to the networkfirewall service.
Milestone

Comments

@sanjeevgopal
Copy link

sanjeevgopal commented Sep 6, 2024

Terraform Core Version

1.9.5

AWS Provider Version

5.66.0

Affected Resource(s)

  • aws_networkfirewall_logging_configuration

Expected Behavior

When the log_destination_config for TLS is added as below:

    log_destination_config {
      log_destination = {
        logGroup = aws_cloudwatch_log_group.example.name
      }
      log_destination_type = "CloudWatchLogs"
      log_type             = "TLS"
    }

It should get enabled on the NFW.

Actual Behavior

It fails. It works fine with log_type = FLOW or log_type = ALERT, but when the log_type = TLS, it fails.

Relevant Error/Panic Output Snippet

Error: adding NetworkFirewall Logging Configuration (arn:aws:network-firewall:region:account:firewall/example): operation error Network Firewall: UpdateLoggingConfiguration, https response error StatusCode: 400, RequestID: 70670c57-7452-4e4c-9037-b5161c670b99, InvalidRequestException: Given logging configuration attempts to create/modify multiple log destination configs

Terraform Configuration Files

resource "aws_networkfirewall_logging_configuration" "example" {
  firewall_arn = aws_networkfirewall_firewall.example.arn

  logging_configuration {
    log_destination_config {
      log_destination = {
        logGroup = aws_cloudwatch_log_group.example_flow.name
      }
      log_destination_type = "CloudWatchLogs"
      log_type             = "FLOW"
    }
    log_destination_config {
      log_destination = {
        logGroup = aws_cloudwatch_log_group.example_alert.name
      }
      log_destination_type = "CloudWatchLogs"
      log_type             = "ALERT"
    }
    log_destination_config {
      log_destination = {
        logGroup = aws_cloudwatch_log_group.example_tls.name
      }
      log_destination_type = "CloudWatchLogs"
      log_type             = "TLS"
    }
  }
}

Steps to Reproduce

Create log_destination_config for FLOW, ALERT and TLS.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@sanjeevgopal sanjeevgopal added the bug Addresses a defect in current functionality. label Sep 6, 2024
Copy link

github-actions bot commented Sep 6, 2024

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 service/networkfirewall Issues and PRs that pertain to the networkfirewall service. needs-triage Waiting for first response or review from a maintainer. labels Sep 6, 2024
@esim-sa-1ot
Copy link

Same issue in 5.68.0

@michaelm-88
Copy link

any update on this?

@AJD-UK
Copy link

AJD-UK commented Nov 4, 2024

Similar to #38917

@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Nov 4, 2024
@lorodoes
Copy link
Contributor

lorodoes commented Nov 7, 2024

I found the issue. I over looked one line of code during the expansion.
Problem Code

I will see if I can't get a MR up shortly. Sorry for missing this.

lorodoes added a commit to lorodoes/terraform-provider-aws that referenced this issue Nov 12, 2024
…ction and the remove function two allow for more than 2
@lorodoes
Copy link
Contributor

#40092 This PR does have the fix for this issue.

ewbankkit added a commit that referenced this issue Dec 9, 2024
…ng-deleting-more-than-2

#38917 #39197 Fixing the expand function and the remove functi…
Copy link

github-actions bot commented Dec 9, 2024

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.81.0 milestone Dec 9, 2024
Copy link

This functionality has been released in v5.81.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!

Copy link

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 Jan 12, 2025
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
6 participants