-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] build provider_meta feature into provider #474
base: main
Are you sure you want to change the base?
Conversation
$ make build && cp $GOPATH/bin/terraform-provider-awscc ~/.terraform.d/plugins/providermeta/hashicorp/awscc/0.0.1/darwin_amd64/
go install
# github.com/hashicorp/terraform-provider-awscc
./main.go:11:32: cannot use provider.New (type func() tfsdk.ProviderWithProviderMeta) as type func() tfsdk.Provider in argument to tfsdk.Serve
make: *** [build] Error 2 |
internal/provider/provider.go
Outdated
@@ -23,7 +23,7 @@ const ( | |||
defaultAssumeRoleDuration = 1 * time.Hour | |||
) | |||
|
|||
func New() tfsdk.Provider { | |||
func New() tfsdk.ProviderWithProviderMeta { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can still return tfsdk.Provider
here. As long as GetMetaSchema
is defined on AwsCloudControlApiProvider
, it will still fulfill the tfsdk.ProviderWithProviderMeta
interface
a8b16f4
to
78ef3c5
Compare
Unable to figure out how to extract the hcl provider_meta set in test I'm pretty sure the function Once the data is there, i think we have the functionality in place to unpack and add to the new ctx key for user-agent additions |
Community Note
Relates OR Closes #473, #466