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

When creating ECS service on a new cluster, the service linked role doesn't exist yet #11417

Closed
fields opened this issue Dec 23, 2019 · 3 comments · Fixed by #11423
Closed

When creating ECS service on a new cluster, the service linked role doesn't exist yet #11417

fields opened this issue Dec 23, 2019 · 3 comments · Fixed by #11423
Assignees
Labels
bug Addresses a defect in current functionality. service/ecs Issues and PRs that pertain to the ecs service.
Milestone

Comments

@fields
Copy link

fields commented Dec 23, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.12.13

  • provider.aws v2.43.0

Affected Resource(s)

aws_ecs_service

Expected Behavior

When creating an ECS service immediately after creating a new cluster in the same terraform apply, it should wait for AWS to create the service linked role, and succeed in creating the service.

Actual Behavior

It tries to create the service before AWS finishes creating the ECS service linked role, and fails with this error.

Error: InvalidParameterException: Unable to assume the service linked role. Please verify that the ECS service linked role exists.
	status code: 400, request id: ZZZZZZZ "YYYYYYY"
  on ../../terraform-modules/container_service/ecs_service.tf line 1, in resource "aws_ecs_service" "XXXXX":
   1: resource "aws_ecs_service" "XXXXX" {

If terraform apply is run again shortly thereafter, it works.

Steps to Reproduce

  1. have a terraform plan file which creates a new ECS cluster and a service
  2. terraform apply (fails)
  3. Wait a minute or two
  4. terraform apply (works)
@ghost ghost added the service/ecs Issues and PRs that pertain to the ecs service. label Dec 23, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 23, 2019
@bflad bflad added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 2, 2020
@bflad bflad self-assigned this Jan 3, 2020
@bflad bflad added this to the v2.44.0 milestone Jan 3, 2020
@bflad
Copy link
Contributor

bflad commented Jan 3, 2020

The fix for this has been merged and will release with version 2.44.0 of the Terraform AWS Provider, Thursday next week. Thanks to @DrFaust92 for the implementation. 👍

@ghost
Copy link

ghost commented Jan 10, 2020

This has been released in version 2.44.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 for triage. Thanks!

@ghost
Copy link

ghost commented Mar 27, 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 Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ecs Issues and PRs that pertain to the ecs service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants