Skip to content

Commit

Permalink
fix: specify vpc param when creating vpc
Browse files Browse the repository at this point in the history
  • Loading branch information
walbertus committed Dec 11, 2024
1 parent fe93ca4 commit 7ac5dd2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions alicloud/resource_alicloud_vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,18 @@ func resourceAliCloudVpcVpcCreate(d *schema.ResourceData, meta interface{}) erro
query["RegionId"] = client.RegionId
request["ClientToken"] = buildClientToken(action)

if v, ok := d.GetOk("name"); ok || d.HasChange("name") {
request["VpcName"] = v
}
if v, ok := d.GetOk("vpc_name"); ok {
request["VpcName"] = v
}
if v, ok := d.GetOk("cidr_block"); ok {
request["CidrBlock"] = v
}
if v, ok := d.GetOk("description"); ok {
request["Description"] = v
}
if v, ok := d.GetOk("ipv6_cidr_block"); ok {
request["Ipv6CidrBlock"] = v
}
Expand Down

0 comments on commit 7ac5dd2

Please sign in to comment.