mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-07 09:36:44 +00:00
![Riley Karson](/assets/img/avatar_default.png)
```bash GO111MODULE=on go get github.com/hashicorp/terraform@pluginsdk-v0.12-early7 GO111MODULE=on go mod vendor GO111MODULE=on go mod tidy ```
23 lines
567 B
Go
23 lines
567 B
Go
package plans
|
|
|
|
type Action rune
|
|
|
|
const (
|
|
NoOp Action = 0
|
|
Create Action = '+'
|
|
Read Action = '←'
|
|
Update Action = '~'
|
|
DeleteThenCreate Action = '∓'
|
|
CreateThenDelete Action = '±'
|
|
Delete Action = '-'
|
|
)
|
|
|
|
//go:generate stringer -type Action
|
|
|
|
// IsReplace returns true if the action is one of the two actions that
|
|
// represents replacing an existing object with a new object:
|
|
// DeleteThenCreate or CreateThenDelete.
|
|
func (a Action) IsReplace() bool {
|
|
return a == DeleteThenCreate || a == CreateThenDelete
|
|
}
|