Skip to content

Commit

Permalink
change typelist to typeset
Browse files Browse the repository at this point in the history
  • Loading branch information
Hari Krishna Arla authored and hkantare committed Jun 18, 2024
1 parent 2842739 commit ebbb06e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func ResourceIBMIAMAccessGroupTemplate() *schema.Resource {
},
},
"policy_template_references": {
Type: schema.TypeList,
Type: schema.TypeSet,
Optional: true,
ForceNew: true,
Description: "References to policy templates assigned to the access group template.",
Expand Down Expand Up @@ -367,7 +367,7 @@ func resourceIBMIAMAccessGroupTemplateCreate(context context.Context, d *schema.
}
if _, ok := d.GetOk("policy_template_references"); ok {
var policyTemplateReferences []iamaccessgroupsv2.PolicyTemplates
for _, v := range d.Get("policy_template_references").([]interface{}) {
for _, v := range d.Get("policy_template_references").(*schema.Set).List() {
value := v.(map[string]interface{})
policyTemplateReferencesItem, err := resourceIBMIAMAccessGroupTemplateMapToPolicyTemplates(value)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func ResourceIBMIAMAccessGroupTemplateVersion() *schema.Resource {
},
},
"policy_template_references": {
Type: schema.TypeList,
Type: schema.TypeSet,
Optional: true,
Description: "References to policy templates assigned to the access group template.",
Elem: &schema.Resource{
Expand Down Expand Up @@ -370,7 +370,7 @@ func resourceIBMIAMAccessGroupTemplateVersionCreate(context context.Context, d *
}
if _, ok := d.GetOk("policy_template_references"); ok {
var policyTemplateReferences []iamaccessgroupsv2.PolicyTemplates
for _, v := range d.Get("policy_template_references").([]interface{}) {
for _, v := range d.Get("policy_template_references").(*schema.Set).List() {
value := v.(map[string]interface{})
policyTemplateReferencesItem, err := resourceIBMIAMAccessGroupTemplateVersionMapToPolicyTemplates(value)
if err != nil {
Expand Down Expand Up @@ -544,7 +544,7 @@ func resourceIBMIAMAccessGroupTemplateVersionUpdate(context context.Context, d *

if _, ok := d.GetOk("policy_template_references"); ok {
var policyTemplateReferences []iamaccessgroupsv2.PolicyTemplates
for _, v := range d.Get("policy_template_references").([]interface{}) {
for _, v := range d.Get("policy_template_references").(*schema.Set).List() {
value := v.(map[string]interface{})
policyTemplateReferencesItem, err := resourceIBMIAMAccessGroupTemplateVersionMapToPolicyTemplates(value)
if err != nil {
Expand Down

0 comments on commit ebbb06e

Please sign in to comment.