Closed TeraDonawa closed 1 month ago
I face the same issue. Is there any workaround?
There is a workaround - instead of creating and using the IAM role for Flow Logs, configure bucket policies to accept data from AWS service delivery.logs.amazonaws.com. Everything is described here: https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs-s3.html#flow-logs-s3-permissions
After applying such bucket policies I could remove the IAM role from the aws_flow_log resource in Terraform without sacrificing any functionality.
Hope this helps!
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.
If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!
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.
Terraform Version
0.13.5
AWS Terraform Provider version
3.74.3
Affected Resource(s)
Terraform Configuration Files
Expected Behaviour
After performing a
terraform apply
to anaws_flow_log
resource, any subsequent run ofterraform plan
should show no differences.Actual Behaviour
We have noticed that the aws_flow_log is always showing a diff, even immediately after an apply. For example, we'll see
Our terraform sets the
iam_role_arn
, but does not set thedestination_options
nor thelog_group_name
Looking at the corresponding state file, we see
iam_role_arn
andlog_group_name
are set to""
We could deal with having to set the
destination_options
, but the main issue is withiam_role_arn
not being set andlog_group_name
added as itterraform plan
will always show a difference even when there is no change in our Terraform code.Steps to Reproduce
terraform apply
terraform plan
Second step will show differences
References