terraform-provider-google/vendor/github.com/hashicorp/terraform/states/instance_generation.go
Riley Karson dbf9188792
Vendor 0.12 SDK (#3432)
```bash
GO111MODULE=on go get github.com/hashicorp/terraform@pluginsdk-v0.12-early7
GO111MODULE=on go mod vendor
GO111MODULE=on go mod tidy
```
2019-04-15 13:39:47 -07:00

25 lines
928 B
Go

package states
// Generation is used to represent multiple objects in a succession of objects
// represented by a single resource instance address. A resource instance can
// have multiple generations over its lifetime due to object replacement
// (when a change can't be applied without destroying and re-creating), and
// multiple generations can exist at the same time when create_before_destroy
// is used.
//
// A Generation value can either be the value of the variable "CurrentGen" or
// a value of type DeposedKey. Generation values can be compared for equality
// using "==" and used as map keys. The zero value of Generation (nil) is not
// a valid generation and must not be used.
type Generation interface {
generation()
}
// CurrentGen is the Generation representing the currently-active object for
// a resource instance.
var CurrentGen Generation
type currentGen struct{}
func (g currentGen) generation() {}