aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/provisioners/factory.go
diff options
context:
space:
mode:
authorNathan Dench <ndenc2@gmail.com>2019-05-24 15:16:44 +1000
committerNathan Dench <ndenc2@gmail.com>2019-05-24 15:16:44 +1000
commit107c1cdb09c575aa2f61d97f48d8587eb6bada4c (patch)
treeca7d008643efc555c388baeaf1d986e0b6b3e28c /vendor/github.com/hashicorp/terraform/provisioners/factory.go
parent844b5a68d8af4791755b8f0ad293cc99f5959183 (diff)
downloadterraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.gz
terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.zst
terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.zip
Upgrade to 0.12
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/provisioners/factory.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/provisioners/factory.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/provisioners/factory.go b/vendor/github.com/hashicorp/terraform/provisioners/factory.go
new file mode 100644
index 0000000..590b97a
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform/provisioners/factory.go
@@ -0,0 +1,19 @@
1package provisioners
2
3// Factory is a function type that creates a new instance of a resource
4// provisioner, or returns an error if that is impossible.
5type Factory func() (Interface, error)
6
7// FactoryFixed is a helper that creates a Factory that just returns some given
8// single provisioner.
9//
10// Unlike usual factories, the exact same instance is returned for each call
11// to the factory and so this must be used in only specialized situations where
12// the caller can take care to either not mutate the given provider at all
13// or to mutate it in ways that will not cause unexpected behavior for others
14// holding the same reference.
15func FactoryFixed(p Interface) Factory {
16 return func() (Interface, error) {
17 return p, nil
18 }
19}