Open danielmklein opened 2 months ago
This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days
De-stale thyself
This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days
This is still valid.
Description
When using this module with a pre-existing cloudwatch log groups to be used for the flow log destination, the recent change in 5.12 that attempts to make the flow log policy least-privilege results in an invalid policy document (because there are no resources in the policy).
Versions
Module version [5.12+]:
Terraform version: 1.7.5
Provider version(s): aws v5.62.0 vpc v5.13.0
Reproduction Code [Required]
Steps to reproduce the behavior:
You would likely have to run the repro code with version 5.11.0 (or something else less than 5.12.0) in order for it to run successfully and create everything. Then, you would re-run with 5.12.0 or higher.
Expected behavior
The module should not generate a change that results in an invalid policy document.
Actual behavior
The module attempts to entirely remove the resources list from the policy, which yields an invalid policy document -- applying this fails.