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:
parent
97316f2dae
commit
e5900a36a6
|
@ -17,7 +17,7 @@ func TestState_basic(t *testing.T) {
|
||||||
Config: testAccState_basic,
|
Config: testAccState_basic,
|
||||||
Check: resource.ComposeTestCheckFunc(
|
Check: resource.ComposeTestCheckFunc(
|
||||||
testAccCheckStateValue(
|
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 = `
|
const testAccState_basic = `
|
||||||
resource "terraform_remote_state" "foo" {
|
data "terraform_remote_state" "foo" {
|
||||||
backend = "_local"
|
backend = "_local"
|
||||||
|
|
||||||
config {
|
config {
|
||||||
|
|
Loading…
Reference in New Issue