Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Commit

Permalink
Merge branch 'provider-fixes' into 'master'
Browse files Browse the repository at this point in the history
fix: store provider data for resource later

See merge request rackn/terraform-provider-drp!97
  • Loading branch information
galthaus committed Mar 21, 2023
2 parents dc6454e + e7220f7 commit 86bf19d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drpv4/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ func (p *Config) Configure(ctx context.Context, req provider.ConfigureRequest, r
}

log.Printf("[Info] Digital Rebar %+v", info.Version)
resp.ResourceData = p
}

func (p *Config) Resources(ctx context.Context) []func() resource.Resource {
Expand Down
1 change: 1 addition & 0 deletions drpv4/resource_drp_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ func (r *MachineResource) Schema(ctx context.Context, req resource.SchemaRequest
func (r *MachineResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) {
// Prevent panic if the provider has not been configured.
if req.ProviderData == nil {
tflog.Error(ctx, "[resourceMachineConfigure] Missing provider data")
return
}

Expand Down

0 comments on commit 86bf19d

Please # to comment.