Mitchell Hashimoto
d24082da1e
config: validate that module variables can go to ints, convert [GH-624]
2014-12-15 22:10:16 -08:00
Kushal Pisavadia
b40b7ce01a
Do not read temporary editor files, fixes #548
...
This fixes a bug where Terraform would error with the following:
```
Error loading config: Error reading
/Users/rhenrichs/work/example/.#example.tf: open
/Users/rhenrichs/work/example/.#example.tf: no such file or directory
```
The solution implemented here ignores the common emacs and vim
temporary file formats.
Note: the potential danger with merging this is that Terraform could
quickly have requests to ignore other file formats.
2014-12-09 13:15:00 +00:00
Seth Vargo
94e1eac051
Merge pull request #547 from ceh/issue-518
...
Fix issue 518
2014-11-20 13:30:14 -05:00
Armon Dadgar
4cdeb4b846
Merge pull request #554 from rcostanzo/f-array-index
...
Added an element interpolation lookup function for accessing a specific ...
2014-11-19 16:02:34 -08:00
Rob Costanzo
8da91e9636
Added an element interpolation lookup function for accessing a specific index from a list with splat variables
2014-11-07 10:24:21 -08:00
Emil Hessman
a76290f278
config/module: don't walk dst when dst is in src
...
Fixes #518
2014-11-06 13:45:01 +01:00
Emil Hessman
4bfe18b40d
argument and verb formatting fixes reported by go vet
...
builtin/providers/aws/tags_test.go:56: unrecognized printf verb 'i'
builtin/providers/aws/tags_test.go:59: unrecognized printf verb 'i'
config/config_test.go:101: possible formatting directive in Fatal call
config/config_test.go:157: possible formatting directive in Fatal call
config/module/get_file_test.go:91: missing argument for Fatalf(%s): format reads arg 1, have only 0 args
helper/schema/schema.go:341: arg v.Type for printf verb %s of wrong type: schema.ValueType
helper/schema/schema.go:656: missing argument for Errorf(%s): format reads arg 2, have only 1 args
helper/schema/schema.go:912: arg schema.Type for printf verb %s of wrong type: schema.ValueType
terraform/context.go:178: arg v.Type() for printf verb %s of wrong type: github.com/hashicorp/terraform/config.VariableType
terraform/context.go:486: arg c.Operation for printf verb %s of wrong type: terraform.walkOperation
terraform/diff_test.go💯 arg actual for printf verb %s of wrong type: terraform.DiffChangeType
terraform/diff_test.go:235: arg actual for printf verb %s of wrong type: terraform.DiffChangeType
2014-11-02 13:56:44 +01:00
Mitchell Hashimoto
369ba8cf07
config/module: fix issue where Get was copying subdir contents twice
2014-10-13 17:38:27 -07:00
Mitchell Hashimoto
6ee9c06cdc
config/module: copyDir properly copies files in subdirectories
2014-10-12 21:12:42 -07:00
Mitchell Hashimoto
4cb1ea6ae1
config: allow exact multi-resource references outside slices
2014-10-11 17:20:39 -07:00
Mitchell Hashimoto
36f225dea0
fmt
2014-10-10 14:50:35 -07:00
Mitchell Hashimoto
1ebcedb22b
config: make the interp split pretty insane
2014-10-09 22:45:22 -07:00
Mitchell Hashimoto
61b46c8612
config: add join() function
2014-10-09 21:22:35 -07:00
Mitchell Hashimoto
7b48924532
config: validate that multi-variables are only used in slices
2014-10-09 21:15:08 -07:00
Mitchell Hashimoto
a931707a6a
config: removeCurrent finds the proper map
2014-10-09 17:23:10 -07:00
Mitchell Hashimoto
5c7ce2d003
config: make the tests more robust
2014-10-09 16:13:43 -07:00
Mitchell Hashimoto
c6424e9569
config: make the replace function marginally more understandable
2014-10-09 16:12:30 -07:00
Mitchell Hashimoto
22908d67ba
config: first pass at replacing lists within a slice
2014-10-09 15:55:22 -07:00
Mitchell Hashimoto
9dd7618fce
config: fix messaging for name symbols
2014-10-08 16:12:53 -07:00
Mitchell Hashimoto
67d9188a29
config: validate module names are valid
2014-10-08 16:03:22 -07:00
Mitchell Hashimoto
50e5eacc15
config: add NameRegexp
2014-10-08 15:06:04 -07:00
Mitchell Hashimoto
e922b16dba
Merge pull request #377 from hashicorp/f-path-var
...
Add ${path.X} variables for path referencing
2014-10-07 21:26:24 -07:00
Mitchell Hashimoto
c1fa4c2e4b
config: validate that module source can't contain interpolations
2014-10-07 20:19:32 -07:00
Mitchell Hashimoto
d714c6f2f1
terraform: test path variables
2014-10-07 20:09:30 -07:00
Mitchell Hashimoto
1e00b4386c
config/module: Child(nil) or empty will return self
2014-10-07 20:02:18 -07:00
Mitchell Hashimoto
267d45df86
config/module: Can look up Child with Tree.Child
2014-10-07 20:00:36 -07:00
Mitchell Hashimoto
679ab1d515
config: parse ${path.module}
2014-10-07 18:03:11 -07:00
Mitchell Hashimoto
5c2182e316
config/module: only return SkipDir if it is dot-prefixed
2014-10-03 13:48:08 -07:00
Mitchell Hashimoto
f35ebe7032
config/module: walk actually recurses into dirs, don't copy dot-prefix
2014-10-03 13:46:19 -07:00
Mitchell Hashimoto
2e63a69e57
config: validate good count variables
2014-10-02 18:25:18 -07:00
Mitchell Hashimoto
b484ec19b6
config: validate that count vars are valid types
2014-10-02 18:24:37 -07:00
Mitchell Hashimoto
bc26777963
config: count can't interpolate count variables
2014-10-02 18:22:32 -07:00
Mitchell Hashimoto
8756d52124
config: count.index parses
2014-10-02 18:20:55 -07:00
Mitchell Hashimoto
dd14303022
config: validate that count is an int
2014-10-02 16:51:20 -07:00
Mitchell Hashimoto
5090678168
config: validate that only proper variables can be in the count
2014-10-02 16:30:46 -07:00
Mitchell Hashimoto
fa05b165ad
config: fix gob encode/decode for raw config and keys
2014-10-02 13:42:36 -07:00
Mitchell Hashimoto
101ac636a2
config: add Config method
2014-10-02 11:34:08 -07:00
Mitchell Hashimoto
f772c11103
config: validate unknown var in count
2014-10-02 11:18:57 -07:00
Mitchell Hashimoto
8e2315599f
config: Count can be a string (for interpolation)
2014-10-02 11:14:50 -07:00
Armon Dadgar
1aaddafba0
terraform: Adding lifecycle config block
2014-09-29 15:20:02 -07:00
Armon Dadgar
a14ea76c84
config: Support create_before_destroy config
2014-09-29 15:18:49 -07:00
Mitchell Hashimoto
3941dbac5d
fmt
2014-09-28 11:51:49 -07:00
Mitchell Hashimoto
0a2d06268c
config/module: detect supports subdirs
2014-09-27 09:29:12 -07:00
Mitchell Hashimoto
6cbadf14df
config: IsEmptyDir is true if dir doesn't exist
2014-09-26 16:28:18 -07:00
Mitchell Hashimoto
9689a34b28
config/module: GetCopy
2014-09-26 16:21:33 -07:00
Mitchell Hashimoto
c91fd76fe8
config/module: Get can support subdirs
2014-09-26 16:11:13 -07:00
Mitchell Hashimoto
57c1a8dada
config: add IsEmptyDir
2014-09-26 16:04:09 -07:00
Mitchell Hashimoto
4fbd5abc63
config/module: support GitHub paths without //
2014-09-26 15:30:36 -07:00
Mitchell Hashimoto
21d90dcf4f
config/module: HTTP supports subdirs
2014-09-26 15:22:26 -07:00
Mitchell Hashimoto
7aa30fdf25
config: support subdirectories with the "//" syntax
2014-09-26 14:56:04 -07:00