Commit Graph

31 Commits

Author SHA1 Message Date
Martin Atkins
0e0e3d73af core: New ResourceProvider methods for data resources
This is a breaking change to the ResourceProvider interface that adds the
new operations relating to data sources.

DataSources, ValidateDataSource, ReadDataDiff and ReadDataApply are the
data source equivalents of Resources, Validate, Diff and Apply (respectively)
for managed resources.

The diff/apply model seems at first glance a rather strange workflow for
read-only resources, but implementing data resources in this way allows them
to fit cleanly into the standard plan/apply lifecycle in cases where the
configuration contains computed arguments and thus the read must be deferred
until apply time.

Along with breaking the interface, we also fix up the plugin client/server
and helper/schema implementations of it, which are all of the callers
used when provider plugins use helper/schema. This would be a breaking
change for any provider plugin that directly implements the provider
interface, but no known plugins do this and it is not recommended.

At the helper/schema layer the implementer sees ReadDataApply as a "Read",
as opposed to "Create" or "Update" as in the managed resource Apply
implementation. The planning mechanics are handled entirely within
helper/schema, so that complexity is hidden from the provider implementation
itself.
2016-05-14 08:26:36 -07:00
Mitchell Hashimoto
ec02c8c0e2
helper/resource: testing of almost all aspects of ImportState tests 2016-05-11 13:02:37 -07:00
Mitchell Hashimoto
d1a81379d0
terraform: use InstanceInfo more appropriately, pass ID to ImportState 2016-05-11 13:02:35 -07:00
Mitchell Hashimoto
531f609564
terraform: add ImportState to the provider interface 2016-05-11 13:02:30 -07:00
Paul Hinze
715437537d command: fix flaky parallelism tests
Thanks to @mitchellh for helping sort out concurrency stuff here.
2015-10-29 15:16:34 -05:00
Mitchell Hashimoto
d6f7261190 terraform: provider mock should close itself to find bugs 2015-06-29 10:33:37 -07:00
Sander van Harmelen
83c760fcb3 core: refactoring the way sets work internally v2
This is a refactored solution for PR #616. Functionally this is still
the same change, but it’s implemented a lot cleaner with less code and
less changes to existing parts of TF.
2014-12-12 23:21:20 +01:00
Mitchell Hashimoto
2791badf01 terraform: ask for input for providers 2014-09-29 09:13:15 -07:00
Mitchell Hashimoto
5611b9b8a8 terraform: add Input API to ResourceProvider 2014-09-28 23:50:37 -07:00
Mitchell Hashimoto
c88614c585 terraform: providers inherit properly for validation 2014-09-24 21:38:23 -07:00
Mitchell Hashimoto
8dbc7e0ccb terraform: change the graph a bit to better support providers with
modules

This doesn't cause inheritence to work yet. That is coming
2014-09-24 13:31:35 -07:00
Mitchell Hashimoto
9b2b3a963f ResourceDiff => InstanceDiff 2014-09-17 16:33:24 -07:00
Mitchell Hashimoto
95f3e626a5 terraform: modify the ResourceProvider API super hardcore 2014-09-16 16:20:11 -07:00
Mitchell Hashimoto
8d065ce5c4 terraform: don't validate orphans 2014-07-11 11:09:19 -07:00
Mitchell Hashimoto
ac0e29e98e terraform: races in MockResourceProvider 2014-07-10 13:38:04 -07:00
Mitchell Hashimoto
d0577fda02 terraform: add ValidateResource API to ResourceProvider 2014-07-02 20:35:03 -07:00
Mitchell Hashimoto
dc193f5f33 terraform: call refresh before every diff
In the future, we'll make this a separate thing...
2014-06-19 21:22:07 -07:00
Mitchell Hashimoto
b3e20a3e85 terraform: basic apply, more tests needed 2014-06-18 15:35:03 -07:00
Mitchell Hashimoto
8a2eb95a42 terraform: Validate called on provider 2014-06-12 22:30:09 -07:00
Mitchell Hashimoto
7e421dd89b terraform: ResourceConfig 2014-06-12 17:59:59 -07:00
Mitchell Hashimoto
02a3603a9a rpc: Diff implementation 2014-06-06 00:48:32 -07:00
Mitchell Hashimoto
0561edc2fd terraform: check for errors initializing a provider 2014-06-06 00:28:57 -07:00
Mitchell Hashimoto
796dfd54e9 terraform: just hardcode a UUID in there for computed placeholders 2014-06-05 20:03:16 -07:00
Mitchell Hashimoto
9018beda81 terraform: placeholder key for computed values 2014-06-05 11:30:48 -07:00
Mitchell Hashimoto
d77a72ba84 terraform: take into account dependency variables in diffs 2014-06-05 07:27:01 -07:00
Mitchell Hashimoto
7c6920bba1 terraform: diff/state work better together, merge 2014-06-05 06:57:06 -07:00
Mitchell Hashimoto
e904fca3da terraform: Diff! 2014-06-05 02:32:10 -07:00
Mitchell Hashimoto
9480783ee4 terraform: add Diff to ResourceProvider
rpc and plugin don't compile yet
2014-06-03 16:42:21 -07:00
Mitchell Hashimoto
c9d8413431 terraform: New happy path works decently well 2014-06-03 15:08:00 -07:00
Mitchell Hashimoto
0c1a341d90 terraform: Resources method for providers 2014-06-03 14:26:31 -07:00
Mitchell Hashimoto
f8dc3286d9 rpc: ResourceProvider over RPC 2014-05-28 15:07:47 -07:00