terraform-provider-google/vendor/github.com/hashicorp/terraform/plans/action.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

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
}