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

provider/aws: Add aws_ecs_task_definition datasource to allow services to track the latest revision #8509

Merged
merged 1 commit into from
Jan 31, 2017

Conversation

builtinnya
Copy link
Contributor

@builtinnya builtinnya commented Aug 27, 2016

Implements #8449

This PR contains the following:

See #8449 for the detailed explanation of the why.

@gregwebs
Copy link

gregwebs commented Sep 8, 2016

I am finding it impossible to use terraform with ecs without this functionality.

@gregwebs
Copy link

gregwebs commented Sep 8, 2016

I am using this now, it works great, thank you!

@apparentlymart please get his merged in

@jsonmaur
Copy link

This really needs to be merged/addressed. Every other solution out there is super hacky, and requires maintaining two different docker images so terraform can safely rollback to the tag specified in the task definition when updating. This is a necessary feature for anyone using continuous deployment with ECS.

Any updates from the terraform guys?

@curena
Copy link

curena commented Dec 19, 2016

Status?

@hSATAC
Copy link

hSATAC commented Jan 16, 2017

💯
+1 to this.

@ColinHebert
Copy link
Contributor

@jen20 Would it be possible to get eyes on this Pull Request?

@builtinnya
Copy link
Contributor Author

I'm working on resolving the conflicts.
#9692 seems to add a better max interpolation function.

@builtinnya builtinnya changed the title provider/aws: Add aws_ecs_task_definition datasource to allow services to track the latest revision [WIP] provider/aws: Add aws_ecs_task_definition datasource to allow services to track the latest revision Jan 17, 2017
@builtinnya builtinnya changed the title [WIP] provider/aws: Add aws_ecs_task_definition datasource to allow services to track the latest revision provider/aws: Add aws_ecs_task_definition datasource to allow services to track the latest revision Jan 17, 2017
@builtinnya
Copy link
Contributor Author

Done.

@curena
Copy link

curena commented Jan 18, 2017

Will this make it into the next release?

@ColinHebert
Copy link
Contributor

@stack72 would you be able to review/approve this?

@curena
Copy link

curena commented Jan 30, 2017

Bump?

@stack72
Copy link
Contributor

stack72 commented Jan 31, 2017

Hi all

This LGTM! Is this just a case of wanting to find details out of a latest version of a task definition? Or what other usecase does this actually solve? Right now, it just seems to set up a task def, pass that into the data_source and get itself back

Thoughts?

Paul

@curena
Copy link

curena commented Jan 31, 2017

The main use case is to be able to update a task definition as part of a CI build (outside of TF), and have Terraform correctly pull in the latest revision of the task and update its corresponding service accordingly.

@stack72
Copy link
Contributor

stack72 commented Jan 31, 2017

@curena do you would then feed the result of the data source lookup into the ECS service?

@curena
Copy link

curena commented Jan 31, 2017

Correct.

@stack72
Copy link
Contributor

stack72 commented Jan 31, 2017

Got it - will get this merged then :) It makes sense

I would like to get an example for the documentation to show how this would work

@curena
Copy link

curena commented Jan 31, 2017

Thanks. There's a pretty good example in the parent issue #8449.

@stack72
Copy link
Contributor

stack72 commented Jan 31, 2017

ok, LGTM! The tests pass and I now understand the use-case

I will follow up with a more complete example in the documentation about what this will enable

% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEcsDataSource'                                                       ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/31 17:23:28 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSEcsDataSource -timeout 120m
=== RUN   TestAccAWSEcsDataSource_ecsContainerDefinition
--- PASS: TestAccAWSEcsDataSource_ecsContainerDefinition (112.95s)
=== RUN   TestAccAWSEcsDataSource_ecsTaskDefinition
--- PASS: TestAccAWSEcsDataSource_ecsTaskDefinition (24.45s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	137.421s

@stack72 stack72 merged commit e2b3ee5 into hashicorp:master Jan 31, 2017
arcadiatea pushed a commit to ticketmaster/terraform that referenced this pull request Feb 9, 2017
@ghost
Copy link

ghost commented Apr 17, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants