diff options
author | Nathan Dench <ndenc2@gmail.com> | 2019-05-24 15:16:44 +1000 |
---|---|---|
committer | Nathan Dench <ndenc2@gmail.com> | 2019-05-24 15:16:44 +1000 |
commit | 107c1cdb09c575aa2f61d97f48d8587eb6bada4c (patch) | |
tree | ca7d008643efc555c388baeaf1d986e0b6b3e28c /vendor/github.com/hashicorp/terraform/states/instance_generation.go | |
parent | 844b5a68d8af4791755b8f0ad293cc99f5959183 (diff) | |
download | terraform-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/states/instance_generation.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/states/instance_generation.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/states/instance_generation.go b/vendor/github.com/hashicorp/terraform/states/instance_generation.go new file mode 100644 index 0000000..617ad4e --- /dev/null +++ b/vendor/github.com/hashicorp/terraform/states/instance_generation.go | |||
@@ -0,0 +1,24 @@ | |||
1 | package states | ||
2 | |||
3 | // Generation is used to represent multiple objects in a succession of objects | ||
4 | // represented by a single resource instance address. A resource instance can | ||
5 | // have multiple generations over its lifetime due to object replacement | ||
6 | // (when a change can't be applied without destroying and re-creating), and | ||
7 | // multiple generations can exist at the same time when create_before_destroy | ||
8 | // is used. | ||
9 | // | ||
10 | // A Generation value can either be the value of the variable "CurrentGen" or | ||
11 | // a value of type DeposedKey. Generation values can be compared for equality | ||
12 | // using "==" and used as map keys. The zero value of Generation (nil) is not | ||
13 | // a valid generation and must not be used. | ||
14 | type Generation interface { | ||
15 | generation() | ||
16 | } | ||
17 | |||
18 | // CurrentGen is the Generation representing the currently-active object for | ||
19 | // a resource instance. | ||
20 | var CurrentGen Generation | ||
21 | |||
22 | type currentGen struct{} | ||
23 | |||
24 | func (g currentGen) generation() {} | ||