-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
#38917 #39197 Fixing the expand function and the remove functi… #40092
#38917 #39197 Fixing the expand function and the remove functi… #40092
Conversation
…ction and the remove function two allow for more than 2
Community NoteVoting for Prioritization
For Submitters
|
Fixed the expand function and the remove function to make sure it can remove 1-3 configurations. This is currently the best way since the only way to create each log configuration is create one at a time. You can't do it in one request. Each log configuration has to be it's own request and they have to be done all together at one time. If someone at AWS want's a feedback, there has to be a better way to handle this via API. |
|
…configuration.log_destination_config.log_type values.
…lls to 'UpdateLoggingConfiguration'.
…tions: Test with 3 LogDestinationConfigs.
@ewbankkit during development I did get an error once where the Logging config couldn't be applied because the NetworkFirewall was created via the AWS console and the console showed that it created with an arn and everything but was in a pending state and had never been marked as Available. I know terraform waits till the network firewall is fully complete before it moves on, but I was wondering if adding in a catch for that type of error and a retry might be appropriate? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% ACCTEST_TIMEOUT=720m make testacc TESTARGS='-run=TestAccNetworkFirewallLoggingConfiguration_' PKG=networkfirewall ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/networkfirewall/... -v -count 1 -parallel 3 -run=TestAccNetworkFirewallLoggingConfiguration_ -timeout 720m
2024/12/09 08:50:35 Initializing Terraform AWS Provider...
=== RUN TestAccNetworkFirewallLoggingConfiguration_CloudWatchLogDestination_logGroup
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_CloudWatchLogDestination_logGroup
=== RUN TestAccNetworkFirewallLoggingConfiguration_CloudWatchLogDestination_logType
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_CloudWatchLogDestination_logType
=== RUN TestAccNetworkFirewallLoggingConfiguration_KinesisLogDestination_deliveryStream
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_KinesisLogDestination_deliveryStream
=== RUN TestAccNetworkFirewallLoggingConfiguration_KinesisLogDestination_logType
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_KinesisLogDestination_logType
=== RUN TestAccNetworkFirewallLoggingConfiguration_S3LogDestination_bucketName
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_S3LogDestination_bucketName
=== RUN TestAccNetworkFirewallLoggingConfiguration_S3LogDestination_logType
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_S3LogDestination_logType
=== RUN TestAccNetworkFirewallLoggingConfiguration_S3LogDestination_prefix
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_S3LogDestination_prefix
=== RUN TestAccNetworkFirewallLoggingConfiguration_updateFirewallARN
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_updateFirewallARN
=== RUN TestAccNetworkFirewallLoggingConfiguration_updateLogDestinationType
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_updateLogDestinationType
=== RUN TestAccNetworkFirewallLoggingConfiguration_updateToMultipleLogDestinations
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_updateToMultipleLogDestinations
=== RUN TestAccNetworkFirewallLoggingConfiguration_updateToSingleAlertTypeLogDestination
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_updateToSingleAlertTypeLogDestination
=== RUN TestAccNetworkFirewallLoggingConfiguration_updateToSingleFlowTypeLogDestination
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_updateToSingleFlowTypeLogDestination
=== RUN TestAccNetworkFirewallLoggingConfiguration_updateToSingleTLSTypeLogDestination
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_updateToSingleTLSTypeLogDestination
=== RUN TestAccNetworkFirewallLoggingConfiguration_disappears
=== PAUSE TestAccNetworkFirewallLoggingConfiguration_disappears
=== CONT TestAccNetworkFirewallLoggingConfiguration_CloudWatchLogDestination_logGroup
=== CONT TestAccNetworkFirewallLoggingConfiguration_updateFirewallARN
=== CONT TestAccNetworkFirewallLoggingConfiguration_S3LogDestination_bucketName
--- PASS: TestAccNetworkFirewallLoggingConfiguration_CloudWatchLogDestination_logGroup (478.56s)
=== CONT TestAccNetworkFirewallLoggingConfiguration_KinesisLogDestination_deliveryStream
--- PASS: TestAccNetworkFirewallLoggingConfiguration_S3LogDestination_bucketName (486.23s)
=== CONT TestAccNetworkFirewallLoggingConfiguration_KinesisLogDestination_logType
--- PASS: TestAccNetworkFirewallLoggingConfiguration_KinesisLogDestination_deliveryStream (479.44s)
=== CONT TestAccNetworkFirewallLoggingConfiguration_updateToSingleFlowTypeLogDestination
--- PASS: TestAccNetworkFirewallLoggingConfiguration_KinesisLogDestination_logType (480.44s)
=== CONT TestAccNetworkFirewallLoggingConfiguration_disappears
--- PASS: TestAccNetworkFirewallLoggingConfiguration_updateFirewallARN (978.78s)
=== CONT TestAccNetworkFirewallLoggingConfiguration_updateToSingleTLSTypeLogDestination
--- PASS: TestAccNetworkFirewallLoggingConfiguration_updateToSingleFlowTypeLogDestination (405.82s)
=== CONT TestAccNetworkFirewallLoggingConfiguration_updateToMultipleLogDestinations
--- PASS: TestAccNetworkFirewallLoggingConfiguration_disappears (439.36s)
=== CONT TestAccNetworkFirewallLoggingConfiguration_updateToSingleAlertTypeLogDestination
--- PASS: TestAccNetworkFirewallLoggingConfiguration_updateToSingleTLSTypeLogDestination (460.82s)
=== CONT TestAccNetworkFirewallLoggingConfiguration_updateLogDestinationType
--- PASS: TestAccNetworkFirewallLoggingConfiguration_updateToSingleAlertTypeLogDestination (154.67s)
=== CONT TestAccNetworkFirewallLoggingConfiguration_S3LogDestination_prefix
--- PASS: TestAccNetworkFirewallLoggingConfiguration_updateToMultipleLogDestinations (300.86s)
=== CONT TestAccNetworkFirewallLoggingConfiguration_S3LogDestination_logType
--- PASS: TestAccNetworkFirewallLoggingConfiguration_updateLogDestinationType (528.72s)
=== CONT TestAccNetworkFirewallLoggingConfiguration_CloudWatchLogDestination_logType
--- PASS: TestAccNetworkFirewallLoggingConfiguration_S3LogDestination_prefix (463.91s)
--- PASS: TestAccNetworkFirewallLoggingConfiguration_S3LogDestination_logType (480.25s)
--- PASS: TestAccNetworkFirewallLoggingConfiguration_CloudWatchLogDestination_logType (502.87s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/networkfirewall 2476.414s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
@lorodoes Thanks for the contribution 🎉 👏. |
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! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
#38917 #39197 Fix bug in Network Firewall configuration. Only two entries would ever work due to a missed count check in the expandconfiguration function.
Relations
Closes #39197.
Closes #38917.
Relates #38824.
References
https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection-logging.html
Output from Acceptance Testing