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

r/aws_ecs_service: support resource import #2764

Merged
merged 3 commits into from
Feb 8, 2018

Conversation

loivis
Copy link
Contributor

@loivis loivis commented Dec 24, 2017

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, so cluster-name/service-name is taken as input. Will be glad to know if I missed something or better approach in existing code.

@jen20 jen20 added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 26, 2017
Copy link
Member

@radeksimko radeksimko left a 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?

log.Printf("[DEBUG] Importing ECS service %s from cluster %s", name, cluster)

d.SetId(name)
d.Set("cluster", cluster)
Copy link
Member

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.

@radeksimko radeksimko added the waiting-response Maintainers are waiting on response from community or contributor. label Jan 12, 2018
@loivis loivis force-pushed the 1406-ecs-service-import branch from d2147d8 to 350c8e2 Compare January 12, 2018 21:27
@loivis loivis force-pushed the 1406-ecs-service-import branch 2 times, most recently from de92e9f to 1eb5f38 Compare January 12, 2018 21:37
@loivis loivis force-pushed the 1406-ecs-service-import branch from 1eb5f38 to 793c03b Compare January 12, 2018 21:52
@loivis
Copy link
Contributor Author

loivis commented Jan 12, 2018

Although it looks working, task definition attribute of imported resource is in the format of family:revision instead of arn.

@bflad bflad added service/ecs Issues and PRs that pertain to the ecs service. and removed waiting-response Maintainers are waiting on response from community or contributor. labels Jan 28, 2018
@radeksimko radeksimko merged commit 852fc42 into hashicorp:master Feb 8, 2018
@radeksimko radeksimko added this to the v1.9.0 milestone Feb 9, 2018
@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.

@loivis loivis deleted the 1406-ecs-service-import branch February 18, 2018 18:40
@ghost
Copy link

ghost commented Apr 7, 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 7, 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
Development

Successfully merging this pull request may close these issues.

resource aws_ecs_service doesn't support import Add support for import of ECS Service
4 participants