Skip to content

Commit

Permalink
Add Configure
Browse files Browse the repository at this point in the history
  • Loading branch information
ashtonwalden committed Dec 11, 2024
1 parent 46b5804 commit 82f86b2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pkg/framework/objects/azure_dev_ops_repository/data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,20 @@ func (d *azureDevOpsRepositoryDataSource) Read(
return
}
}

func (d *azureDevOpsRepositoryDataSource) Configure(
_ context.Context,
req datasource.ConfigureRequest,
resp *datasource.ConfigureResponse,
) {
switch c := req.ProviderData.(type) {
case nil: // do nothing
case *dbt_cloud.Client:
d.client = c
default:
resp.Diagnostics.AddError(
"Missing client",
"A client is required to configure the Azure DevOps repository data source",
)
}
}

0 comments on commit 82f86b2

Please sign in to comment.