-
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
r/aws_ecs_service: support resource import #2764
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @loivis
thanks for the PR.
Besides inline comment - can you also add an acceptance test for the import?
aws/resource_aws_ecs_service.go
Outdated
log.Printf("[DEBUG] Importing ECS service %s from cluster %s", name, cluster) | ||
|
||
d.SetId(name) | ||
d.Set("cluster", cluster) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind setting both ID and cluster
to ARNs here to keep expectations aligned with what's documented?
Thanks.
d2147d8
to
350c8e2
Compare
de92e9f
to
1eb5f38
Compare
1eb5f38
to
793c03b
Compare
Although it looks working, task definition attribute of imported resource is in the format of |
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. |
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! |
Related issue: #1762
Closes #1406
Closes #2747
Need to import ecs services from existing clusters. For ecs service, cluster name has to be provided as required information. I searched through current
terraform import
examples but found no similar senario, socluster-name/service-name
is taken as input. Will be glad to know if I missed something or better approach in existing code.