Commit Graph

740 Commits

Author SHA1 Message Date
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
Bryce Kahle adccaad252 Add split function 2015-01-28 16:59:16 -05:00
Emil Hessman 97227a5c70 config/module: fix detection of file paths on Windows
Absolute file paths were not correctly detected by module.Detect
when using url.Parse to parse the source URL. Wrap the detection
with urlParse to properly handle file path detections on Windows.

Fixes command test failures on Windows.
2015-01-28 10:40:32 +01:00
Emil Hessman 65177edd1e config/module: fix test failures on Windows
When parsing URLs on Windows, assume it is a drive letter path
if the second element is a ':' character. Format the drive letter
path as a "file:///"-path prior to parsing the URL.

Fixes test failures of the following form in command on Windows:

=== RUN TestApply_plan
--- FAIL: TestApply_plan (0.00s)
        apply_test.go:379: bad: 1

		module download not supported for scheme 'c'
2015-01-28 08:19:04 +01:00
Emil Hessman d5a49363d7 config/module: handle absolute file paths on Windows
Using url.Parse to parse an absolute file path on Windows yields
a URL type where the Path element is prefixed by a slash.

For example, parsing "file:///C:/Users/user" gives a URL type
with Path:"/C:/Users/user".

According to golang.org/issue/6027, the parsing is correct as is.

The leading slash on the Path must be eliminated before any file
operations.

This commit introduces a urlParse function which wraps the url.Parse
functionality and removes the leading slash in Path for absolute file
paths on Windows.

Fixes config/module test failures on Windows.
2015-01-27 23:18:47 +01:00
Emil Hessman 78d1fc742f config/module: adjust HttpGetter test to fix Windows test failure
Specify laddr on the form host:port in the call to net.Listen as
documented for net.Dial, see godoc.org/net#Dial

Fixes the following test failures on Windows:

> go test -run=TestHttpGetter
--- FAIL: TestHttpGetter_header (0.00s)
        get_http_test.go:31: err: Get http://[::]:52101/header?terraform-get=1: dial tcp [::]:52101: ConnectEx tcp: The requested address is not valid in its context.
--- FAIL: TestHttpGetter_meta (0.00s)
        get_http_test.go:55: err: Get http://[::]:52103/meta?terraform-get=1: dial tcp [::]:52103: ConnectEx tcp: The requested address is not valid in its context.
--- FAIL: TestHttpGetter_metaSubdir (0.00s)
        get_http_test.go:79: err: Get http://[::]:52105/meta-subdir?terraform-get=1: dial tcp [::]:52105: ConnectEx tcp: The requested address is not valid in its context.
FAIL
exit status 1
FAIL github.com/hashicorp/terraform/config/module    0.054s
2015-01-27 23:18:46 +01:00
Emil Hessman 74cf8fcabd config/module: adjust FileDetector tests for Windows
"/foo" is not an absolute path on Windows. Adjust the FileDetector
tests to take that into account when verifying the results.

