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

No more than 1 "service_registries" blocks are allowed #9573

Open
ronniekk opened this issue Jul 31, 2019 · 4 comments
Open

No more than 1 "service_registries" blocks are allowed #9573

ronniekk opened this issue Jul 31, 2019 · 4 comments
Labels
bug Addresses a defect in current functionality. service/ecs Issues and PRs that pertain to the ecs service. upstream Addresses functionality related to the cloud provider.

Comments

@ronniekk
Copy link

ronniekk commented Jul 31, 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 "me too" comments, 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

Affected Resource(s)

  • aws_ecs_service

Terraform Configuration Files

resource "aws_ecs_service" "my-service" {
  name            = "my-service"
  cluster         = "${aws_ecs_cluster.main.id}"
  task_definition = "${aws_ecs_task_definition.my-service.arn}"
  desired_count   = "${var.app_count}"
  launch_type     = "FARGATE"

  network_configuration {
    security_groups  = [
      "${aws_security_group.my-service.id}"
    ]
    subnets          = data.aws_subnet_ids.private.ids
    assign_public_ip = false
  }

  service_registries {
    registry_arn = "${aws_service_discovery_service.my-service-thrift.arn}"
    port         = var.thrift_port
  }

  service_registries {
    registry_arn = "${aws_service_discovery_service.my-service-http.arn}"
    port         = var.http_port
  }
}

Expected Behavior

Multiple service_registries are used with single service.

Actual Behavior

Error: Too many service_registries blocks

  on  line 0:
  (source code not available)

No more than 1 "service_registries" blocks are allowed

Provider schema is capped at max one items: https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_ecs_service.go#L304

Steps to Reproduce

  1. Add more than one service_registries within an aws_ecs_service resource.
  2. terraform apply

References

Array of ServiceRegistry objects is supported in AWS API: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Service.html#ECS-Type-Service-serviceRegistries

Go API supports array of ServiceRegistry: https://docs.aws.amazon.com/sdk-for-go/api/service/ecs/#CreateServiceInput.SetServiceRegistries

@ghost ghost added the service/ecs Issues and PRs that pertain to the ecs service. label Jul 31, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jul 31, 2019
@ryndaniels ryndaniels added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 26, 2019
@codebider
Copy link

Any update on this one?

@saschathiergart
Copy link

Any update yet on this one?

@arkadijs
Copy link

I suppose this is the unfortunate answer:

Each service may be associated with one service registry. Multiple service registries for each service isn't supported.

@marcinatvic
Copy link

So it seems AWS doesn't support multiple service registries for a service even though they have this parameter in their API as an array type. If that's the case then it won't be possible to fix that in the terraform provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/ecs Issues and PRs that pertain to the ecs service. upstream Addresses functionality related to the cloud provider.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants