Skip to content

Commit 0393316

Browse files
authored
plugin: Additional documentation clarification of ServeOpts type ProviderAddr field (#1050)
Reference: #1049
1 parent 6ffc927 commit 0393316

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

plugin/serve.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ type ServeOpts struct {
5555
// information needed for Terraform to connect to the provider to stdout.
5656
// os.Interrupt will be captured and used to stop the server.
5757
//
58+
// Ensure the ProviderAddr field is correctly set when this is enabled,
59+
// otherwise the TF_REATTACH_PROVIDERS environment variable will not
60+
// correctly point Terraform to the running provider binary.
61+
//
5862
// This option cannot be combined with TestConfig.
5963
Debug bool
6064

@@ -76,8 +80,11 @@ type ServeOpts struct {
7680
// the terraform-plugin-log logging sink.
7781
UseTFLogSink testing.T
7882

79-
// ProviderAddr is the address of the provider under test, like
80-
// registry.terraform.io/hashicorp/random.
83+
// ProviderAddr is the address of the provider under test or debugging,
84+
// such as registry.terraform.io/hashicorp/random. This value is used in
85+
// the TF_REATTACH_PROVIDERS environment variable during debugging so
86+
// Terraform can correctly match the provider address in the Terraform
87+
// configuration to the running provider binary.
8188
ProviderAddr string
8289
}
8390

0 commit comments

Comments
 (0)