Commit Graph

55 Commits

Author SHA1 Message Date
James Nugent f4164b5322 Add resource with heredoc to config load tests
This test reproduces the issue which is likely the root cause of #3840.
Test is currently failing with an "illegal character" message
corresponding with the location of the heredoc, which is also seen in
various acceptance tests for providers.
2015-11-10 18:12:21 -05:00
Rob Zienert a1939e70f7 Adding ignore_changes lifecycle meta property 2015-10-14 16:34:27 -05:00
Mitchell Hashimoto 461f6557c7 config: fix test error 2015-06-23 22:30:41 -07:00
Mitchell Hashimoto fafc32b183 Merge branch 'b-prevent-destroy-type' 2015-06-23 22:29:54 -07:00
Sander van Harmelen c62370f9e9 Add a function to load JSON directly
Without this 12 line function it’s impossible to use any of the
Terraform code without the need for having the files on disk. As more
and more people are using (parts of) Terraform in other software, this
seems to be a very welcome addition. It has no negative impact on
Terraform itself whatsoever (the function is never called), but it
opens up a lot of other use cases.

Next to the single new function, I renamed the existing function (and
related tests) to better reflect what the function does. So now there
is a `LoadDir` function which calls `LoadFile` for each file, which
kind of made sense to me, especially when now adding a `LoadJSON`
function as well.

But of course if the rename is a problem, I can revert that part as
it’s not related to the added `LoadJSON` function.

Thanks!
2015-06-23 16:15:26 +02:00
Mitchell Hashimoto aa1e66c16c config: parse lifecycle block with mapstructure for weak decode 2015-06-07 22:04:23 -07:00
Mitchell Hashimoto fdded8ca14 config: allow atlas block 2015-03-24 13:30:22 -07:00
Mitchell Hashimoto 91a3405e88 config: understand provisioner blocks in JSON [GH-807] 2015-01-16 10:14:48 -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
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 6cbadf14df config: IsEmptyDir is true if dir doesn't exist 2014-09-26 16:28:18 -07:00
Mitchell Hashimoto 57c1a8dada config: add IsEmptyDir 2014-09-26 16:04:09 -07:00
Mitchell Hashimoto c0a30d3337 config: TestString 2014-09-15 15:43:12 -07:00
Mitchell Hashimoto b60da29d48 config: validate that variables reference valid modules 2014-09-15 11:45:41 -07:00
Mitchell Hashimoto 4fdb6d1b52 config: add test for empty file 2014-09-15 09:41:00 -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 8dc8eac4bf config: change module syntax 2014-09-14 14:43:54 -07:00
Mitchell Hashimoto 2a6990e2b9 config: `module` structures parse 2014-09-11 15:58:30 -07:00
Mitchell Hashimoto 038cca291e config: HCL loader 2014-08-11 09:58:53 -07:00
Mitchell Hashimoto 99a4439359 config: nicer error if dir isn't a dir 2014-07-28 08:34:43 -07:00
Mitchell Hashimoto fa175113fe config: case sensitive templates 2014-07-23 08:38:43 -07:00
Mitchell Hashimoto 0699cde1d4 config: depends_on meta-parameter 2014-07-22 17:10:17 -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 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 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 e4bcd3c448 config: Variables is now a slice 2014-07-18 17:48:30 -07:00
Mitchell Hashimoto 9cd1018f0b config: config files can be in JSON, as well 2014-07-18 16:54:52 -07:00
Armon Dadgar 2f2f5890f4 config: Testing loading of 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 14b29d0ecd config: LoadDir 2014-07-11 20:15:09 -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 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 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
Mitchell Hashimoto 2aed2fd96f Fix various order-dependent tests 2014-07-01 10:28:42 -07:00
Mitchell Hashimoto 8c50aa6382 config: use the RawConfig whereever posible 2014-06-12 17:40:59 -07:00
Mitchell Hashimoto 0008ff12c7 config: determine whether a variable is required properly 2014-06-03 15:55:51 -07:00
Mitchell Hashimoto ab507814b7 config: support for provider configs 2014-05-25 18:05:18 -07:00
Mitchell Hashimoto dac18c823a config: can generate depgraph 2014-05-24 13:57:51 -07:00
Mitchell Hashimoto 95ef186bf8 config: can detect variables in config strings 2014-05-23 21:58:06 -07:00