terraform-aws-vpc
terraform-aws-vpc copied to clipboard
Fix: flow log warning issue
Description: This PR addresses the warning related to an invalid attribute combination in the aws_s3_bucket_lifecycle_configuration resource within the flow_logs module. The warning states that no attribute has been specified, while one (and only one) of [rule[0].prefix.<.filter] is required.
Changes Made: • Updated the aws_s3_bucket_lifecycle_configuration resource in flow log's main.tf to explicitly define the required attribute (prefix or filter).
Fixes: #166
Hello thank you for raising issue #167 and for providing a suggested fix. For now I think we will hold and monitor. I believe this was caused by an unintended issue in the provider and will be fixed: https://github.com/hashicorp/terraform-provider-aws/pull/41917/files
For now if this is causing you issues i believe you can pin to an earlier version of the provider
it could be that we need to provide a new argument that allows users to provider a filter prefix. However, no one has ever asked for one and justified it
@drewmullen Thanks for the reply. The main issue comes from the Cloud WAN module, which warns us all the time while we are not using the flow logs at all. I think following PR is related to the same issue: PR
We're running into the same issue, and proposed fix seems to resolve the warning message.
please try upgrading to provider version 5.94 - should resolve the warning.
heres the commit: https://github.com/hashicorp/terraform-provider-aws/pull/42036/files#diff-b5e5d3506909407d95c0073f24454f37a6f989673e6822b31f64b718d94aea2d
please try upgrading to provider version 5.94 - should resolve the warning.
heres the commit: https://github.com/hashicorp/terraform-provider-aws/pull/42036/files#diff-b5e5d3506909407d95c0073f24454f37a6f989673e6822b31f64b718d94aea2d
We're using provider version 5.94.1, and still encountering this warning
Thanks for confirming the version.
I found the problem… It looks like i version pinned, which should probably be removed
https://github.com/aws-ia/terraform-aws-vpc/blob/da49a30fbfeb3890076b783be0abf8639f96f431/modules/flow_logs/modules/s3_log_bucket/providers.tf#L6
hopefully, I or someone can get to this somewhat quickly… Will need to run the terraform test suite to confirm we don’t introduce any new regressions
Update: Did some testing today. Removing the pinned provider still does not remove the warning. I need to dig into the PR - I dont believe the prefix should be required. that seems like a bug in the provider
Hi! I merged this PR - https://github.com/aws-ia/terraform-aws-vpc/pull/168 - that it is already fixing this issue. Sorry for this, I got notified to review the other one and now I see this by checking the open PRs.
Thanks for your time! Please check v4.4.5 in case you see any other issue we need to fix.