provider/template: convert resources to 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.
This commit is contained in:
Martin Atkins 2016-05-21 15:09:55 -07:00 committed by James Nugent
parent 97316f2dae
commit e5900a36a6
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ func TestState_basic(t *testing.T) {
Config: testAccState_basic,
Check: resource.ComposeTestCheckFunc(
testAccCheckStateValue(
"terraform_remote_state.foo", "foo", "bar"),
"data.terraform_remote_state.foo", "foo", "bar"),
),
},
},
@ -64,7 +64,7 @@ func testAccCheckStateValue(id, name, value string) resource.TestCheckFunc {
}
const testAccState_basic = `
resource "terraform_remote_state" "foo" {
data "terraform_remote_state" "foo" {
backend = "_local"
config {