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/template: convert resources to data sources #6717

Closed
wants to merge 1 commit into from

Conversation

apparentlymart
Copy link
Contributor

@apparentlymart apparentlymart commented May 17, 2016

The template resources don't actually need to retain any state, so they are good candidates to be data sources.

The template resources don't actually need to retain any state, so they
are good candidates to be data sources.

This includes a few tweaks to the acceptance tests -- now configured to
run as unit tests -- since it seems that they have been slightly broken
for a while now. In particular, the "update" cases are no longer tested
because updating is not a meaningful operation for a data source.
@apparentlymart apparentlymart force-pushed the f-template-data-sources branch from 14ff749 to caab819 Compare June 6, 2016 14:31
@apparentlymart apparentlymart changed the title [WIP] provider/template: convert resources to data sources provider/template: convert resources to data sources Jun 6, 2016
@apparentlymart
Copy link
Contributor Author

@phinze / @jen20: now that the bugs around testing data sources have been resolved this seems to work as expected, so I think it's now ready for review.

@ColinHebert
Copy link
Contributor

Fixes #6899

@jen20
Copy link
Contributor

jen20 commented Jul 8, 2016

After rebase:

make testacc TEST=./builtin/providers/template
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/07/08 17:11:37 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/template -v  -timeout 120m
=== RUN   TestRender
--- PASS: TestRender (0.06s)
=== RUN   TestTemplateRendering
--- PASS: TestTemplateRendering (0.08s)
=== RUN   TestValidateTemplateAttribute
--- PASS: TestValidateTemplateAttribute (0.00s)
=== RUN   TestTemplateSharedMemoryRace
--- PASS: TestTemplateSharedMemoryRace (0.00s)
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/template   0.151s

@jen20
Copy link
Contributor

jen20 commented Jul 8, 2016

LGTM! I'll merge this locally following the rebase and push it up.

@jen20
Copy link
Contributor

jen20 commented Jul 8, 2016

Merged as 861ac53.

@jen20 jen20 closed this Jul 8, 2016
@jen20 jen20 deleted the f-template-data-sources branch July 8, 2016 16:16
@ghost
Copy link

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

3 participants