Skip to content

Commit ed1de63

Browse files
authored
Add status_detail attribute to ibm_pi_instance_snapshot data source and resource (#6323)
* Update dependencies * Add status detail instance snapshot data source and resource * Update documentation
1 parent 0995ff0 commit ed1de63

8 files changed

+78
-54
lines changed

go.mod

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.24.2
55
require (
66
github.com/IBM-Cloud/bluemix-go v0.0.0-20250324085928-caa6511f0c13
77
github.com/IBM-Cloud/container-services-go-sdk v0.0.0-20240725064144-454a2ae23113
8-
github.com/IBM-Cloud/power-go-client v1.11.0
8+
github.com/IBM-Cloud/power-go-client v1.12.0
99
github.com/IBM/appconfiguration-go-admin-sdk v0.4.4
1010
github.com/IBM/appid-management-go-sdk v0.0.0-20210908164609-dd0e0eaf732f
1111
github.com/IBM/cloud-databases-go-sdk v0.8.0
@@ -60,7 +60,7 @@ require (
6060
github.com/rook/rook/pkg/apis v0.0.0-20250619203122-80563e28b685
6161
github.com/softlayer/softlayer-go v1.0.3
6262
github.com/stretchr/testify v1.10.0
63-
golang.org/x/crypto v0.36.0
63+
golang.org/x/crypto v0.38.0
6464
gopkg.in/yaml.v3 v3.0.1
6565
gotest.tools v2.2.0+incompatible
6666
k8s.io/api v0.33.2
@@ -94,20 +94,20 @@ require (
9494
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
9595
github.com/fatih/color v1.16.0 // indirect
9696
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
97-
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
97+
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
9898
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 // indirect
9999
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
100100
github.com/go-logr/logr v1.4.2 // indirect
101101
github.com/go-logr/stdr v1.2.2 // indirect
102-
github.com/go-openapi/analysis v0.21.5 // indirect
102+
github.com/go-openapi/analysis v0.23.0 // indirect
103103
github.com/go-openapi/errors v0.22.1 // indirect
104-
github.com/go-openapi/jsonpointer v0.21.0 // indirect
104+
github.com/go-openapi/jsonpointer v0.21.1 // indirect
105105
github.com/go-openapi/jsonreference v0.21.0 // indirect
106-
github.com/go-openapi/loads v0.21.3 // indirect
107-
github.com/go-openapi/runtime v0.26.0 // indirect
108-
github.com/go-openapi/spec v0.20.12 // indirect
109-
github.com/go-openapi/swag v0.23.0 // indirect
110-
github.com/go-openapi/validate v0.22.4 // indirect
106+
github.com/go-openapi/loads v0.22.0 // indirect
107+
github.com/go-openapi/runtime v0.28.0 // indirect
108+
github.com/go-openapi/spec v0.21.0 // indirect
109+
github.com/go-openapi/swag v0.23.1 // indirect
110+
github.com/go-openapi/validate v0.24.0 // indirect
111111
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 // indirect
112112
github.com/go-playground/locales v0.14.1 // indirect
113113
github.com/go-playground/universal-translator v0.18.1 // indirect
@@ -193,20 +193,21 @@ require (
193193
github.com/x448/float16 v0.8.4 // indirect
194194
github.com/zclconf/go-cty v1.15.0 // indirect
195195
go.mongodb.org/mongo-driver v1.17.3 // indirect
196-
go.opentelemetry.io/otel v1.28.0 // indirect
197-
go.opentelemetry.io/otel/metric v1.28.0 // indirect
198-
go.opentelemetry.io/otel/trace v1.28.0 // indirect
196+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
197+
go.opentelemetry.io/otel v1.35.0 // indirect
198+
go.opentelemetry.io/otel/metric v1.35.0 // indirect
199+
go.opentelemetry.io/otel/trace v1.35.0 // indirect
199200
go.uber.org/atomic v1.9.0 // indirect
200201
go.uber.org/automaxprocs v1.6.0 // indirect
201202
go.uber.org/ratelimit v0.2.0 // indirect
202203
go.uber.org/zap v1.27.0 // indirect
203204
golang.org/x/mod v0.21.0 // indirect
204-
golang.org/x/net v0.38.0 // indirect
205+
golang.org/x/net v0.40.0 // indirect
205206
golang.org/x/oauth2 v0.27.0 // indirect
206-
golang.org/x/sync v0.12.0 // indirect
207-
golang.org/x/sys v0.32.0 // indirect
208-
golang.org/x/term v0.30.0 // indirect
209-
golang.org/x/text v0.23.0 // indirect
207+
golang.org/x/sync v0.14.0 // indirect
208+
golang.org/x/sys v0.33.0 // indirect
209+
golang.org/x/term v0.32.0 // indirect
210+
golang.org/x/text v0.25.0 // indirect
210211
golang.org/x/time v0.9.0 // indirect
211212
golang.org/x/tools v0.26.0 // indirect
212213
google.golang.org/appengine v1.6.8 // indirect

go.sum

Lines changed: 38 additions & 36 deletions
Large diffs are not rendered by default.

ibm/service/power/data_source_ibm_pi_instance_snapshot.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ func DataSourceIBMPIInstanceSnapshot() *schema.Resource {
7474
Description: "The status of the Power Virtual Machine instance snapshot.",
7575
Type: schema.TypeString,
7676
},
77+
Attr_StatusDetail: {
78+
Computed: true,
79+
Description: "Detailed information for the last PVM instance snapshot action.",
80+
Type: schema.TypeString,
81+
},
7782
Attr_UserTags: {
7883
Computed: true,
7984
Description: "List of user tags attached to the resource.",
@@ -119,6 +124,7 @@ func dataSourceIBMPIInstanceSnapshotRead(ctx context.Context, d *schema.Resource
119124
d.Set(Attr_Name, snapshotData.Name)
120125
d.Set(Attr_PercentComplete, snapshotData.PercentComplete)
121126
d.Set(Attr_Status, snapshotData.Status)
127+
d.Set(Attr_StatusDetail, snapshotData.StatusDetail)
122128
d.Set(Attr_VolumeSnapshots, snapshotData.VolumeSnapshots)
123129
return nil
124130
}

ibm/service/power/data_source_ibm_pi_instance_snapshots.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ func DataSourceIBMPIInstanceSnapshots() *schema.Resource {
8080
Description: "The status of the Power Virtual Machine instance snapshot.",
8181
Type: schema.TypeString,
8282
},
83+
Attr_StatusDetail: {
84+
Computed: true,
85+
Description: "Detailed information for the last PVM instance snapshot action.",
86+
Type: schema.TypeString,
87+
},
8388
Attr_UserTags: {
8489
Computed: true,
8590
Description: "List of user tags attached to the resource.",
@@ -133,6 +138,7 @@ func flattenSnapshotsInstances(list []*models.Snapshot, meta interface{}) []map[
133138
Attr_Name: *i.Name,
134139
Attr_PercentComplete: i.PercentComplete,
135140
Attr_Status: i.Status,
141+
Attr_StatusDetail: i.StatusDetail,
136142
Attr_VolumeSnapshots: i.VolumeSnapshots,
137143
}
138144
if i.Crn != "" {

ibm/service/power/resource_ibm_pi_instance_snapshot.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ func ResourceIBMPIInstanceSnapshot() *schema.Resource {
101101
Description: "Status of the PVM instance snapshot.",
102102
Type: schema.TypeString,
103103
},
104+
Attr_StatusDetail: {
105+
Computed: true,
106+
Description: "Detailed information for the last PVM instance snapshot action.",
107+
Type: schema.TypeString,
108+
},
104109
Attr_VolumeSnapshots: {
105110
Computed: true,
106111
Description: "A map of volume snapshots included in the PVM instance snapshot.",
@@ -197,6 +202,7 @@ func resourceIBMPIInstanceSnapshotRead(ctx context.Context, d *schema.ResourceDa
197202
d.Set(Attr_LastUpdateDate, snapshotdata.LastUpdateDate.String())
198203
d.Set(Attr_SnapshotID, *snapshotdata.SnapshotID)
199204
d.Set(Attr_Status, snapshotdata.Status)
205+
d.Set(Attr_StatusDetail, snapshotdata.StatusDetail)
200206
d.Set(Attr_VolumeSnapshots, snapshotdata.VolumeSnapshots)
201207

202208
return nil

website/docs/d/pi_instance_snapshot.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,6 @@ In addition to all argument reference list, you can access the following attribu
5454
- `name` - (String) The name of the Power Systems Virtual Machine instance snapshot.
5555
- `percent_complete` - (Integer) The snapshot completion percentage.
5656
- `status` - (String) The status of the Power Virtual Machine instance snapshot.
57+
- `status_detail` - (String) Detailed information for the last PVM instance snapshot action.
5758
- `user_tags` - (List) List of user tags attached to the resource.
5859
- `volume_snapshots` - (Map) A map of volume snapshots included in the Power Virtual Machine instance snapshot.

website/docs/d/pi_instance_snapshots.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,6 @@ In addition to all argument reference list, you can access the following attribu
5656
- `name` - (String) The name of the Power Systems Virtual Machine instance snapshot.
5757
- `percent_complete` - (Integer) The snapshot completion percentage.
5858
- `status` - (String) The status of the Power Virtual Machine instance snapshot.
59+
- `status_detail` - (String) Detailed information for the last PVM instance snapshot action.
5960
- `user_tags` - (List) List of user tags attached to the resource.
6061
- `volume_snapshots` - (Map) A map of volume snapshots included in the Power Virtual Machine instance snapshot.

website/docs/r/pi_instance_snapshot.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ In addition to all argument reference list, you can access the following attribu
6969
- `last_update_date` - (String) The last updated date of the snapshot.
7070
- `snapshot_id` - (String) ID of the PVM instance snapshot.
7171
- `status` - (String) Status of the PVM instance snapshot.
72+
- `status_detail` - (String) Detailed information for the last PVM instance snapshot action.
7273
- `volume_snapshots` - (Map) A map of volume snapshots included in the PVM instance snapshot.
7374

7475
## Import

0 commit comments

Comments
 (0)