Skip to content

Commit

Permalink
fix: filter availablezones by code in dcs az data source (#1016)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lance52259 authored Mar 31, 2021
1 parent 8d5dbb8 commit f4d5ad8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions huaweicloud/data_source_huaweicloud_dcs_az_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ func dataSourceDcsAZV1Read(d *schema.ResourceData, meta interface{}) error {
if port != "" && newAZ.Port != port {
continue
}

code := d.Get("code").(string)
if code != "" && newAZ.Code != code {
continue
}
filteredAZs = append(filteredAZs, newAZ)
}
}
Expand Down

0 comments on commit f4d5ad8

Please sign in to comment.