aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/states/instance_generation.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/states/instance_generation.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/states/instance_generation.go24
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 @@
1package 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.
14type Generation interface {
15 generation()
16}
17
18// CurrentGen is the Generation representing the currently-active object for
19// a resource instance.
20var CurrentGen Generation
21
22type currentGen struct{}
23
24func (g currentGen) generation() {}