Skip to content

Commit

Permalink
new resources
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfrej committed Apr 30, 2024
1 parent 1599372 commit 8447fa1
Show file tree
Hide file tree
Showing 10 changed files with 638 additions and 72 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ website/vendor
# Keep windows files with windows line endings
*.winfile eol=crlf

local/
local/
.vscode
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ require (
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/go-resty/resty/v2 v2.11.0 // indirect
github.com/go-resty/resty/v2 v2.12.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/cli v1.1.6 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.6.2 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
Expand Down Expand Up @@ -67,17 +67,17 @@ require (
github.com/zclconf/go-cty v1.14.4 // indirect
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
go.uber.org/ratelimit v0.3.1 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240308144416-29370a3891b7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/ezifyio/go-akeneo v1.0.28 => github.com/0xfrej/go-akeneo v0.0.0-20240310164427-b6557f49a6ad
replace github.com/ezifyio/go-akeneo v1.0.28 => github.com/0xfrej/go-akeneo v0.0.0-20240429082001-08076f71c8fb
20 changes: 20 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
github.com/0xfrej/go-akeneo v0.0.0-20240310164427-b6557f49a6ad h1:MDz+aL18E/afoQU0LRmq1ya/Tqxc+HyVkzphSRU6jNg=
github.com/0xfrej/go-akeneo v0.0.0-20240310164427-b6557f49a6ad/go.mod h1:ijPvGYj48qNmlJOoe6gqCGZr63WVg87L2N9NyFT5ZaY=
github.com/0xfrej/go-akeneo v0.0.0-20240429082001-08076f71c8fb h1:ySDIJnWduRlQrLiKes37QZKrJx6Z0gpMj8r9gCvTvN4=
github.com/0xfrej/go-akeneo v0.0.0-20240429082001-08076f71c8fb/go.mod h1:ijPvGYj48qNmlJOoe6gqCGZr63WVg87L2N9NyFT5ZaY=
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/Kunde21/markdownfmt/v3 v3.1.0 h1:KiZu9LKs+wFFBQKhrZJrFZwtLnCCWJahL+S+E/3VnM0=
Expand Down Expand Up @@ -50,6 +52,8 @@ github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZt
github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY=
github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8=
github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A=
github.com/go-resty/resty/v2 v2.12.0 h1:rsVL8P90LFvkUYq/V5BTVe203WfRIU4gvcf+yfzJzGA=
github.com/go-resty/resty/v2 v2.12.0/go.mod h1:o0yGPrkS3lOe1+eFajk6kBW8ScXzwU3hD69/gt2yB/0=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
Expand All @@ -74,6 +78,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I=
github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
Expand Down Expand Up @@ -194,8 +200,11 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 h1:EDuYyU/MkFXllv9QF9819VlI9a4tzGuCbhG0ExK9o1U=
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
Expand All @@ -209,8 +218,11 @@ golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -230,14 +242,19 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
Expand All @@ -249,6 +266,7 @@ golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
Expand All @@ -259,6 +277,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240308144416-29370a3891b7 h1:em/y72n4XlYRtayY/cVj6pnVzHa//BDA1BdoO+z9mdE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240308144416-29370a3891b7/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be h1:LG9vZxsWGOmUKieR8wPAUR3u3MpnYFQZROPIMaXh7/A=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM=
google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
Expand Down
28 changes: 28 additions & 0 deletions internal/akeneox/entity.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package akeneox

import goakeneo "github.com/ezifyio/go-akeneo"

// AttributeGroup is the struct for an akeneo attribute group

Check failure on line 5 in internal/akeneox/entity.go

View workflow job for this annotation

GitHub Actions / Build

Comment should end in a period (godot)
type AttributeGroup struct {
//Links *goakeneo.Links `json:"_links,omitempty" mapstructure:"_links"`
Expand All @@ -8,3 +10,29 @@ type AttributeGroup struct {
SortOrder int `json:"sort_order,omitempty" mapstructure:"sort_order"`
Labels map[string]string `json:"labels,omitempty" mapstructure:"labels"`
}

type MeasurementUnitConversion struct {
Operator string `json:"operator,omitempty" mapstructure:"operator"`
Value string `json:"value,omitempty" mapstructure:"value"`
}

type MeasurementUnit struct {
Code string `json:"code,omitempty" mapstructure:"code"`
Labels map[string]string `json:"labels,omitempty" mapstructure:"labels"`
ConvertFromStandard []MeasurementUnitConversion `json:"convert_from_standard" mapstructure:"convert_from_standard"`
Symbol string `json:"symbol,omitempty" mapstructure:"symbol"`
}

type MeasurementFamily struct {
Code string `json:"code,omitempty" mapstructure:"code"`
Labels map[string]string `json:"labels,omitempty" mapstructure:"labels"`
StandardUnitCode string `json:"standard_unit_code,omitempty" mapstructure:"standard_unit_code"`
Units map[string]MeasurementUnit `json:"units,omitempty" mapstructure:"units"`
}

type MeasurementFamilyPatchResponse struct {
Code string `json:"code"`
StatusCode int `json:"status_code"`
Message string `json:"message,omitempty"`
Errors []goakeneo.ValidationError `json:"errors,omitempty"`
}
58 changes: 58 additions & 0 deletions internal/akeneox/measurement.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package akeneox

import (
goakeneo "github.com/ezifyio/go-akeneo"
)

const (
measurementFamilyPath = "/api/rest/v1/measurement-families"
)

type MeasurementFamilyService struct {
goakeneo.FamilyService
client *goakeneo.Client
}

func NewMeasurementFamilyClient(client *goakeneo.Client) *MeasurementFamilyService {
return &MeasurementFamilyService{
FamilyService: client.Family,
client: client,
}
}

func (a *MeasurementFamilyService) GetMeasurementFamily(code string) (*MeasurementFamily, error) {
data := new(MeasurementFamily)
response := new([]MeasurementFamily)
err := a.client.GET(
measurementFamilyPath,
nil,
nil,
response,
)
if err != nil {
return nil, err
}

for _, r := range *response {
if r.Code == code {
data = &r

Check failure on line 38 in internal/akeneox/measurement.go

View workflow job for this annotation

GitHub Actions / Build

exporting a pointer for the loop variable r (exportloopref)
break
}
}

return data, nil
}

func (a *MeasurementFamilyService) UpdateMeasurementFamilies(families []MeasurementFamily) (*[]MeasurementFamilyPatchResponse, error) {
response := new([]MeasurementFamilyPatchResponse)
err := a.client.PATCH(
measurementFamilyPath,
nil,
families,
response,
)
if err != nil {
return nil, err
}
return response, nil
}
56 changes: 27 additions & 29 deletions internal/provider/family_variant_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,40 +260,38 @@ func (r *FamilyVariantResource) mapToApiObject(ctx context.Context, diags *diag.
for locale, label := range elements {
labels[locale] = label.ValueString()
}
a.Lables = labels
a.Labels = labels
}

if !(data.Labels.IsNull() || data.Labels.IsUnknown()) {
sets := make([]goakeneo.VariantAttributeSet, len(data.VariantAttributeSets))
for i, set := range data.VariantAttributeSets {
s := goakeneo.VariantAttributeSet{
Level: int(set.Level.ValueInt64()),
}
sets := make([]goakeneo.VariantAttributeSet, len(data.VariantAttributeSets))
for i, set := range data.VariantAttributeSets {
s := goakeneo.VariantAttributeSet{
Level: int(set.Level.ValueInt64()),
}

if !set.Axes.IsNull() {
elements := make([]types.String, len(set.Axes.Elements()))
diags.Append(set.Axes.ElementsAs(ctx, &elements, false)...)
axes := make([]string, len(elements))
for j, axis := range elements {
axes[j] = axis.ValueString()
}
s.Axes = axes
if !set.Axes.IsNull() {
elements := make([]types.String, len(set.Axes.Elements()))
diags.Append(set.Axes.ElementsAs(ctx, &elements, false)...)
axes := make([]string, len(elements))
for j, axis := range elements {
axes[j] = axis.ValueString()
}
s.Axes = axes
}

if !set.Attributes.IsNull() {
elements := make([]types.String, len(set.Attributes.Elements()))
diags.Append(set.Attributes.ElementsAs(ctx, &elements, false)...)
attributes := make([]string, len(elements))
for j, a := range elements {
attributes[j] = a.ValueString()
}
s.Attributes = attributes
if !set.Attributes.IsNull() {
elements := make([]types.String, len(set.Attributes.Elements()))
diags.Append(set.Attributes.ElementsAs(ctx, &elements, false)...)
attributes := make([]string, len(elements))
for j, a := range elements {
attributes[j] = a.ValueString()
}

sets[i] = s
s.Attributes = attributes
}
a.VariantAttributeSets = sets

sets[i] = s
}
a.VariantAttributeSets = sets

if diags.HasError() {
return nil
Expand All @@ -306,10 +304,10 @@ func (r *FamilyVariantResource) mapToTfObject(respDiags *diag.Diagnostics, data
// todo map only non empties
data.Code = types.StringValue(apiData.Code)

if len(apiData.Lables) > 0 {
elements := make(map[string]attr.Value, len(apiData.Lables))
if len(apiData.Labels) > 0 {
elements := make(map[string]attr.Value, len(apiData.Labels))

for k, v := range apiData.Lables {
for k, v := range apiData.Labels {
elements[k] = types.StringValue(v)
}

Expand Down
Loading

0 comments on commit 8447fa1

Please sign in to comment.