{"action":"opened","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4557","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4557/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4557/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4557/events","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/4557","id":323774131,"number":4557,"title":"Migrating to ordered_placement_strategy forces a new resource","user":{"login":"icco","id":20201,"avatar_url":"https://avatars1.githubusercontent.com/u/20201?v=4","gravatar_id":"","url":"https://api.github.com/users/icco","html_url":"https://github.com/icco","followers_url":"https://api.github.com/users/icco/followers","following_url":"https://api.github.com/users/icco/following{/other_user}","gists_url":"https://api.github.com/users/icco/gists{/gist_id}","starred_url":"https://api.github.com/users/icco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icco/subscriptions","organizations_url":"https://api.github.com/users/icco/orgs","repos_url":"https://api.github.com/users/icco/repos","events_url":"https://api.github.com/users/icco/events{/privacy}","received_events_url":"https://api.github.com/users/icco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-16T20:27:30Z","updated_at":"2018-05-16T20:27:30Z","closed_at":null,"author_association":"NONE","body":"<!---\r\nPlease note the following potential times when an issue might be in Terraform core:\r\n\r\n* [Configuration Language](https://www.terraform.io/docs/configuration/index.html) or resource ordering issues\r\n* [State](https://www.terraform.io/docs/state/index.html) and [State Backend](https://www.terraform.io/docs/backends/index.html) issues\r\n* [Provisioner](https://www.terraform.io/docs/provisioners/index.html) issues\r\n* [Registry](https://registry.terraform.io/) issues\r\n* Spans resources across multiple providers\r\n\r\nIf you are running into one of these scenarios, we recommend opening an issue in the [Terraform core repository](https://github.com/hashicorp/terraform/) instead.\r\n--->\r\n\r\n<!--- Please keep this note for the community --->\r\n\r\n### Community Note\r\n\r\n* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request\r\n* Please do not leave \"+1\" or \"me too\" comments, they generate extra noise for issue followers and do not help prioritize the request\r\n* If you are interested in working on this issue or have submitted a pull request, please leave a comment\r\n\r\n<!--- Thank you for keeping this note for the community --->\r\n\r\n### Terraform Version\r\n\r\n<!--- Please run `terraform -v` to show the Terraform core version and provider version(s). If you are not running the latest version of Terraform or the provider, please upgrade because your issue may have already been fixed. [Terraform documentation on provider versioning](https://www.terraform.io/docs/configuration/providers.html#provider-versions). --->\r\n\r\n```\r\n$ terraform -v\r\nTerraform v0.11.7\r\n+ provider.aws v1.18.0\r\n+ provider.template v1.0.0\r\n```\r\n\r\n### Affected Resource(s)\r\n\r\n<!--- Please list the affected resources and data sources. --->\r\n\r\n* aws_ecs_service\r\n\r\n### Terraform Configuration Files\r\n\r\n<!--- Information about code formatting: https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code --->\r\n\r\n```hcl\r\nresource \"aws_ecs_service\" \"service\" {\r\n  name = \"${var.service_name}\"\r\n\r\n  cluster         = \"${var.cluster_id}\"\r\n  task_definition = \"${coalesce(var.task_def, var.service_name)}\"\r\n  desired_count   = \"${var.service_desired_count}\"\r\n\r\n  iam_role = \"${var.service_iam_role_name}\"\r\n\r\n  deployment_maximum_percent         = \"${var.deployment_maximum_percent}\"\r\n  deployment_minimum_healthy_percent = \"${var.deployment_minimum_healthy_percent}\"\r\n\r\n  # once setup, the task definition is updated via circleci\r\n  lifecycle {\r\n    ignore_changes = [\"task_definition\"]\r\n  }\r\n\r\n  depends_on = [\r\n    \"aws_alb_listener.service\",\r\n  ]\r\n\r\n  ordered_placement_strategy {\r\n    field = \"attribute:ecs.availability-zone\"\r\n    type  = \"spread\"\r\n  }\r\n\r\n  ordered_placement_strategy {\r\n    field = \"instanceId\"\r\n    type  = \"spread\"\r\n  }\r\n\r\n  load_balancer {\r\n    target_group_arn = \"${aws_alb_target_group.service.id}\"\r\n    container_name   = \"${var.service_name}\"\r\n    container_port   = \"${var.service_port}\"\r\n  }\r\n}\r\n```\r\n\r\n### Debug Output\r\n\r\n<!---\r\nPlease provide a link to a GitHub Gist containing the complete debug output. Please do NOT paste the debug output in the issue; just paste a link to the Gist.\r\n\r\nTo obtain the debug output, see the [Terraform documentation on debugging](https://www.terraform.io/docs/internals/debugging.html).\r\n--->\r\n\r\n### Panic Output\r\n\r\n<!--- If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the `crash.log`. --->\r\n\r\n### Expected Behavior\r\n\r\nChanging `placement_strategy` to `ordered_placement_strategy` would cause no diff in plan.\r\n\r\n### Actual Behavior\r\n\r\n<!--- What actually happened? --->\r\n\r\nEvery service we have using this module needs to be recreated.\r\n\r\n### Steps to Reproduce\r\n\r\n<!--- Please list the steps required to reproduce the issue. --->\r\n\r\n1. Create a service with placement_strategy\r\n2. `terraform apply`\r\n3. Modify service by changing `placement_strategy` to `ordered_placement_strategy`\r\n4. `terraform plan`\r\n\r\n### Important Factoids\r\n\r\n<!--- Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? --->\r\n\r\n### References\r\n\r\n<!---\r\nInformation about referencing Github Issues: https://help.github.com/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests\r\n\r\nAre there any other GitHub issues (open or closed) or pull requests that should be linked here? Vendor documentation? For example:\r\n--->\r\n\r\n"}}
{"actor":{"display_login":"icco"}}