Commit Graph

59 Commits

Author SHA1 Message Date
Martin Atkins 76fb7693b5 provider/terraform: remote state resource becomes a data source
As a first example of a real-world data source, the pre-existing
terraform_remote_state resource is adapted to be a data source. The
original resource is shimmed to wrap the data source for backward
compatibility.
2016-05-14 08:26:36 -07:00
Martin Atkins 861dfc0e00 helper/schema: emit warning when using data source resource shim
For backward compatibility we will continue to support using the data
sources that were formerly logical resources as resources for the moment,
but we want to warn the user about it since this support is likely to
be removed in future.

This is done by adding a new "deprecation message" feature to
schema.Resource, but for the moment this is done as an internal feature
(not usable directly by plugins) so that we can collect additional
use-cases and design a more general interface before creating a
compatibility constraint.
2016-05-14 08:26:36 -07:00
Martin Atkins e455f0a9bb provider/terraform: remote state resource becomes a data source
As a first example of a real-world data source, the pre-existing
terraform_remote_state resource is adapted to be a data source. The
original resource is shimmed to wrap the data source for backward
compatibility.
2016-05-14 08:26:36 -07:00
James Nugent 433fcb3046 state: Add support for outputs of multiple types
This commit adds the groundwork for supporting module outputs of types
other than string. In order to do so, the state version is increased
from 1 to 2 (though the "public-facing" state version is actually as the
first state file was binary).

Tests are added to ensure that V2 (1) state is upgraded to V3 (2) state,
though no separate read path is required since the V2 JSON will
unmarshal correctly into the V3 structure.

Outputs in a ModuleState are now of type map[string]interface{}, and a
test covers round-tripping string, []string and map[string]string, which
should cover all of the types in question.

Type switches have been added where necessary to deal with the
interface{} value, but they currently default to panicking when the input
is not a string.
2016-05-10 14:40:12 -04:00
Craig Marsden 64d5ff2e84 correct remote state documentation and add config sub-arguments for atlas. 2016-02-08 22:21:50 +00:00
John Engelman 678feaaed7 Add Terraform/Remote State documentation to provider/resource section.
Issue #2074
2015-12-27 19:04:27 +01:00
Mitchell Hashimoto e8d19637d3 provider/terraform: test fixture 2015-05-07 09:59:23 -07:00
Mitchell Hashimoto 5a6766b702 providers/terraform: name it terraform_remote_state 2015-04-01 22:49:05 -07:00
Mitchell Hashimoto 693f688b49 providers/terraform: remote state resource 2015-03-11 18:17:47 -05:00