Mitchell Hashimoto
1792334ec4
fmt
2014-10-21 11:00:12 -07:00
Mitchell Hashimoto
81913c58fb
providers/aws: fixing faililng test
2014-10-21 10:57:55 -07:00
Mitchell Hashimoto
61811fce23
helper/schema: remove debug info
2014-10-21 10:54:44 -07:00
Mitchell Hashimoto
f63a5d24e9
helper/schema: diffs for sets should include the full set [GH-457]
...
Prior to this, the diff only contained changed set elements. The issue
with this is that `getSet`, the internal function that reads a set from
the ResourceData, expects that each level (state, config, diff, etc.)
has the _full set_ information. This change was done to fix merging
issues.
Because of this, we need to make sure the full set is visible in the
diff.
2014-10-21 10:49:53 -07: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
d1324678dd
helper/schema: setting empty map works [GH-464]
2014-10-21 00:17:17 -07:00
Mitchell Hashimoto
9ecbbc6fa0
helper/schema: some more unit tests
2014-10-20 23:52:22 -07:00
Mitchell Hashimoto
17d1bb7dde
Revert "Merge pull request #422 from svanharmelen/f-shaving-off-some-cpu-cycles"
...
This reverts commit 428cce2478
, reversing
changes made to 517c5b2ea8
.
2014-10-20 23:14:14 -07:00
Mitchell Hashimoto
428cce2478
Merge pull request #422 from svanharmelen/f-shaving-off-some-cpu-cycles
...
helper/schema: Shaving off some unneeded calls, saving CPU cycles
2014-10-20 23:13:18 -07:00
Mitchell Hashimoto
8f166458d2
Merge pull request #480 from hashicorp/f-fix-consul
...
Consul param should be "key"
2014-10-20 15:35:31 -07:00
Mitchell Hashimoto
5390357e45
helper/schema: sets properly take into account the diff
2014-10-20 15:32:30 -07:00
Mitchell Hashimoto
39edc5dc04
helper/schema: diffing maps that are computed should not result in
...
change
2014-10-20 14:23:06 -07:00
Mitchell Hashimoto
37930f51a1
helper/schema: test case for boolean diffs
2014-10-20 14:08:56 -07:00
Mitchell Hashimoto
deec7194a3
helper/schema: validate maps properly [GH-461]
2014-10-19 20:33:00 -07:00
Mitchell Hashimoto
3e1169db61
helper/schema: validate string/bool types [GH-460]
2014-10-19 19:56:46 -07:00
Mitchell Hashimoto
686871310d
terraform: input properly sends on only set input
2014-10-18 14:54:42 -07:00
Mitchell Hashimoto
2b50d44aa4
helper/schema: validate Set is a set type [GH-413]
2014-10-17 23:23:50 -07:00
Mitchell Hashimoto
2e703afdad
helper/schema: valiate should ignore computed fields
2014-10-16 14:04:45 -07:00
Sander van Harmelen
e003334429
Shaving off some unneeded calls, saving CPU cycles
...
I know it’s very unlikely that a user will notice the difference, but
why range through the list, generate the set and calculate the
hashcode, only to find out that indexMap == nil (e.g. don’t do anything
with the generated hashcode).
As indexMap is only needed when len(parts) > 0, why not only create and
fill it (in one go) when len(parts) > 0?
2014-10-16 11:54:36 +02:00
Mitchell Hashimoto
12c178bc63
helper/schema: don't ask for input if provider default would not be nil
2014-10-12 17:37:52 -07:00
Mitchell Hashimoto
30786ce442
fmt
2014-10-11 10:47:07 -07:00
Mitchell Hashimoto
59349cca11
helper/schema: sets must be treated atomically within ResourceData
...
This fixes a seemingly minor issue (GH-255) around plans showing changes
when in fact there are none. But in reality this turned out to uncover a
really terrible bug.
The effect of what was happening was that multiple items in a set were
being merged. Now, they were being merged in the right order, so if you
didn't have rich types (lists in a set) then you never saw the effect
since the later value would overwrite the earlier. But with lists (such
as in security groups), you would end up with the lists merging. So, if
you had one ingress rule with CIDR blocks and one with SGs, then after
the merge both ingress rules would have BOTH CIDR and SGs, resulting in
an incorrect plan (GH-255).
This fixes the issue by introducing a `getSourceExact` bitflag to the
ResourceData source. When this is set, ALL data must come from this
level, instead of merging lower levels. In the case of sets and diffs,
this is exactly what you want: "Get me the set 'foo' from the config and
the config ONLY (not the state or diff or w/e)".
Andddddd its fixed.
GH-255
2014-10-11 10:40:54 -07:00
Mitchell Hashimoto
3a107d2e50
helper/schema: set the field to empty if it is a list and computed
2014-10-10 15:58:38 -07:00
Mitchell Hashimoto
e5d64318bf
helper/schema: don't say that a set is computed if it exists
2014-10-10 15:46:24 -07:00
Mitchell Hashimoto
36f225dea0
fmt
2014-10-10 14:50:35 -07:00
Mitchell Hashimoto
e0994c717d
helper/schema: fix issues around computed sets
2014-10-10 09:13:04 -07:00
Mitchell Hashimoto
dcaf653d6f
helper/schema: properly detect that a list is computed
2014-10-09 19:09:06 -07:00
Mitchell Hashimoto
3aa655ad3b
helper/schema: test schema diffs with the interpolation splits
2014-10-09 16:31:24 -07:00
Mitchell Hashimoto
753f6c6f8e
helper/schema: fix failing tests
2014-10-08 18:25:31 -07:00
Mitchell Hashimoto
00bdef3093
providers/aws: test tag removal
2014-10-08 18:21:21 -07:00
Mitchell Hashimoto
6eafac8a34
providers/aws: aws_vpc supports tags
2014-10-08 17:54:00 -07:00
Mitchell Hashimoto
f43528957e
helper/schema: support top-level TypeMap
2014-10-08 17:35:14 -07:00
Mitchell Hashimoto
0db9d98fff
helper/schema: can set Partial(true) multiple times
2014-10-08 16:35:14 -07:00
Mitchell Hashimoto
a7c321a028
helper/scheam: support UI defaults
2014-09-29 14:00:35 -07:00
Mitchell Hashimoto
99044a1f14
Add descriptions for AWS inputs
2014-09-29 13:30:28 -07:00
Mitchell Hashimoto
901c1448b4
command: make the UI a look nicer
2014-09-29 13:12:06 -07:00
Mitchell Hashimoto
d9596fa4d0
helper/schema: don't ask for input on fields that have a value
2014-09-29 11:16:19 -07:00
Mitchell Hashimoto
5aed997223
helper/schema: Input support
2014-09-29 10:25:43 -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
0250c17d6e
helper/schema: DefaultFunc for dynamic defaults
...
/cc @c4milo - This might be useful to you as well.
2014-09-09 21:33:08 -07:00
Mitchell Hashimoto
5919637456
helper/schema: Defaults [GH-245]
2014-09-09 21:17:29 -07:00
Mitchell Hashimoto
3a6940d715
helper/schema: test cases around unknown variable values
2014-08-30 17:03:01 -07:00
Mitchell Hashimoto
faa4e75960
helper/schema: Get on computed diff should be empty
2014-08-27 15:45:52 -07:00
Mitchell Hashimoto
c9a541d95b
helper/schema: generate a full diff in destroy/create cycle
2014-08-27 15:45:52 -07:00
Mitchell Hashimoto
9d239eea60
helper/schema: detect no change computed for sets/lists properly
2014-08-27 15:03:42 -07:00
Mitchell Hashimoto
0c9b65f3f4
helper/schema: documentation
2014-08-26 21:52:09 -07:00
Mitchell Hashimoto
87a488092c
helper/schema: support partial states
2014-08-26 20:19:44 -07:00
Mitchell Hashimoto
40e5608fa9
helper/schema: return the prior state if Data is an error
2014-08-26 15:50:31 -07:00
Mitchell Hashimoto
56cf1e6faa
Fix go vet complaints
2014-08-24 21:50:35 -07:00