diff --git a/gen/templates/data_source.go b/gen/templates/data_source.go index 2810dad6..b83b73f6 100644 --- a/gen/templates/data_source.go +++ b/gen/templates/data_source.go @@ -213,6 +213,9 @@ func (d *{{camelCase .Name}}DataSource) Read(ctx context.Context, req datasource {{- else if and (not .GetNoId) (not .GetFromAll)}} params += "/" + config.Id.ValueString() {{- end}} + {{- if .GetExtraQueryParams}} + params += "{{.GetExtraQueryParams}}" + {{- end}} res, err := d.client.Get({{if .GetRestEndpoint}}"{{.GetRestEndpoint}}"{{else}}config.getPath(){{end}} + params) if err != nil { resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to retrieve object, got error: %s", err)) diff --git a/internal/provider/data_source_catalystcenter_network_profile.go b/internal/provider/data_source_catalystcenter_network_profile.go index 5f49a849..1b613122 100644 --- a/internal/provider/data_source_catalystcenter_network_profile.go +++ b/internal/provider/data_source_catalystcenter_network_profile.go @@ -115,6 +115,7 @@ func (d *NetworkProfileDataSource) Read(ctx context.Context, req datasource.Read params := "" params += "/" + config.Id.ValueString() + params += "?populated=true" res, err := d.client.Get(config.getPath() + params) if err != nil { resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to retrieve object, got error: %s", err))