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

failure configuring LB attributes: InvalidConfigurationRequest: S3Bucket validation transient issue #49

Open
edouardbe opened this issue Jun 8, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@edouardbe
Copy link

Hi team,

I can't figure out how to resolve this error when I enable the logs on S3 :
Error: failure configuring LB attributes: InvalidConfigurationRequest: S3Bucket validation transient issue

I would be wonderful if you could also add the AWS Permissions required to execute the module.

module "ecs-fargate" {
    source  = "cn-terraform/ecs-fargate/aws"
    
    version = "2.0.41"
    name_prefix        = "test"
    
    vpc_id              = module.vpc.vpc_id
    container_image     = "${docker_registry_image.test-tf-ecr-dk-samplenodejs.name}"
    container_name = "test"
    public_subnets_ids  = module.vpc.public_subnets_ids
    private_subnets_ids = module.vpc.private_subnets_ids
    enable_s3_logs = true
    lb_https_ports = {}
    lb_http_ports = {
        "default_http": {
            "listener_port": 80,
            "target_group_port": 80,
            "type": "forward"
        }
    }
}

terraform apply error :

module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].random_string.random: Creating...
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].random_string.random: Creation complete after 0s [id=wopuocg]
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].aws_s3_bucket.logs: Creating...
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].aws_s3_bucket.logs: Creation complete after 3s [id=test-lb-logs-wopuocg]
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].aws_s3_bucket_server_side_encryption_configuration.logs[0]: Creating...
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].data.aws_iam_policy_document.logs_access_policy_document: Reading...
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].aws_s3_bucket_acl.logs: Creating...
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].data.aws_iam_policy_document.logs_access_policy_document: Read complete after 0s [id=1766990919]
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.aws_lb.lb: Modifying... [id=arn:aws:elasticloadbalancing:us-east-1:265192744256:loadbalancer/app/test-lb/ffd7fd026d909527]
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].aws_s3_bucket_policy.logs_access_policy: Creating...
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].aws_s3_bucket_server_side_encryption_configuration.logs[0]: Creation complete after 0s [id=test-lb-logs-wopuocg]
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].aws_s3_bucket_acl.logs: Creation complete after 0s [id=test-lb-logs-wopuocg,log-delivery-write]
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].aws_s3_bucket_policy.logs_access_policy: Creation complete after 0s [id=test-lb-logs-wopuocg]
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].aws_s3_bucket_public_access_block.logs_block_public_access[0]: Creating...
module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].aws_s3_bucket_public_access_block.logs_block_public_access[0]: Creation complete after 1s [id=test-lb-logs-wopuocg]
╷
│ Error: failure configuring LB attributes: InvalidConfigurationRequest: S3Bucket validation transient issue
│       status code: 400, request id: d29a65d3-9a07-430a-b61e-599d1a165793
│ 
│   with module.ecs-fargate.module.ecs-fargate-service.module.ecs-alb.aws_lb.lb,
│   on .terraform/modules/ecs-fargate.ecs-fargate-service.ecs-alb/main.tf line 26, in resource "aws_lb" "lb":
│   26: resource "aws_lb" "lb" {
│ 

Regards
Ed

@jnonino jnonino added the bug Something isn't working label Jun 9, 2022
@jnonino
Copy link
Member

jnonino commented Jun 28, 2022

This issue is related with this one: terraform-aws-ecs-alb issue #28.
I will work on that as soon as possible.

@jnonino
Copy link
Member

jnonino commented Jun 28, 2022

In regards to:

I would be wonderful if you could also add the AWS Permissions required to execute the module.

Which permissions do you mean?

@jnonino
Copy link
Member

jnonino commented Jun 29, 2022

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

@ricardf
Copy link

ricardf commented Jul 6, 2022

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.

@troydieter
Copy link

Hi @jnonino - also facing this:

image

it seems there needs to be a depends_on condition.. per this post

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
Development

No branches or pull requests

4 participants