cn-terraform / terraform-aws-ecs-alb

AWS ALB Terraform Module for ECS
https://registry.terraform.io/modules/cn-terraform/ecs-alb
Apache License 2.0
28 stars 29 forks source link

S3Bucket validation transient issue #28

Open ktibi opened 2 years ago

ktibi commented 2 years ago

Hello @jnonino ,

Since your udpate, I have issue during sonarqube deployment :

 Error: failure configuring LB attributes: InvalidConfigurationRequest: S3Bucket validation transient issue
      status code: 400, request id: 391d3af7-99cd-4cd8-9617-15557228d1ce

  with module.sonar.module.ecs_fargate.module.ecs-fargate-service.module.ecs-alb.aws_lb.lb,
  on .terraform/modules/sonar.ecs_fargate.ecs-fargate-service.ecs-alb/main.tf line 26, in resource "aws_lb" "lb":
  26: resource "aws_lb" "lb" {
ktibi commented 2 years ago

Works if I disable S3 export log from LB.

jnonino commented 2 years ago

Yes, seems to be an issue there. I found this while searching about it AWS S3 Bucket for ALB Transient Issue . When I have some time I will try to find a way to solve it.

jnonino commented 2 years ago

Also reported in terraform-aws-ecs-fargate issue #49

jnonino commented 2 years ago

Hi, how are you? Can you check if change in latest version fixed the issue?

ricardf commented 2 years ago

I'm getting exactly the same error with latest version.

Also the bucket s3 arn should be provided as output so lifecycle can be configured.

tech-restack commented 1 year ago

Also getting the error when using an S3 bucket in another region

│ Error: failure configuring LB attributes: InvalidConfigurationRequest: S3Bucket validation transient issue │ status code: 400, request id: 8db33ae0-168a-42c2-bd37-109b1d2c6664

aiplescaamdaris commented 3 months ago

I also got that error when the bucket where the elb logs are sent had the encryption option "Server-side encryption with AWS Key Management Service keys (SSE-KMS)" with an aws managed key, and the error disappeared after switching the bucket to "Server-side encryption with Amazon S3 managed keys (SSE-S3)".

So I think the bug/error is on AWS side with the bucket encryption and not on terraform side.