Fix loadbalancer internal models to use TF types (#264)

* Unexport types

* Modify structs to use TF types, uniformize comments

* Adapt to new models

* Adapt to new models

* Adapt tests

* Bug fixes

* Lint fix

* Fix bugs

* Fix wrong reference

Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>

* Rename variable

* Rename variable

* Rename variables

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>
This commit is contained in:
Henrique Santos 2024-02-15 09:55:56 +00:00 committed by GitHub
parent 8b74ec2700
commit 3700ad3018
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 635 additions and 436 deletions

View file

@ -324,7 +324,7 @@ func (r *loadBalancerDataSource) Read(ctx context.Context, req datasource.ReadRe
}
// Map response body to schema
err = mapFields(ctx, lbResp, &model)
err = mapFields(lbResp, &model)
if err != nil {
core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading load balancer", fmt.Sprintf("Processing API payload: %v", err))
return