Paul Hinze
5874fa06ff
Merge pull request #1495 from TimeIncOSS/length-func
...
config: Add length to built-in functions
2015-04-15 11:54:46 -05:00
Paul Hinze
975a96f271
core: protect against count.index in modules
...
Modules should get a validation error just like outputs do.
refs #1528
2015-04-15 10:41:56 -05:00
Paul Hinze
347690a73e
core: don't crash when count.index is used in the wrong context
...
It's bad manners! :)
Also adds a validation error up at the configuration layer so the user
sees the case from #1528 as an error message.
fixes #1528
2015-04-15 10:23:53 -05:00
Radek Simko
6a720d087c
length added to built-in functions
2015-04-15 16:20:11 +01:00
Mitchell Hashimoto
0ff39a3773
config/lang: support math on variables through implicits
2015-04-14 09:09:18 -07:00
Radek Simko
8eb6984a89
Test helpers to print expected output
2015-04-13 14:12:43 +01:00
Mitchell Hashimoto
6514bf5f25
config: clarify unknown variable error [GH-1480]
2015-04-10 16:45:15 -07:00
Mitchell Hashimoto
06beab6fd8
config: copy the key on Copy
2015-04-09 09:31:04 -07:00
Mitchell Hashimoto
b201983304
terraform: copy RawConfigs
2015-04-09 09:21:38 -07:00
Mitchell Hashimoto
aab7bc0da5
config/module: rename parameters
2015-04-07 17:07:50 -07:00
Mitchell Hashimoto
2378160803
config/module: determine storage folder by path
2015-04-07 16:44:24 -07:00
Mitchell Hashimoto
f084d8d932
config/module: store the path with the module
2015-04-07 16:37:46 -07:00
Paul Hinze
766b4902d4
remove extraneous var declaration
...
just a go nitpick :)
2015-03-30 19:03:01 -05:00
7heo
a6411626bf
config: interprets '~' as the current user home dir in file()
2015-03-31 01:52:39 +02:00
Mitchell Hashimoto
44fce5ce60
config/module: remove debug
2015-03-26 09:31:58 -07:00
Mitchell Hashimoto
2e11ca68df
config/module: go back to the original folder when doing parent
...
references
2015-03-26 09:30:32 -07:00
Mitchell Hashimoto
bd4aaac71a
config/module: failing unit test for GH-1232
2015-03-26 09:11:32 -07:00
Mitchell Hashimoto
fdded8ca14
config: allow atlas block
2015-03-24 13:30:22 -07:00
Mitchell Hashimoto
f84ae29cf8
config: isTemporaryFile -> isIgnoredFile
2015-03-19 09:51:14 +01:00
Radek Simko
f794f30b7d
Ignore hidden files per Unix conventions
2015-03-18 07:50:33 +00:00
Mitchell Hashimoto
23609a7af5
Merge pull request #1096 from hashicorp/f-sprintf
...
config: add "format' function [GH-758]
2015-03-04 16:05:25 -08:00
Mitchell Hashimoto
9e50bf76c7
config/lang: test case for multiline lang
2015-03-02 23:31:49 -08:00
Mitchell Hashimoto
b39ddc7d47
config: add format function
2015-03-02 10:26:06 -08:00
Mitchell Hashimoto
63ee4c83ab
config: only regexp if at least two characters in replace search
2015-03-02 09:46:46 -08:00
Mitchell Hashimoto
5895494897
config: test bad regexp for replace
2015-03-02 09:44:45 -08:00
Mitchell Hashimoto
2f33a24385
config: add replace function
2015-03-02 09:37:40 -08:00
Mitchell Hashimoto
5e25dc54a7
config: if any var is computed, the entire interpolation is computed
2015-02-27 22:47:43 -08:00
Mitchell Hashimoto
2feaebdca5
config: substring containing computed value replaces element
2015-02-27 21:51:14 -08:00
Mitchell Hashimoto
5848cba6ad
config/lang: add modulo
2015-02-26 15:17:37 -08:00
Mitchell Hashimoto
3c4a036fb5
config/lang: add (expr) for order of ops
2015-02-26 14:39:04 -08:00
Mitchell Hashimoto
6750318bb5
config/lang: add test with expressions
2015-02-26 14:34:45 -08:00
Mitchell Hashimoto
9ddcaf15eb
config/lang: fix shift/reduce conflict
2015-02-26 14:33:56 -08:00
Mitchell Hashimoto
07b78fdf84
config/lang: math operations
2015-02-26 14:26:14 -08:00
Mitchell Hashimoto
684228e371
config/lang: add math operations for ints
2015-02-26 11:32:39 -08:00
Mitchell Hashimoto
cab2e408d2
config/module: retry bitbucket test a few times [GH-1027]
2015-02-23 15:24:24 -08:00
Mitchell Hashimoto
965fe45b9e
config: self var validation
2015-02-23 14:43:14 -08:00
Mitchell Hashimoto
9c612964d8
config: self variables
2015-02-23 14:34:25 -08:00
Mitchell Hashimoto
a31f2a276b
Merge pull request #1015 from hashicorp/b-depends-on-var
...
config: depends on cannot contain interpolations [GH-985]
2015-02-23 13:49:34 -08:00
Mitchell Hashimoto
87ecf4f40d
Merge pull request #1016 from hashicorp/b-splat-validate
...
config: provisioner splat vars can only reference other resources
2015-02-23 13:48:40 -08:00
Mitchell Hashimoto
45a267111b
Merge pull request #885 from brycekahle/split-func
...
config: add split function
2015-02-20 13:45:01 -08:00
Mitchell Hashimoto
c14e84a657
config: validate provisioner splats can only reference others
2015-02-20 09:21:29 -08:00
Mitchell Hashimoto
f156d0d1bd
config: test we can ref splat of other resources
2015-02-20 09:19:13 -08:00
Mitchell Hashimoto
90a6a627ed
config: validate configuration doens't contain splats to ourselves
2015-02-20 09:18:08 -08:00
Mitchell Hashimoto
0e7b150c5b
config: depends on cannot contain interpolations [GH-985]
2015-02-20 09:07:41 -08:00
Mitchell Hashimoto
0a68576746
config: add RawConfig.Merge
2015-02-19 12:07:59 -08:00
Mitchell Hashimoto
4bcf6cf6b2
config: bare splat variables should not be allowed in provisioners
...
[GH-636]
2015-02-17 13:32:45 -08:00
Emil Hessman
e7bbbfb098
helper/url: add Windows 'safe' URL Parse wrapper
...
Pull out the urlParse function, which was introduced in config/module,
into a helper package.
2015-02-05 11:16:54 +01:00
Emil Hessman
a8db835a44
config/module: fix HgGetter test failures on Windows
...
HgGetter tests failed on windows/amd64 using Mercurial version 3.2.4:
--- FAIL: TestHgGetter (0.11s)
get_hg_test.go:35: err: C:\Program Files\Mercurial\hg.exe exited with 255: abort: file:// URLs can only refer to localhost
--- FAIL: TestHgGetter_branch (0.11s)
get_hg_test.go:62: err: C:\Program Files\Mercurial\hg.exe exited with 255: abort: file:// URLs can only refer to localhost
FAIL
FAIL github.com/hashicorp/terraform/config/module 5.615s
This commit fixes the failures by adjusting the file:// URL to a form that
Mercurial expects.
2015-02-02 19:49:57 +01:00
Emil Hessman
5bbfc0d4e2
config/module: fix URL file path handling on Windows
...
Only adjust the URL Scheme when parsing drive letter file paths on
Windows, don't add a file scheme prefix.
FileDetector is responsible for adding the file scheme prefix.
2015-02-02 12:19:34 +01:00
Mitchell Hashimoto
2d9dd25493
config/module: fix regression of ignoring forced type if valid URL
...
/cc @ceh - Does this break Windows at all? This regressed with your
commit (we didn't have test coverage on it). I added a test now, though.
2015-02-01 20:17:56 +01:00