|
|
|
|
@ -26,8 +26,10 @@ import (
|
|
|
|
|
"github.com/hashicorp/terraform/version"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const tfplanFormatVersion = 3
|
|
|
|
|
const tfplanFilename = "tfplan"
|
|
|
|
|
const (
|
|
|
|
|
tfplanFormatVersion = 3
|
|
|
|
|
tfplanFilename = "tfplan"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
// This file deals with the internal structure of the "tfplan" sub-file within
|
|
|
|
|
@ -410,7 +412,6 @@ func ActionFromProto(rawAction planproto.Action) (plans.Action, error) {
|
|
|
|
|
default:
|
|
|
|
|
return plans.NoOp, fmt.Errorf("invalid change action %s", rawAction)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func changeFromTfplan(rawChange *planproto.Change) (*plans.ChangeSrc, error) {
|
|
|
|
|
@ -1448,3 +1449,12 @@ func actionInvocationToTfPlan(action *plans.ActionInvocationInstanceSrc) (*planp
|
|
|
|
|
|
|
|
|
|
return ret, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ActionInvocationToProto encodes an action invocation from its internal
|
|
|
|
|
// representation into the protobuf representation for persistence.
|
|
|
|
|
//
|
|
|
|
|
// This is a public wrapper around actionInvocationToTfPlan for use by
|
|
|
|
|
// external packages like stackplan.
|
|
|
|
|
func ActionInvocationToProto(action *plans.ActionInvocationInstanceSrc) (*planproto.ActionInvocationInstance, error) {
|
|
|
|
|
return actionInvocationToTfPlan(action)
|
|
|
|
|
}
|
|
|
|
|
|