Justin Campbell
bb14bfa657
helper/schema: call InternalValidate w/ schemaMap{}
2015-05-12 11:01:08 -04:00
Paul Hinze
3ba8ed536b
helper/schema: record schema version on apply
...
We were previously only recording the schema version on refresh. This
caused the state to be incorrectly written after a `terraform apply`
causing subsequent commands to run the state through an unnecessary
migration.
2015-03-18 19:08:48 -05:00
Paul Hinze
3d4b55e557
helper/schema: schema versioning & migration
...
Providers get a per-resource SchemaVersion integer that they can bump
when a resource's schema changes format. Each InstanceState with an
older recorded SchemaVersion than the cureent one is yielded to a
`MigrateSchema` function to be transformed such that it can be addressed
by the current version of the resource's Schema.
2015-03-06 16:26:11 -06:00
Mitchell Hashimoto
466a54cfe4
Merge pull request #766 from hashicorp/f-exists-api
...
helper/schema: Exists API
2015-01-16 10:56:25 -08:00
Mitchell Hashimoto
448887f3c4
helper/schema: map counts in state
2015-01-15 14:12:24 -08:00
Mitchell Hashimoto
48b9614556
helper/schema: Exists API
2015-01-10 15:39:29 -08:00
Mitchell Hashimoto
d0ce67a5b7
helper/schema: on destroy/create, reset state to be empty [GH-464]
2014-10-21 00:28:53 -07:00
Mitchell Hashimoto
9b2b3a963f
ResourceDiff => InstanceDiff
2014-09-17 16:33:24 -07:00
Mitchell Hashimoto
81d9d70296
helper/schema: conforms to new API, tests pass
2014-09-16 17:07:13 -07:00
Mitchell Hashimoto
5fc41cc272
helper/schema: properly put "id" into attributes
2014-08-20 10:38:51 -07:00
Mitchell Hashimoto
021a23fe99
helper/schema: if update sets the ID to blank, it deletes the resource
2014-08-20 10:38:51 -07:00
Mitchell Hashimoto
2444986fe8
helper/schema: nice error if update isn't supported
2014-08-19 09:26:48 -07:00
Mitchell Hashimoto
c418681cc3
helper/schema: create/update/delete should work for Resource
2014-08-17 20:20:11 -07:00
Mitchell Hashimoto
894187ec18
helper/schema: Resource.Refresh
2014-08-17 19:45:26 -07:00
Mitchell Hashimoto
51a44db6c2
helper/schema: move InternalValidate to schemaMap
2014-08-17 14:50:44 -07:00
Mitchell Hashimoto
a33e4bcdf0
helper/schema: properly validate sub-resources
2014-08-17 14:33:54 -07:00
Mitchell Hashimoto
7bc0be4b81
helper/schema: couple more tests around Computed (+ fix)
2014-08-16 09:49:22 -07:00
Mitchell Hashimoto
7f14708e71
helper/schema: list ForceNew
2014-08-14 23:32:20 -07:00
Mitchell Hashimoto
01b6b5f48e
helper/schema: initial work
2014-08-13 14:23:22 -07:00