Fixes FileDetector test failures on Windows.
2015-01-27 23:18:46 +01:00
Emil Hessman 160e4f926e config/module: fix panic on Windows when running tests
On Windows, Go returns paths with the `\` path separator.
Make sure we are using `/` even on Windows since URLs are `/`-based.
2015-01-27 07:52:51 +01:00
Mitchell Hashimoto 63344a37c6 config/lang: verify single quotes syntax error [GH-613] 2015-01-16 10:28:00 -08:00
Mitchell Hashimoto 91a3405e88 config: understand provisioner blocks in JSON [GH-807] 2015-01-16 10:14:48 -08:00
Mitchell Hashimoto 7f9abbb99c config/lang; missed file 2015-01-15 09:40:36 -08:00
Mitchell Hashimoto a2e40ad731 config: multi-variable access in slice validation fixed [GH-798] 2015-01-15 09:40:13 -08:00
Mitchell Hashimoto 2abeb2d9ac config: use new API 2015-01-14 22:03:15 -08:00
Mitchell Hashimoto 61ee63d842 config/lang/ast: remove unused Eval 2015-01-14 21:49:39 -08:00
Mitchell Hashimoto 8d2c60a8af config/lang: eval 2015-01-14 21:48:20 -08:00
Mitchell Hashimoto 4302dbaf2a config/lang: make TypeCheck implementable by other nodes 2015-01-14 21:18:22 -08:00
Mitchell Hashimoto 57adfe53f6 config/lang: use the new AST stuff 2015-01-14 20:58:46 -08:00
Mitchell Hashimoto c96b3b9ddc config/lang/ast: Eval 2015-01-14 20:37:16 -08:00
Mitchell Hashimoto c4273974de config/lang/ast: introduce Type 2015-01-14 20:13:35 -08:00
Mitchell Hashimoto 342b4d2d9f config/lang: proper filename 2015-01-14 16:36:42 -08:00
Mitchell Hashimoto 1e79861b84 config/lang/ast: AST transforms are built-in 2015-01-14 16:36:01 -08:00
Mitchell Hashimoto d3c0543bf3 Merge pull request #797 from hashicorp/f-stronger-types
Force variables to be typed (internally)
2015-01-14 15:30:38 -08:00
Emil Hessman 482460c4c8 config/lang: address vet reports
Fixes the following vet reports:

config/lang/check_types.go:98: arg n for printf verb %d of wrong type: *github.com/hashicorp/terraform/config/lang/ast.Concat
config/lang/lex.go:80: arg x.mode for printf verb %s of wrong type: lang.parserMode
2015-01-14 22:04:28 +01:00
Mitchell Hashimoto 6e29ea0366 config/lang: some hoops to get the types to work 2015-01-14 12:18:51 -08:00
Mitchell Hashimoto 591610deea config/lang: string to int 2015-01-14 12:02:26 -08:00
Mitchell Hashimoto d12bf66403 config/lang: implicit builtins are coming in 2015-01-14 11:59:06 -08:00
Mitchell Hashimoto 36b6601baf config/lang: implicit type conversions 2015-01-14 11:47:20 -08:00
Mitchell Hashimoto 8ae14f06b3 config: variables must be typed 2015-01-14 10:40:43 -08:00
Mitchell Hashimoto dd456871e9 config/lang: remove unused code 2015-01-14 10:11:29 -08:00
Mitchell Hashimoto 92af4801a1 config: reintroduce concat 2015-01-13 12:47:54 -08:00
Mitchell Hashimoto 8d51b6b1d4 config/lang: variadic functions 2015-01-13 12:40:47 -08:00
Mitchell Hashimoto 4af4c9e16c config: add lookup function back 2015-01-13 12:06:04 -08:00
Mitchell Hashimoto 49fe0d5c7f config: remove a lot of unused stuff 2015-01-13 11:54:30 -08:00
Mitchell Hashimoto 1ccad4d729 config: convert fucntions, put functions into Scope 2015-01-13 11:50:44 -08:00
Mitchell Hashimoto 4ba7de17a9 config/lang: call the proper functions on Scope 2015-01-13 11:27:10 -08:00
Mitchell Hashimoto 2b679572b4 config/lang: TypeCheck 2015-01-13 11:25:46 -08:00
Mitchell Hashimoto 8ce7ef6188 config/lang: implement identifier semantic check 2015-01-13 11:24:42 -08:00
Mitchell Hashimoto 5abbde3ac9 config: remove unused files 2015-01-13 10:32:03 -08:00
Mitchell Hashimoto 740c25d4ea config: convert to config/lang 2015-01-13 10:27:57 -08:00
Mitchell Hashimoto e68fbceebc config/lang: fix bug parsing empty strings 2015-01-13 10:27:31 -08:00
Mitchell Hashimoto c424a8a815 config/lang: FixedValueTransform 2015-01-13 10:10:33 -08:00
Mitchell Hashimoto d1a0ea9d9b config/lang: make formal Stack object 2015-01-13 09:46:13 -08:00
Mitchell Hashimoto 6d9db3139c config/lang: AST String() methods 2015-01-13 08:50:28 -08:00
Mitchell Hashimoto abca82a84e config: another test 2015-01-12 12:13:30 -08:00
Mitchell Hashimoto aa2c7b2764 config: DetectVariables to detect interpolated variables in an AST 2015-01-12 12:09:43 -08:00
Mitchell Hashimoto c05d7a6acd config/lang: escaping interpolations with double dollar signs 2015-01-12 11:00:56 -08:00
Mitchell Hashimoto c15c17dfe9 config/lang: remove unused file 2015-01-12 10:48:20 -08:00
Mitchell Hashimoto f836397d8d config/lang: enable type checking in execution 2015-01-12 10:21:18 -08:00
Mitchell Hashimoto ec3b5f3886 config/lang: implement type lookup 2015-01-12 09:57:16 -08:00
Mitchell Hashimoto 25a2fbc902 config/lang: integer and float types 2015-01-12 08:53:27 -08:00
Mitchell Hashimoto a0926de4a9 config/lang: completed type checking 2015-01-12 00:35:43 -08:00
Mitchell Hashimoto 662760da11 config/lang: have position in AST 2015-01-12 00:28:47 -08:00
Mitchell Hashimoto d3b1010444 config/lang: start implementing type checking 2015-01-11 23:38:21 -08:00
Mitchell Hashimoto 8f925b93e0 config/lang: function calls work 2015-01-11 15:33:24 -08:00
Mitchell Hashimoto 4ae8cae9e7 config/lang: execution 2015-01-11 15:26:54 -08:00
Mitchell Hashimoto fa7891d182 config/lang/ast: use stringer to generate enums 2015-01-11 14:35:14 -08:00
Mitchell Hashimoto 1ff5a838a4 config/lang: can parse nested interpolations 2015-01-11 13:59:24 -08:00
Mitchell Hashimoto 669bdc61f9 config/lang: more implemented 2015-01-11 13:03:37 -08:00
Mitchell Hashimoto fcdcf117f0 config/lang: initial work 2015-01-11 12:38:45 -08:00
Armon Dadgar 69ca9efeea Merge pull request #700 from Banno/fix-interpolated-func-with-colon
Adding colon to interpolated regex so they can be used in concats
2015-01-05 11:42:46 -08:00
Mitchell Hashimoto 6b7dfb4c8f config: some extra comments 2014-12-26 09:05:24 +05:30
Luke Amdor e970eea3cd adding literal colon to interpolated regex 2014-12-21 14:13:41 -06:00
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
Mitchell Hashimoto 1ef167602e config/module: validate that required parameters are passed through 2014-09-24 19:40:06 -07:00
Mitchell Hashimoto a36b3e1ec5 command: tests pass 2014-09-24 15:48:46 -07:00
Mitchell Hashimoto 718fb42f4b terraform: Plan should use module.Tree 2014-09-24 14:56:48 -07:00
Mitchell Hashimoto 97da02c368 config/module: proper name for root 2014-09-22 16:39:01 -07:00
Mitchell Hashimoto ed538a9594 command: Get command, not functional yet. Converted to use modules. 2014-09-22 10:56:50 -07:00
Mitchell Hashimoto 9a626b3e8c config/module: support HTTP protocol 2014-09-16 13:44:12 -07:00
Mitchell Hashimoto fde151978e config/module: parallelize some things 2014-09-16 12:02:35 -07:00
Mitchell Hashimoto 27564fff2b config/module: detect BitBucket URLs 2014-09-16 11:55:14 -07:00
Mitchell Hashimoto 5480eb4e41 config/module: detect preserves forces 2014-09-16 10:54:23 -07:00
Mitchell Hashimoto 2a655bc7d9 config/module: detect GitHub URLs 2014-09-16 10:52:08 -07:00
Mitchell Hashimoto 9c74d6b5c0 config/module: hg supports branches/tags/etc. 2014-09-16 10:30:55 -07:00
Mitchell Hashimoto feb9a36597 config/module: tests to verify that params are preserved on files 2014-09-16 10:06:44 -07:00
Mitchell Hashimoto ac19a488d2 config/module: support branches in git 2014-09-16 10:02:11 -07:00
Mitchell Hashimoto 13d892217c config/module: fix some issues where tag re-pulling didnt' work 2014-09-16 09:59:09 -07:00
Mitchell Hashimoto dcb900470c config/module: git supports tags 2014-09-16 09:55:51 -07:00
Mitchell Hashimoto 7e94f7d4a9 config/module: Mercurial support 2014-09-16 09:34:23 -07:00
Mitchell Hashimoto fc71d7091f config/module: Git test... this is kind of ghetto 2014-09-16 00:03:20 -07:00
Mitchell Hashimoto 96385113e7 config/module: delete weird subproject business 2014-09-15 23:55:07 -07:00
Mitchell Hashimoto 3e2989daf1 config/module: test Git 2014-09-15 23:52:27 -07:00
Mitchell Hashimoto acb6d12a75 config/module: support forced getters with TYPE::URL syntax 2014-09-15 23:48:56 -07:00
Mitchell Hashimoto cf4885d2fd config/module: git support 2014-09-15 23:32:30 -07:00
Mitchell Hashimoto 7bbf6a0d3a config/module: NewTreeModule is easier to use 2014-09-15 15:49:07 -07:00
Mitchell Hashimoto c0a30d3337 config: TestString 2014-09-15 15:43:12 -07:00
Mitchell Hashimoto 292f57ea0a config/module: validate outputs line up with ModuleVariables 2014-09-15 13:57:07 -07:00
Mitchell Hashimoto b60da29d48 config: validate that variables reference valid modules 2014-09-15 11:45:41 -07:00
Mitchell Hashimoto 46c140c797 config: can parse module variables 2014-09-15 11:40:25 -07:00
Mitchell Hashimoto 12e7c75211 config/module: validate that parameters into modules valid 2014-09-15 10:32:41 -07:00
Mitchell Hashimoto 2419bf79f2 config/module: error if duplicate module 2014-09-15 09:53:29 -07:00
Mitchell Hashimoto 4fdb6d1b52 config: add test for empty file 2014-09-15 09:41:00 -07:00
Mitchell Hashimoto c9fd910c41 config/module: Validate 2014-09-15 09:37:40 -07:00
Mitchell Hashimoto 30b76ef820 config/module: tree.String() 2014-09-14 20:14:37 -07:00
Mitchell Hashimoto 85d1e40644 config/module: can load a tree properly 2014-09-14 20:00:17 -07:00
Mitchell Hashimoto e96fe43814 config: dir on Config should be an absolute path 2014-09-14 19:55:38 -07:00
Mitchell Hashimoto f8836290da config: not directory that config was loaded from 2014-09-14 19:35:38 -07:00
Mitchell Hashimoto 6eee9fbcb3 config/module: file paths require pwd 2014-09-14 19:28:18 -07:00
Mitchell Hashimoto a35a9262d4 config/module: detectors, some more work on Tree 2014-09-14 16:17:29 -07:00
Mitchell Hashimoto 799ffbb3ac config/module: tree.Modules() 2014-09-14 14:46:45 -07:00
Mitchell Hashimoto 8dc8eac4bf config: change module syntax 2014-09-14 14:43:54 -07:00
Mitchell Hashimoto 5e4c2b4f49 config/module: test that symlink that exists will be overwritten 2014-09-14 10:36:02 -07:00
Mitchell Hashimoto fa997525c2 config/module: Get tests 2014-09-13 18:58:21 -07:00
Mitchell Hashimoto c2fe35e74e config/module: FileGetter tests 2014-09-13 18:54:12 -07:00
Mitchell Hashimoto bb22090040 config/module: start, lots of initial work 2014-09-13 17:45:56 -07:00
Mitchell Hashimoto dd6f536fab config: Merge for modules works 2014-09-11 19:54:02 -07:00
Mitchell Hashimoto e7fe5aa452 config: Append works with modules 2014-09-11 19:50:41 -07:00
Mitchell Hashimoto 610e92cab2 config: validate no duplicate modules 2014-09-11 16:02:36 -07:00
Mitchell Hashimoto 2a6990e2b9 config: `module` structures parse 2014-09-11 15:58:30 -07:00
Mitchell Hashimoto c724f161c5 config: parse multi-args in interpolations [GH-282] 2014-09-09 14:39:32 -07:00
Mitchell Hashimoto 21472e98b8 config: unit tests for lexer 2014-09-09 14:34:03 -07:00
Mitchell Hashimoto ffcacca191 config: don't crash when there is an error parsing interpolation
[GH-282]
2014-09-09 14:28:32 -07:00
Mitchell Hashimoto eac01c2ac8 config: replace interpolations in block keys [GH-234] 2014-08-27 13:29:02 -07:00
Mitchell Hashimoto 56cf1e6faa Fix go vet complaints 2014-08-24 21:50:35 -07:00
Mitchell Hashimoto f26a2700a1 fmt 2014-08-22 08:46:03 -07:00
Mitchell Hashimoto da2e221628 terraform: Interpolate if there are any interpolations [GH-159] 2014-08-21 15:05:56 -07:00
Mitchell Hashimoto 4a3dff2441 config: allow '/' in string args 2014-08-21 11:33:52 -07:00
Mitchell Hashimoto 2fb001dcf9 config: add `concat` function [GH-191] 2014-08-19 13:14:45 -07:00
Mitchell Hashimoto 04975827ac Remove all traces of libucl 2014-08-19 09:57:04 -07:00
Mitchell Hashimoto 3e3be5e2a3 config: only walk if non-nil 2014-08-11 21:55:47 -07:00
Mitchell Hashimoto 2fd545bca1 config: use new HCL lib and structure 2014-08-11 21:51:24 -07:00
Mitchell Hashimoto 038cca291e config: HCL loader 2014-08-11 09:58:53 -07:00
Mitchell Hashimoto fe2a306341 config: validate no interp in var [GH-180] 2014-08-11 09:46:56 -07:00
Alex Gaynor 46154ca1d3 Fixed a ton of typos in docs and comments 2014-08-07 00:19:56 -07:00
Mitchell Hashimoto 8c7b80d172 Merge pull request #61 from carlosdp/fix-maps-race
Fix maps iteration order error in append_test, merge_test, and graphviz_test
2014-08-05 10:34:09 -07:00
Mitchell Hashimoto 742e33c672 config: accept file("test.txt") [GH-145] 2014-08-05 10:28:20 -07:00
Mitchell Hashimoto b19a976696 config: additional tests for sanity 2014-08-05 10:11:56 -07:00
Carlos Diaz-Padron 47529f829e Fix maps race in append and merge tests 2014-07-28 23:17:48 -07:00
Mitchell Hashimoto d28e5a1638 dos2unix 2014-07-28 10:43:00 -07:00
Mitchell Hashimoto 99a4439359 config: nicer error if dir isn't a dir 2014-07-28 08:34:43 -07:00
Mitchell Hashimoto f9f4e62411 config: validate that count is >= 1 2014-07-26 14:49:55 -07:00
Mitchell Hashimoto fa175113fe config: case sensitive templates 2014-07-23 08:38:43 -07:00
Mitchell Hashimoto 0d12c3f5b8 config: fmt 2014-07-22 18:35:53 -07:00
Mitchell Hashimoto 80385c7682 config: add file() function for reading file contents 2014-07-22 18:35:36 -07:00
Mitchell Hashimoto 625fb65526 config: make errors a bit nicer 2014-07-22 18:29:45 -07:00
Mitchell Hashimoto 20da842bcf config: validate dependsOn 2014-07-22 17:16:48 -07:00
Mitchell Hashimoto 0699cde1d4 config: depends_on meta-parameter 2014-07-22 17:10:17 -07:00
Mitchell Hashimoto 1e2de8f91c config: more tests 2014-07-22 16:18:05 -07:00
Mitchell Hashimoto bff5c09164 config: test nested function calls 2014-07-22 16:16:46 -07:00
Mitchell Hashimoto 7dfd4f5a3c config: tests for the parser 2014-07-22 16:08:19 -07:00
Mitchell Hashimoto de1c23617a config: don't panic on parse error of variables 2014-07-22 16:02:09 -07:00
Mitchell Hashimoto 4f57437144 config: parser fixes and application 2014-07-22 15:59:53 -07:00
Mitchell Hashimoto 1dcefba5c4 config: parser 2014-07-22 15:23:01 -07:00
Mitchell Hashimoto db160a0249 config: add LiteralInterpolation 2014-07-22 14:21:47 -07:00
Mitchell Hashimoto 935fa1d6fb config: tests 2014-07-22 08:53:03 -07:00
Mitchell Hashimoto 7b3a462ad1 config: remove UserMapVariable 2014-07-22 08:51:50 -07:00
Mitchell Hashimoto b10b678326 config: fix error message in validation 2014-07-22 08:47:10 -07:00
Mitchell Hashimoto f9e6754763 config: comments 2014-07-22 08:43:16 -07:00
Mitchell Hashimoto 61938c070f config: validate type of default to string or mapping for var 2014-07-22 08:34:24 -07:00
Mitchell Hashimoto e59ff6e92c terraform: fix tests 2014-07-22 08:29:49 -07:00
Mitchell Hashimoto fe2285898a config: DefaultsMap should return nil if nil 2014-07-22 08:10:06 -07:00
Mitchell Hashimoto c9a20c3c58 terraform: test that mapping lookups work 2014-07-22 08:06:09 -07:00
Mitchell Hashimoto c988be9ce7 config: DefaultsMap 2014-07-22 07:41:55 -07:00
Mitchell Hashimoto aeb085c5f0 config: error if variable interpolation can't find variable 2014-07-22 06:51:02 -07:00
Mitchell Hashimoto 7578fb8bdc config: interpolationWalker detects functions 2014-07-22 06:43:04 -07:00
Mitchell Hashimoto 8b5cc5d534 config: lookup function works + tests 2014-07-21 13:12:43 -07:00
Mitchell Hashimoto 6a191d7395 config: function calls work 2014-07-21 12:56:41 -07:00
Mitchell Hashimoto cabc007ec4 config: get rid of the variable*Walkers, replace with more generic 2014-07-21 11:45:56 -07:00
Mitchell Hashimoto 4099c64833 config: tests, so many tests 2014-07-21 11:36:21 -07:00
Mitchell Hashimoto e8fe26488a config: interpolationWalk seems to work 2014-07-21 11:30:43 -07:00
Mitchell Hashimoto 4c9e0f395c config: basic interpolationWalker 2014-07-21 11:24:44 -07:00
Mitchell Hashimoto 582b0cf43e config: introduce Interpolation, not hooked up completely yet 2014-07-21 10:39:55 -07:00
Mitchell Hashimoto b772f8078d config: detect UserMapVariable 2014-07-21 08:55:45 -07:00
Mitchell Hashimoto b8a0a02217 config: TODO tests for validation 2014-07-21 08:34:44 -07:00
Mitchell Hashimoto b0ce89b805 config: change Default to an interface{} 2014-07-21 07:32:36 -07:00
Mitchell Hashimoto e396b8f3d9 config: test that multiple overrides work 2014-07-20 17:56:02 -07:00
Mitchell Hashimoto 77ff9c3a6b config: some docs 2014-07-20 17:54:16 -07:00
Mitchell Hashimoto 06cdd4fa42 config: LoadDir loads override files 2014-07-20 17:52:46 -07:00
Mitchell Hashimoto 9d2e83d56d config: Merge works properly 2014-07-20 17:17:03 -07:00
Mitchell Hashimoto cf1f3a9e73 config: test that LoadDir doesn't merge 2014-07-19 16:44:23 -07:00
Mitchell Hashimoto 69b7bc5047 config: add Append function 2014-07-19 16:39:40 -07:00
Mitchell Hashimoto 7bd7e4218f config: make ProviderConfigs slice 2014-07-19 16:05:48 -07:00
Mitchell Hashimoto 3834846418 config: Outputs is now a slice 2014-07-18 22:21:52 -07:00
Mitchell Hashimoto a19e2983de terraform: tests passing for Config change 2014-07-18 22:13:15 -07:00
Mitchell Hashimoto e4bcd3c448 config: Variables is now a slice 2014-07-18 17:48:30 -07:00
Mitchell Hashimoto a583b800a4 config: add unknownKeys to Merge 2014-07-18 17:20:56 -07:00
Mitchell Hashimoto 3d67c967aa config: make Merge an exported func 2014-07-18 17:05:22 -07:00
Mitchell Hashimoto 9cd1018f0b config: config files can be in JSON, as well 2014-07-18 16:54:52 -07:00
Mitchell Hashimoto 596e0f7f13 config: make dupped nil for GC reasons 2014-07-18 16:31:32 -07:00
Mitchell Hashimoto 50095612a2 config: resource should be unique 2014-07-18 16:31:01 -07:00
Mitchell Hashimoto 5329124cf9 config: unknown keys give errors 2014-07-18 16:00:21 -07:00
Armon Dadgar 2f2f5890f4 config: Testing loading of connection blocks 2014-07-15 12:34:06 -07:00
Armon Dadgar 36b1a2b9e8 config: Parse out special 'connection' blocks 2014-07-15 12:34:06 -07:00
Mitchell Hashimoto 7a01e781ab config: LoadDir with no matching files errors 2014-07-11 21:04:59 -07:00
Mitchell Hashimoto 6dfebcae69 config: test that we only load tf files 2014-07-11 20:17:25 -07:00
Mitchell Hashimoto 8655711a3f config: test that LoadDir doesn't load nested 2014-07-11 20:16:49 -07:00
Mitchell Hashimoto 14b29d0ecd config: LoadDir 2014-07-11 20:15:09 -07:00
Mitchell Hashimoto 9d028ab6de config: reword for ".tf" extension force 2014-07-11 20:05:38 -07:00
Armon Dadgar 34e733724d config: Update test to handle count 2014-07-10 11:38:55 -07:00
Mitchell Hashimoto e250a6f36c config: understand "provisioner" blocks 2014-07-10 11:38:55 -07:00
Mitchell Hashimoto 021a0db636 config: deterministic test ordering 2014-07-08 14:57:47 -07:00
Mitchell Hashimoto cfb08b6c60 config: mark even index accesses as a multi-access 2014-07-06 13:56:18 -07:00
Mitchell Hashimoto aa6a758f6b config: if count > 1, variable references must have index
/cc @pearkes - Here is that validation
2014-07-06 13:46:56 -07:00
Mitchell Hashimoto 07f98f7ee7 config: special detect ResourceVariables for multi-access 2014-07-05 10:34:52 -07:00
Mitchell Hashimoto ed1860de61 config: validate output only has "value" field 2014-07-04 10:57:09 -07:00
Mitchell Hashimoto a4f38a3933 config: validate resource variables in output 2014-07-04 10:53:36 -07:00
Mitchell Hashimoto cc2bb950a1 config: can parse outputs 2014-07-04 10:43:06 -07:00
Mitchell Hashimoto 5e79ddf7c6 config: detect variables in form of resource.name.*.blah 2014-07-03 20:41:26 -07:00
Mitchell Hashimoto 3337a625af config: support count meta-parameter 2014-07-03 20:11:58 -07:00
Mitchell Hashimoto 947fa4e669 terraform: Context introduction 2014-07-03 10:14:17 -07:00
Mitchell Hashimoto 78e056770c config: validate that resource references are valid 2014-07-02 21:06:26 -07:00
Mitchell Hashimoto 532cc33189 config: semantic check on variable references 2014-07-02 21:01:03 -07:00
Mitchell Hashimoto e50425b182 config: style 2014-07-02 12:04:37 -07:00
Mitchell Hashimoto 49e8477e9d config: fix order-dependent tests 2014-07-02 10:05:39 -07:00
Mitchell Hashimoto 7ab7ce17d9 config: tests passing for bug @pearkes found 2014-07-02 09:11:31 -07:00
Jack Pearkes d84c5fb015 config: fix libucl in test case (still failing) 2014-07-01 21:18:01 -07:00
Jack Pearkes bef1495c96 config: add failing test case for nested objects 2014-07-01 21:16:47 -07:00
Mitchell Hashimoto 2aed2fd96f Fix various order-dependent tests 2014-07-01 10:28:42 -07:00
Mitchell Hashimoto 46d3800a39 config: remove some unused test fixtures 2014-06-24 15:02:02 -07:00
Mitchell Hashimoto 1918f199d8 terraform: Graph, config: don't build graph 2014-06-24 14:58:57 -07:00
Mitchell Hashimoto 9acb9535ad config: ProviderConfigName shouldn't be on Resource 2014-06-24 13:29:07 -07:00
Mitchell Hashimoto d1cfb38bb8 config: ReplaceVariables is public 2014-06-20 11:41:12 -07:00
Mitchell Hashimoto d2001275dc terraform: initial Plan structure
This is REALLY heavy and would be really hard to maintain any sort
of compatibility with, but it is what we're going to do during dev
initially (if we don't ship with it) in order to just get stuff working.
2014-06-20 10:33:26 -07:00
Mitchell Hashimoto 69841c22e6 config: RawConfig.Config returns raw if no interpolate 2014-06-12 17:47:05 -07:00
Mitchell Hashimoto 8c50aa6382 config: use the RawConfig whereever posible 2014-06-12 17:40:59 -07:00
Mitchell Hashimoto 6420e4bd81 config: reorder 2014-06-12 17:27:53 -07:00
Mitchell Hashimoto bbca28a0ef config: test double interpolating 2014-06-12 17:26:05 -07:00
Mitchell Hashimoto e445f8db38 config: RawConfig works, plus tests 2014-06-12 17:24:55 -07:00
Mitchell Hashimoto a24b30b8d2 config: remove redundant variables 2014-06-12 17:03:15 -07:00
Mitchell Hashimoto 0ad9d9ddc7 config: keep track of unknown keys during interpolate 2014-06-12 17:00:50 -07:00
Mitchell Hashimoto 1af5aee146 config: remove unknown variable elements from the config 2014-06-12 16:40:53 -07:00
Mitchell Hashimoto e502bf6ba9 config: comply to reflectwalk interface 2014-06-12 16:24:08 -07:00
Mitchell Hashimoto 23d96248aa No need for a root name constant, just check for Meta == nil 2014-06-05 12:59:55 -07:00
Mitchell Hashimoto 82d527f798 config: rename ResourceGraph to Graph 2014-06-05 12:55:21 -07:00
Mitchell Hashimoto 867f6b3691 config: test to make sure that cycles are properly detected 2014-06-05 12:53:59 -07:00
Mitchell Hashimoto d2c3db552a config: providerconfigs can replace variables 2014-06-05 12:52:07 -07:00
Mitchell Hashimoto 3ccfd4d08c config: depgraph can contain provider configuratoins 2014-06-05 12:47:28 -07:00
Mitchell Hashimoto e2fa7094bd config: ProviderConfigName on Resource 2014-06-05 12:21:05 -07:00
Mitchell Hashimoto 7c6920bba1 terraform: diff/state work better together, merge 2014-06-05 06:57:06 -07:00
Mitchell Hashimoto bd1f235b9b config: allow applying variables to resources 2014-06-05 06:23:41 -07:00
Mitchell Hashimoto d731d033f1 terraform: build resource graph, validate 2014-06-03 17:14:19 -07:00
Mitchell Hashimoto 0008ff12c7 config: determine whether a variable is required properly 2014-06-03 15:55:51 -07:00
Mitchell Hashimoto 9895f8162f config: unix line endings in tests 2014-05-30 17:38:35 -07:00
Mitchell Hashimoto ab507814b7 config: support for provider configs 2014-05-25 18:05:18 -07:00
Mitchell Hashimoto 81bfa8970a config: make the tests a bit more intense 2014-05-24 14:02:49 -07:00
Mitchell Hashimoto bdeb278728 config: simplify 2014-05-24 13:58:33 -07:00
Mitchell Hashimoto dac18c823a config: can generate depgraph 2014-05-24 13:57:51 -07:00
Mitchell Hashimoto 3728e1cfc0 fmt 2014-05-24 12:51:31 -07:00
Mitchell Hashimoto 6983a0414a config: fix line endings on a test fixture 2014-05-24 11:44:48 -07:00
Mitchell Hashimoto bb0980f5ba config: tests for instantiating interpolated var types 2014-05-24 11:41:19 -07:00
Mitchell Hashimoto 9fef261eae config: comments 2014-05-24 11:36:22 -07:00
Mitchell Hashimoto 27c97b9b73 config: add benchmark for replace walker 2014-05-24 11:35:15 -07:00
Mitchell Hashimoto 2ecf1b500f config: careful with addressability and replacing variables 2014-05-23 23:15:00 -07:00
Mitchell Hashimoto 537fa6cc87 config: more tests for variable detector 2014-05-23 22:12:48 -07:00
Mitchell Hashimoto 1c9582ff38 config: set benchmark timer at right point 2014-05-23 22:11:33 -07:00
Mitchell Hashimoto 5bb51e50dd config: add benchmark test 2014-05-23 22:10:32 -07:00
Mitchell Hashimoto be83044f59 config: tests, error cases 2014-05-23 22:07:33 -07:00
Mitchell Hashimoto 95ef186bf8 config: can detect variables in config strings 2014-05-23 21:58:06 -07:00
Mitchell Hashimoto f22cc62b2c config: better memory management for libucl 2014-05-23 16:30:28 -07:00
Mitchell Hashimoto 50830e429a config: merge resources 2014-05-23 16:25:54 -07:00
Mitchell Hashimoto 14a25e6b58 config: merge configs 2014-05-23 16:09:41 -07:00
Mitchell Hashimoto aadb24aa08 config: error if unknown filetype 2014-05-23 15:42:29 -07:00
Mitchell Hashimoto 04d88b0540 config: move things out into more files 2014-05-23 15:35:18 -07:00
Mitchell Hashimoto c1dea5e5b3 config: comments 2014-05-23 15:32:34 -07:00
Mitchell Hashimoto 218cc80aab config: refactoring to be less libucl-specific 2014-05-23 15:28:19 -07:00
Mitchell Hashimoto 2ffee2a142 config: imports are relative to tf 2014-05-23 15:11:57 -07:00
Mitchell Hashimoto 88bb42b5a4 config: loader rename 2014-05-23 15:06:58 -07:00
Mitchell Hashimoto 7cfd360fea config: load the import tree 2014-05-23 15:06:37 -07:00
Mitchell Hashimoto fb9c58f0e2 config: better error message 2014-05-23 11:03:38 -07:00
Mitchell Hashimoto 089822a36f config: some comments 2014-05-23 10:52:19 -07:00
Mitchell Hashimoto ec3f72703c Initial work on config 2014-05-22 16:56:28 -07:00