Skip to content

Commit

Permalink
Make list instead of set for ids of vpc data source
Browse files Browse the repository at this point in the history
  • Loading branch information
niuzhenguo committed May 18, 2021
1 parent 0ba75fb commit 4957262
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/vpc_subnet_ids.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ data "huaweicloud_vpc_subnet_ids" "subnet_ids" {
data "huaweicloud_vpc_subnet" "subnet" {
count = length(data.huaweicloud_vpc_subnet_ids.subnet_ids.ids)
id = tolist(data.huaweicloud_vpc_subnet_ids.subnet_ids.ids)[count.index]
id = data.huaweicloud_vpc_subnet_ids.subnet_ids.ids[count.index]
}
output "subnet_cidr_blocks" {
Expand Down
3 changes: 1 addition & 2 deletions huaweicloud/data_source_huaweicloud_vpc_ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ func dataSourceVirtualPrivateCloudVpcIdsV1() *schema.Resource {
Computed: true,
},
"ids": {
Type: schema.TypeSet,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
},
},
}
Expand Down
3 changes: 1 addition & 2 deletions huaweicloud/data_source_huaweicloud_vpc_route_ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ func dataSourceVPCRouteIdsV2() *schema.Resource {
Required: true,
},
"ids": {
Type: schema.TypeSet,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
},
},
}
Expand Down
3 changes: 1 addition & 2 deletions huaweicloud/data_source_huaweicloud_vpc_subnet_ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ func DataSourceVpcSubnetIdsV1() *schema.Resource {
Required: true,
},
"ids": {
Type: schema.TypeSet,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
},
},
}
Expand Down

0 comments on commit 4957262

Please sign in to comment.