mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 16:31:10 -06:00
f40800b3a4
This is part of a general effort to move all of Terraform's non-library package surface under internal in order to reinforce that these are for internal use within Terraform only. If you were previously importing packages under this prefix into an external codebase, you could pin to an earlier release tag as an interim solution until you've make a plan to achieve the same functionality some other way.
21 lines
865 B
Go
21 lines
865 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
|