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

ECS service definition is missing AssignPublicIp property #3098

Closed
afedulov opened this issue Jan 22, 2018 · 10 comments · Fixed by #3240
Closed

ECS service definition is missing AssignPublicIp property #3098

afedulov opened this issue Jan 22, 2018 · 10 comments · Fixed by #3240
Assignees
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ecs Issues and PRs that pertain to the ecs service.
Milestone

Comments

@afedulov
Copy link

Support for network configuration has been added to aws_ecs_service:
https://github.com/terraform-providers/terraform-provider-aws/pull/2299/files

Only security_groups and subnets were added, but assign_public_ip property is missing:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-awsvpcconfiguration.html#cfn-ecs-service-awsvpcconfiguration-assignpublicip

This is a blocker for Fargate to pull images from ECR, as it seems that public IP is required (maybe a bug):
aws/amazon-ecs-agent#1128 (comment)

Terraform Version

Terraform v0.11.2

Affected Resource(s)

aws_ecs_service

Terraform Configuration Files

resource "aws_ecs_service" "myapp" {
  name            = "myapp"
  cluster         = "fargate"
  launch_type     = "FARGATE"
  network_configuration = {
    subnets = ["${aws_subnet.dev_demo.id}"]
    security_groups = ["${aws_security_group.ecs.id}"]
    assign_public_ip = "ENABLED"        <---- NOT SUPPORTED
  }
...
}

Expected Behavior

Auto-assign public IP ENABLED is applied

Actual Behavior

Error: aws_ecs_service.myapp: network_configuration.0: invalid or unknown key: assign_public_ip

@panuhorsmalahti
Copy link

"This is a blocker for Fargate to pull images from ECR, as it seems that public IP is required"

Public IP is not required, as you can use NAT+IGW. However, assigning public ip should of course also be supported.

@afedulov
Copy link
Author

@panuhorsmalahti I would appreciate if you could give me advice on how to achieve this here aws/amazon-ecs-agent#1204

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/ecs Issues and PRs that pertain to the ecs service. labels Jan 23, 2018
@bflad
Copy link
Contributor

bflad commented Jan 23, 2018

Please note the request for adding assign_public_ip to aws_ecs_service is #2873 and an open PR is #2559

@afedulov
Copy link
Author

afedulov commented Jan 23, 2018

@bflad thanks, I did not notice those.

@johnnorton
Copy link
Contributor

I have finished up the PR and 🤞that everyone is happy, Thanks for your patience.

@bflad
Copy link
Contributor

bflad commented Feb 9, 2018

This has been merged into master and will released with v1.9.0 of the AWS provider, hopefully later today.

@bflad
Copy link
Contributor

bflad commented Feb 9, 2018

This has been released in terraform-provider-aws version 1.9.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@sinahwz
Copy link

sinahwz commented Nov 6, 2018

Is 'assign_public_ip' implemented for the windows version also? I am still getting 'invalid or unknown key: assign_public_ip' error.
I am running 'Terraform v0.11.10' on Windows.

@sinahwz
Copy link

sinahwz commented Nov 6, 2018

Is 'assign_public_ip' implemented for the windows version also? I am still getting 'invalid or unknown key: assign_public_ip' error.
I am running 'Terraform v0.11.10' on Windows.

Upgrading the aws provider worked just fine.
'terraform init -upgrade'

@ghost
Copy link

ghost commented Apr 2, 2020

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.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ecs Issues and PRs that pertain to the ecs service.
Projects
None yet
5 participants