-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: aws_ecs_service ingressPortOverride defaults to 0 #28293
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Same thing happening here, running on: Terraform v1.3.6
I'm getting: InvalidParameterException: IngressPortOverride cannot use ports <= 1024. Also: I was obliged to add the client_alias - (Optional) The list of client aliases for this Service Connect service. You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1. See below. But i was getting: Error: Insufficient client_alias blocks Here's my conf file: resource "aws_ecs_service" "ecs_api_service" {
name = var.product_name
cluster = var.cluster_arn
task_definition = aws_ecs_task_definition.api_taskdef.arn
launch_type = "FARGATE"
platform_version = "LATEST"
desired_count = 1
service_connect_configuration {
enabled = true
namespace = var.cloudmap_namespace
service {
discovery_name = var.product_name
port_name = "nginx:80:80"
client_alias {
port = 80
}
}
}
lifecycle {
ignore_changes = [desired_count]
}
deployment_circuit_breaker {
enable = true
rollback = true
}
deployment_controller {
type = "ECS"
}
deployment_maximum_percent = 200
deployment_minimum_healthy_percent = 100
health_check_grace_period_seconds = 10
enable_ecs_managed_tags = true
force_new_deployment = true
enable_execute_command = true
load_balancer {
target_group_arn = aws_lb_target_group.ecs_target_group.arn
container_name = "nginx"
container_port = 80
}
network_configuration {
subnets = var.vpc_subnets
security_groups = [aws_security_group.sg.id]
assign_public_ip = var.assign_public_ip
}
}`
|
This functionality has been released in v4.47.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Terraform Core Version
1.3.3
AWS Provider Version
4.46.0, 4.45.0
Affected Resource(s)
aws_ecs_service
service_connect_configuration
service
Expected Behavior
IngressPortOverride not to be passed to aws unless ingress_port_override has been set in the service block.
Actual Behavior
0 is passed and can be seen when debug is on
"services":[{"clientAliases":[{"port":8080}],"ingressPortOverride":0,"portName":"portname"}]
Relevant Error/Panic Output Snippet
InvalidParameterException: IngressPortOverride cannot use ports <= 1024.
Terraform Configuration Files
Steps to Reproduce
replace < > values and apply or try to enable service_connect_configuration and define a service block without ingress_port_override being set
Debug Output
Panic Output
No response
Important Factoids
No response
References
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service_definition_parameters.html
ingressPortOverride
Type: Integer
Required: No
(Optional) The port number for the Service Connect proxy to listen on.
Use the value of this field to bypass the proxy for traffic on the port number that's specified in the named portMapping in the task definition of this application, and then use it in your Amazon VPC security groups to allow traffic into the proxy for this Amazon ECS service.
In awsvpc mode, the default value is the container port number that's specified in the named portMapping in the task definition of this application. In bridge mode, the default value is the dynamic ephemeral port of the Service Connect proxy.
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: