Commit Graph

6 Commits

Author SHA1 Message Date
Mitchell Hashimoto f8c7b639c9
terraform: switch to Context for stop, Stoppable provisioners
This switches to the Go "context" package for cancellation and threads
the context through all the way to evaluation to allow behavior based on
stopping deep within graph execution.

This also adds the Stop API to provisioners so they can quickly exit
when stop is called.
2017-01-26 15:03:27 -08:00
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
Mitchell Hashimoto 8b129babe5 terraform: change provisioners to take UIOutput 2014-10-04 09:20:05 -07:00
Mitchell Hashimoto 95f3e626a5 terraform: modify the ResourceProvider API super hardcore 2014-09-16 16:20:11 -07:00
Mitchell Hashimoto 808036bf60 terraform: ResourceProvisioner can't return a state anymore 2014-07-22 09:56:39 -07:00
Armon Dadgar d46ca67f92 terraform: Adding resource provisioner interface 2014-07-10 11:38:55 -07:00