github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/plans/action.go (about)

     1  package plans
     2  
     3  type Action rune
     4  
     5  const (
     6  	NoOp             Action = 0
     7  	Create           Action = '+'
     8  	Read             Action = '←'
     9  	Update           Action = '~'
    10  	DeleteThenCreate Action = '∓'
    11  	CreateThenDelete Action = '±'
    12  	Delete           Action = '-'
    13  )
    14  
    15  //go:generate go run golang.org/x/tools/cmd/stringer -type Action
    16  
    17  // IsReplace returns true if the action is one of the two actions that
    18  // represents replacing an existing object with a new object:
    19  // DeleteThenCreate or CreateThenDelete.
    20  func (a Action) IsReplace() bool {
    21  	return a == DeleteThenCreate || a == CreateThenDelete
    22  }