Commit Graph

13 Commits

Author SHA1 Message Date
Sander van Harmelen 0b1dbf31a3 core: close provider/provisioner connections
Currently Terraform is leaking goroutines and with that memory. I know
strictly speaking this maybe isn’t a real concern for Terraform as it’s
mostly used as a short running command line executable.

But there are a few of us out there that are using Terraform in some
long running processes and then this starts to become a problem.

Next to that it’s of course good programming practise to clean up
resources when they're not needed anymore. So even for the standard
command line use case, this seems an improvement in resource management.

Personally I see no downsides as the primary connection to the plugin
is kept alive (the plugin is not killed) and only unused connections
that will never be used again are closed to free up any related
goroutines and memory.
2015-06-19 21:52:50 +02:00
Paul Hinze d1b40de242 terraform: fix provider config inheritance during input
The provider config was not being properly merged across module
boundaries during the Input walk over the graph, so when a provider was
configured at the top level, resources in modules could improperly
trigger a request for input for a provider attribute that's already
defined.
2015-04-10 16:28:47 -05:00
Mitchell Hashimoto bcff7e070c terraform: don't prune, but disable, inherited configs [GH-1447] 2015-04-09 08:48:08 -07:00
Mitchell Hashimoto a0839da71a terraform: merge provider configs before validate [GH-1282] 2015-03-25 16:28:52 -07:00
Mitchell Hashimoto 40ee70d5c9 terraform: Input should only be called on providers once
/cc @sethvargo

Prior to this commit, we'd only persist the result of calling Input if
any input was given (len(result) > 0). The result was that every module
would also repeat asking for input even if there was no input to be
asked for.

This commit makes it so that if no input was received, we still set a
sentinel so that modules don't re-ask.
2015-02-20 15:35:57 -08:00
Mitchell Hashimoto b52881d232 terraform: clean up EvalNodes 2015-02-19 12:08:32 -08:00
Mitchell Hashimoto 7c78a3749e terraform: provider input 2015-02-19 12:08:08 -08:00
Mitchell Hashimoto 93f3050dbd terraform: make things more linear 2015-02-19 12:08:04 -08:00
Mitchell Hashimoto 4089d33dea terraform: provider merging should be parent OVER child 2015-02-19 12:08:02 -08:00
Mitchell Hashimoto d847b2b672 terraform: provider config inheritance in modules 2015-02-19 12:07:59 -08:00
Mitchell Hashimoto c2df70e499 terraform: complete more nodes 2015-02-19 12:07:54 -08:00
Mitchell Hashimoto ac92c67cba terraform: some tests for the eval nodes 2015-02-19 12:07:54 -08:00
Mitchell Hashimoto 128c07e504 terraform: start eval stuff, untested 2015-02-19 12:07:54 -08:00