Skip to content

Commit

Permalink
respect vpc2 order for resource_vultr_instance
Browse files Browse the repository at this point in the history
  • Loading branch information
quantimnot committed Feb 3, 2025
1 parent 605d1ef commit bf96c5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vultr/resource_vultr_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Will not do anything unless enable_ipv6 is also true.`,
Elem: &schema.Schema{Type: schema.TypeString},
},
"vpc2_ids": {
Type: schema.TypeSet,
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
Expand Down Expand Up @@ -375,7 +375,7 @@ func resourceVultrInstanceCreate(ctx context.Context, d *schema.ResourceData, me
}

if vpcIDs, vpcOK := d.GetOk("vpc2_ids"); vpcOK {
for _, v := range vpcIDs.(*schema.Set).List() {
for _, v := range vpcIDs.([]interface{}) {
req.AttachVPC2 = append(req.AttachVPC2, v.(string))
}
}
Expand Down

0 comments on commit bf96c5a

Please sign in to comment.