Commit Graph

38 Commits

Author SHA1 Message Date
Jake Champlin e5d2f79918 Merge branch 'master' of /home/ubuntu/terraform-vendor 2017-06-09 17:56:23 +00:00
Jake Champlin f2eb5bfe42 Transfer terraform provider 2017-06-09 17:56:22 +00:00
Jake Champlin 623fd383fe
Transfer of provider website docs 2017-06-09 11:34:19 -04:00
Jake Champlin 4a1a97edcf
Merge branch 'master' of /Users/jake/terraform 2017-06-09 11:34:19 -04:00
Jake Champlin c907a1657a
Transfer terraform provider website 2017-06-09 11:34:17 -04:00
Jake Champlin c0444c1751
Updating Makefile + Add gitignore 2017-06-06 16:30:04 -04:00
Jake Champlin 9368d32a0f
Initial transfer of provider code 2017-06-06 12:42:19 -04:00
Jake Champlin f42ce49bcc
Merge branch 'master' of /Users/jake/terraform 2017-06-06 12:42:15 -04:00
Jake Champlin b81f5a334f
Transfer terraform provider 2017-06-06 12:42:14 -04:00
Jake Champlin 7059e2b9fd
Add Issue Template 2017-06-06 09:19:53 -04:00
Jake 2df69e822a initial commit 2017-06-05 20:54:13 +00:00
Martin Atkins 2cbd548d55 website: additional syntax highlighting for "terraform" provider docs 2017-04-07 16:56:35 -07:00
Seth Vargo 91d5e75afa Remove more references to Atlas 2017-04-07 11:56:19 -04:00
Seth Vargo 2ff3d47f30 Fix broken links 2017-04-07 11:56:17 -04:00
Ringo De Smet f1df7afadc Document the `environment` attribute. (#13360)
The existence of the attribute is mentioned here already: https://www.terraform.io/docs/state/environments.html
2017-04-05 09:53:18 +01:00
clint shryock 65ea9c3034 docs: fix some broken links related to remote state 2017-03-15 13:31:10 -05:00
James Bardin e33310b494 update the remote state datasource
Add an `environment` field to the terraform remote state data source.
2017-02-28 16:35:46 -05:00
Mitchell Hashimoto 264d3c2808 providers/terraform: data source uses backends for state loading 2017-02-22 11:37:56 -08:00
George Christou f70d15dd3d website/docs: Run `terraform fmt` on code examples (#12075)
* docs/vsphere: Fix code block

* docs: Convert `...` to `# ...` to allow `terraform fmt`ing

* docs: Trim trailing whitespace

* docs: First-pass run of `terraform fmt` on code examples
2017-02-19 00:48:50 +02:00
Mitchell Hashimoto 4acd4a2bcf Update remote_state.html.md 2016-10-24 14:14:49 -07:00
James Nugent 88d8d5e6ee state/remote: Officially Support local backend
This is a rework of pull request #6213 submitted by @joshuaspence,
adjusted to work with the remote state data source. We also add
a deprecation warning for people using the unsupported API, and retain
the ability to refer to "_local" as well as "local" for users in a mixed
version environment.
2016-09-03 15:42:40 -07:00
James Nugent ab14f52748 docs: Remove output from `terraform_remote_state`
Fixes #8296.
2016-08-19 00:50:43 +01:00
Dan Webb e3160eea07 Fix terraform_remote_state documentation
Fixing minor typo to match documentation on https://www.terraform.io/docs/providers/terraform/d/remote_state.html
2016-08-03 14:07:57 +01:00
Mike Tougeron f49f6cbd5f Terraform 0.7.0 data resource for remote state does not use the 'output' path (#7802) 2016-07-25 21:41:24 +01:00
Martin Atkins e5900a36a6 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.
2016-07-08 17:11:17 +01:00
James Bardin 97316f2dae Fix panic when there is no remote state
- Check for an empty state. If nothing is referenced from that state in
  the config, there's nothing to do here.
2016-07-07 16:20:35 -04:00
Paul Hinze 8c741db144 helper/resource: Consolidate unit test override
I noticed we had two mechanisms for unit test override. One that dropped
a sentinel into the env var, and another with a struct member on
TestCase. This consolidates the two, using the cleaner struct member
internal mechanism and the nicer `resource.UnitTest()` entry point.
2016-07-01 13:08:43 -05:00
James Nugent fff30cc897 provider/terraform: Fix outputs from remote state
The work integrated in hashicorp/terraform#6322 silently broke the
ability to use remote state correctly. This commit adds a fix for that,
making use of the work integrated in hashicorp/terraform#7124.

In order to deal with outputs which are complex structures, we use a
forked version of the flatmap package - the difference in the version
this commit vs the github.com/hashicorp/terraform/flatmap package is
that we add in an additional key for map counts which state requires.
Because we bypass the normal helper/schema mechanism, this is not set
for us.

Because of the HIL type checking of maps, values must be of a homogenous
type. This is unfortunate, as it means we can no longer refer to outputs
as:

    ${terraform_remote_state.foo.output.outputname}

Instead we had to bring them to the top level namespace:

    ${terraform_remote_state.foo.outputname}

This actually does lead to better overall usability - and the BC
breakage is made better by the fact that indexing would have broken the
original syntax anyway.

We also add a real-world test and assert against specific values. Tests
which were previously acceptance tests are now run as unit tests, so
regression should be identified at a much earlier stage.
2016-06-11 16:53:45 +01:00
James Nugent 2fd77895b3 core: Use OutputState in JSON instead of map
This commit forward ports the changes made for 0.6.17, in order to store
the type and sensitive flag against outputs.

It also refactors the logic of the import for V0 to V1 state, and
fixes up the call sites of the new format for outputs in V2 state.

Finally we fix up tests which did not previously set a state version
where one is required.
2016-05-18 13:25:20 -05:00
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