Skip to content

Commit

Permalink
Fix issue IBM-Cloud#1450
Browse files Browse the repository at this point in the history
  • Loading branch information
VaishnaviGopal committed Jun 2, 2020
1 parent 94d032a commit 5b5afae
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ github.com/IBM-Cloud/power-go-client v1.0.0 h1:iy7ElG6CmCYOeRal07JMGtIvby0qOKBPP
github.com/IBM-Cloud/power-go-client v1.0.0/go.mod h1:+mOxjyLeLIloR4EMHTpiDbN+FilZpiVHTwu5eqi+cbI=
github.com/IBM-Cloud/power-go-client v1.0.14 h1:trQkSz3WEjVSnsOCHhW+jTs9zci3T0iOt7htdwilckg=
github.com/IBM-Cloud/power-go-client v1.0.14/go.mod h1:+mOxjyLeLIloR4EMHTpiDbN+FilZpiVHTwu5eqi+cbI=
github.com/IBM-Cloud/power-go-client v1.0.24 h1:C3rjKpTnVn63F+0mu66WNmDfJl6CyM/rpq1d7lx4Ahc=
github.com/IBM-Cloud/power-go-client v1.0.24/go.mod h1:+mOxjyLeLIloR4EMHTpiDbN+FilZpiVHTwu5eqi+cbI=
github.com/IBM/apigateway-go-sdk v0.0.0-20200319174228-a4e4a3b46d9e h1:LiWEe8x+iAktPSEiJ4HNhOqrvLZvpicgGnGIi8QuEfI=
github.com/IBM/apigateway-go-sdk v0.0.0-20200319174228-a4e4a3b46d9e/go.mod h1:sNVpGpUv3jvA2dQbRPFjVrRFNdmnQrf2QTtKa/c2XrI=
github.com/IBM/apigateway-go-sdk v0.0.0-20200414212859-416e5948678a h1:lX3vP+9Y5gTP0w6l+4oL0mvNfgXZYJsMdlsiUG43GBw=
Expand Down
8 changes: 8 additions & 0 deletions ibm/data_source_ibm_is_vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ func dataSourceIBMISVPC() *schema.Resource {
Description: "subnet status",
},

"zone": {
Type: schema.TypeString,
Computed: true,
Description: "subnet location",
},

totalIPV4AddressCount: {
Type: schema.TypeInt,
Computed: true,
Expand Down Expand Up @@ -237,6 +243,7 @@ func classicVpcGetByName(d *schema.ResourceData, meta interface{}, name string)
"name": *subnet.Name,
"id": *subnet.ID,
"status": *subnet.Status,
"zone": *subnet.Zone.Name,
totalIPV4AddressCount: *subnet.TotalIpv4AddressCount,
availableIPV4AddressCount: *subnet.AvailableIpv4AddressCount,
}
Expand Down Expand Up @@ -323,6 +330,7 @@ func vpcGetByName(d *schema.ResourceData, meta interface{}, name string) error {
"name": *subnet.Name,
"id": *subnet.ID,
"status": *subnet.Status,
"zone": *subnet.Zone.Name,
totalIPV4AddressCount: *subnet.TotalIpv4AddressCount,
availableIPV4AddressCount: *subnet.AvailableIpv4AddressCount,
}
Expand Down
8 changes: 8 additions & 0 deletions ibm/resource_ibm_is_vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ func resourceIBMISVPC() *schema.Resource {
Description: "subnet status",
},

"zone": {
Type: schema.TypeString,
Computed: true,
Description: "subnet location",
},

totalIPV4AddressCount: {
Type: schema.TypeInt,
Computed: true,
Expand Down Expand Up @@ -528,6 +534,7 @@ func classicVpcGet(d *schema.ResourceData, meta interface{}, id string) error {
"name": *subnet.Name,
"id": *subnet.ID,
"status": *subnet.Status,
"zone": *subnet.Zone.Name,
totalIPV4AddressCount: *subnet.TotalIpv4AddressCount,
availableIPV4AddressCount: *subnet.AvailableIpv4AddressCount,
}
Expand Down Expand Up @@ -623,6 +630,7 @@ func vpcGet(d *schema.ResourceData, meta interface{}, id string) error {
"name": *subnet.Name,
"id": *subnet.ID,
"status": *subnet.Status,
"zone": *subnet.Zone.Name,
totalIPV4AddressCount: *subnet.TotalIpv4AddressCount,
availableIPV4AddressCount: *subnet.AvailableIpv4AddressCount,
}
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/is_vpc.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ The following attributes are exported:
* `name` - Name of the subnet.
* `id` - ID of the subnet.
* `status` - Status of the subnet.
* `zone` - Zone of the subnet.
* `total_ipv4_address_count` - Total IPv4 addresses under the subnet.
* `available_ipv4_address_count` - Available IPv4 addresses available for the usage in the subnet.
1 change: 1 addition & 0 deletions website/docs/r/is_vpc.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ The following attributes are exported:
* `name` - Name of the subnet.
* `id` - ID of the subnet.
* `status` - Status of the subnet.
* `zone` - Zone of the subnet.
* `total_ipv4_address_count` - Total IPv4 addresses under the subnet.
* `available_ipv4_address_count` - Available IPv4 addresses available for the usage in the subnet.

Expand Down

0 comments on commit 5b5afae

Please sign in to comment.