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

Unable to use module with bridge network_mode and without load balancers. #136

Closed
welderpb opened this issue Oct 6, 2021 · 1 comment · Fixed by #155 or #156
Closed

Unable to use module with bridge network_mode and without load balancers. #136

welderpb opened this issue Oct 6, 2021 · 1 comment · Fixed by #155 or #156
Labels
bug 🐛 An issue with the system

Comments

@welderpb
Copy link

welderpb commented Oct 6, 2021

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

Looks like it is not possible to create service without defining ecs_load_balancers variable and use "bridge" network_mode.
We receive a error:
module.ecs_alb_service_task.aws_ecs_service.default[0]: Creating...

│ Error: error creating filebeat service: error waiting for ECS service (filebeat) creation: InvalidParameterException: IAM roles are only valid for services configured to use load balancers.

Look like local variable "enable_ecs_service_role" has wrong conditions.
enable_ecs_service_role = module.this.enabled && var.network_mode != "awsvpc" && length(var.ecs_load_balancers) <= 1

It should be: length(var.ecs_load_balancers) >= 1

Expected Behavior

Able to create service in Bridge mode without load balancers.

Environment (please complete the following information):

Terraform v1.0.5
on linux_amd64

  • provider registry.terraform.io/hashicorp/aws v3.61.0
  • provider registry.terraform.io/hashicorp/local v2.1.0
  • provider registry.terraform.io/hashicorp/null v3.1.0
  • provider registry.terraform.io/hashicorp/template v2.2.0

Additional Context

Add any other context about the problem here.

@welderpb welderpb added the bug 🐛 An issue with the system label Oct 6, 2021
@ragumix
Copy link

ragumix commented Oct 6, 2021

yes, it's a bug, please fix it, guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
2 participants