Skip to content

Commit dec1b37

Browse files
authored
Merge branch 'master' into docs-add-agents-file
2 parents 8998e98 + c9c5823 commit dec1b37

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sysdig/resource_sysdig_secure_cloud_auth_account.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func resourceSysdigSecureCloudauthAccount() *schema.Resource {
101101
Required: true,
102102
},
103103
SchemaComponents: {
104-
Type: schema.TypeList,
104+
Type: schema.TypeSet,
105105
Optional: true,
106106
Elem: &schema.Schema{
107107
Type: schema.TypeString,
@@ -335,7 +335,7 @@ func setAccountFeature(accountFeatures *cloudauth.AccountFeatures, fieldName str
335335
case SchemaEnabled:
336336
target.Elem().FieldByName("Enabled").SetBool(value.(bool))
337337
case SchemaComponents:
338-
for _, componentID := range value.([]any) {
338+
for _, componentID := range value.(*schema.Set).List() {
339339
target.Elem().FieldByName("Components").Set(reflect.Append(target.Elem().FieldByName("Components"), reflect.ValueOf(componentID.(string))))
340340
}
341341
}

sysdig/resource_sysdig_secure_cloud_auth_account_feature.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func getAccountFeatureSchema() map[string]*schema.Schema {
5151
Required: true,
5252
},
5353
SchemaComponents: {
54-
Type: schema.TypeList,
54+
Type: schema.TypeSet,
5555
Required: true,
5656
Elem: &schema.Schema{
5757
Type: schema.TypeString,
@@ -184,7 +184,7 @@ func validateCloudauthAccountFeatureUpdate(existingFeature *v2.CloudauthAccountF
184184

185185
func getFeatureComponentsList(data *schema.ResourceData) []string {
186186
componentsList := []string{}
187-
componentsResourceList := data.Get(SchemaComponents).([]any)
187+
componentsResourceList := data.Get(SchemaComponents).(*schema.Set).List()
188188
for _, componentID := range componentsResourceList {
189189
componentsList = append(componentsList, componentID.(string))
190190
}

0 commit comments

Comments
 (0)