Closed dhaven closed 3 years ago
I think one way to fix it would be exposing map of destination_options
parameters, instead of one by one, like flow_log_file_format
, flow_log_per_hour_partition
. And then use dynamic block in aws_flow_log
resource. Not sure if it is preferred way to go, exposing a map, so just threw in an idea.
I will prepare a PR in couple hours, once I get free, if it is not fixed and nobody opposes the idea😁
Good catch. I think you can use dynamic
block but no need to convert variables to a map.
It's just as far as I know dynamic
block doesn't work with count
meta argument, which would be ideal here - just to check if destination type is cloudwatch. I could be wrong or not fully getting your vision.
This is what I mean:
dynamic "destination_options" {
for_each = var.something != "cloudwatch" ? [true] : []
content {
foo = var.foo
}
}
Yeah, I see now. Not beautiful, but does the job.
I started experiencing this same problem just minutes after a fix was released. Thanks guys! 😄
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.
Description
After last release 3.8 the vpc module tries to add the block to the aws_flow_log resource
This fails with following message :
Seems to be caused by https://github.com/terraform-aws-modules/terraform-aws-vpc/pull/700
Versions
Terraform v1.0.2 on darwin_amd64
Reproduction
apply following module :
Expected behavior
no error
Actual behavior
see description