plans: Move "planproto" up to toplevel

The Go package containing the generated stubs for the plan file format's
protobuf messages was previously nestled as an internal package under
"plans", making it importable only for source files under "plans".

To avoid duplicating various message types into the new "stack plan"
serialization, we'll now make this package internal to the whole of
this codebase rather than just to "plans", and then have the stack data
protocol buffers schema import it to reuse the same message types.
pull/34738/head
Martin Atkins 3 years ago
parent d857c75e33
commit 9942deded1

@ -17,7 +17,7 @@ import (
"github.com/hashicorp/terraform/internal/lang/globalref"
"github.com/hashicorp/terraform/internal/lang/marks"
"github.com/hashicorp/terraform/internal/plans"
"github.com/hashicorp/terraform/internal/plans/internal/planproto"
"github.com/hashicorp/terraform/internal/plans/planproto"
"github.com/hashicorp/terraform/internal/states"
"github.com/hashicorp/terraform/version"
)

@ -1538,12 +1538,11 @@ var file_planfile_proto_rawDesc = []byte{
0x41, 0x55, 0x53, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x4e, 0x45, 0x53, 0x54, 0x45,
0x44, 0x10, 0x0d, 0x12, 0x21, 0x0a, 0x1d, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x42, 0x45,
0x43, 0x41, 0x55, 0x53, 0x45, 0x5f, 0x4e, 0x4f, 0x5f, 0x4d, 0x4f, 0x56, 0x45, 0x5f, 0x54, 0x41,
0x52, 0x47, 0x45, 0x54, 0x10, 0x0c, 0x42, 0x42, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x52, 0x47, 0x45, 0x54, 0x10, 0x0c, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x74,
0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x6c, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x6c, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

@ -6,7 +6,7 @@ package tfplan;
// For Terraform's own parsing, the proto stub types go into an internal Go
// package. The public API is in github.com/hashicorp/terraform/plans/planfile .
option go_package = "github.com/hashicorp/terraform/internal/plans/internal/planproto";
option go_package = "github.com/hashicorp/terraform/internal/plans/planproto";
// Plan is the root message type for the tfplan file
message Plan {

@ -60,7 +60,7 @@ var protocSteps = []protocStep{
},
{
"tfplan (plan file serialization)",
"internal/plans/internal/planproto",
"internal/plans/planproto",
[]string{"--go_out=paths=source_relative:.", "planfile.proto"},
},
{

Loading…
Cancel
Save