mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucket.git
synced 2026-01-15 00:04:08 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e00156fc9 | ||
|
|
f186ebf370 | ||
|
|
be79b657d2 |
13
provider.go
13
provider.go
@@ -65,16 +65,13 @@ func (p *bitbucketTokenProvider) Configure(ctx context.Context, req provider.Con
|
||||
return
|
||||
}
|
||||
|
||||
serverURL := config.ServerURL.ValueString()
|
||||
authHeader := config.AuthHeader.ValueString()
|
||||
|
||||
providerData := ProviderData{
|
||||
AuthHeader: authHeader,
|
||||
ServerURL: serverURL,
|
||||
providerData := &ProviderData{
|
||||
AuthHeader: config.AuthHeader.ValueString(),
|
||||
ServerURL: config.ServerURL.ValueString(),
|
||||
}
|
||||
|
||||
resp.DataSourceData = &providerData
|
||||
resp.ResourceData = &providerData
|
||||
resp.DataSourceData = providerData
|
||||
resp.ResourceData = providerData
|
||||
}
|
||||
|
||||
func (p *bitbucketTokenProvider) DataSources(_ context.Context) []func() datasource.DataSource {
|
||||
|
||||
@@ -70,10 +70,6 @@ func (r *BitbucketTokenResource) Schema(_ context.Context, req resource.SchemaRe
|
||||
|
||||
func (r *BitbucketTokenResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) {
|
||||
if req.ProviderData == nil {
|
||||
resp.Diagnostics.AddError(
|
||||
"Missing provider configuration",
|
||||
"The Bitbucket provider was not configured before using this resource.",
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user