You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The terraform apply fails with the following error:
Error: Invalid count argument
│
│ on .terraform/modules/alb.access_logs/main.tf line 2, in data "aws_elb_service_account" "default":
│ 2: count = module.this.enabled ? 1 : 0
│
│ The "count" value depends on resource attributes that cannot be determined
│ until apply, so Terraform cannot predict how many instances will be
│ created. To work around this, use the -target argument to first apply only
│ the resources that the count depends on.
Expected Behavior
I expect terraform plan to complete successfully.
Steps to Reproduce
Steps to reproduce the behavior:
I've been using this module for while. All working fine. I then enabled logging using a custom bucket and get the above error.
it works fine if I don't specify a custom bucket (access_logs_s3_bucket_id = aws_s3_bucket.alb_s3_logging.id). However, I need to be able to give the bucket a specific name as opposed to having the name derived from the labels. Is there a way to specify the bucket name when not using access_logs_s3_bucket_id = aws_s3_bucket.alb_s3_logging.id?
Yeah, it works if the bucket is created before you run terraform apply with enable logging and the custom bucket ccess_logs_s3_bucket_id = aws_s3_bucket.alb_s3_logging.id
If the literal name of the bucket is used e.g access_logs_s3_bucket_id = my-bucket-${var.env} it works just fine. How would a scenario whereby a unique random string needed to be appended to the bucket name work?
Is worth updating the README as I didn't know the bucket.id was just the bucket name. Perhaps that's just a me thing :)
Found a bug? Maybe our Slack Community can help.
Describe the Bug
When specifying custom bucket for ALB logging:
access_logs_s3_bucket_id = aws_s3_bucket.alb_s3_logging.id
The
terraform apply
fails with the following error:Expected Behavior
I expect
terraform plan
to complete successfully.Steps to Reproduce
Steps to reproduce the behavior:
I've been using this module for while. All working fine. I then enabled logging using a custom bucket and get the above error.
access_logs_s3_bucket_id = aws_s3_bucket.alb_s3_logging.id
). However, I need to be able to give the bucket a specific name as opposed to having the name derived from the labels. Is there a way to specify the bucket name when not usingaccess_logs_s3_bucket_id = aws_s3_bucket.alb_s3_logging.id
?Screenshots
Not applicable here. See error above.
Environment (please complete the following information):
Additional Context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: