Skip to content
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

Disabling VPC flow log fails the plan when target_regions is set #156

Closed
tovbinm opened this issue Dec 10, 2020 · 3 comments · Fixed by #157
Closed

Disabling VPC flow log fails the plan when target_regions is set #156

tovbinm opened this issue Dec 10, 2020 · 3 comments · Fixed by #157
Assignees
Labels
bug Something isn't working

Comments

@tovbinm
Copy link

tovbinm commented Dec 10, 2020

When target_regions = ["us-east-1", "us-west-2"] is set together with vpc_enable_flow_logs = false TF apply fails for all other regions:

Error: Invalid index

  on .terraform/modules/secure-baseline/vpc_baselines.tf line 134, in module "vpc_baseline_ap-southeast-1":
 134:   flow_logs_iam_role_arn      = local.is_cw_logs ? aws_iam_role.flow_logs_publisher[0].arn : null
    |----------------
    | aws_iam_role.flow_logs_publisher is empty tuple

The given key does not identify an element in this collection value.

Is this a setting I am missing or it's a bug?

nozaq added a commit that referenced this issue Dec 12, 2020
@nozaq nozaq added the bug Something isn't working label Dec 12, 2020
@nozaq nozaq self-assigned this Dec 12, 2020
@nozaq
Copy link
Owner

nozaq commented Dec 12, 2020

@tovbinm Thanks for reporting the issue! It seems a bug, working in #157.

@nozaq
Copy link
Owner

nozaq commented Dec 12, 2020

fixed in v0.23.1 🎉

@tovbinm
Copy link
Author

tovbinm commented Dec 13, 2020

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants