diff --git a/ibm/service/power/resource_ibm_pi_instance_snapshot.go b/ibm/service/power/resource_ibm_pi_instance_snapshot.go index d4997f042b..b88b0771c7 100644 --- a/ibm/service/power/resource_ibm_pi_instance_snapshot.go +++ b/ibm/service/power/resource_ibm_pi_instance_snapshot.go @@ -255,15 +255,6 @@ func resourceIBMPIInstanceSnapshotDelete(ctx context.Context, d *schema.Resource } client := instance.NewIBMPISnapshotClient(ctx, sess, cloudInstanceID) - snapshot, err := client.Get(snapshotID) - if err != nil { - // snapshot does not exist - d.SetId("") - return nil - } - - log.Printf("The snapshot to be deleted is in the following state .. %s", snapshot.Status) - err = client.Delete(snapshotID) if err != nil { return diag.FromErr(err) diff --git a/website/docs/d/pi_instance_snapshot.html.markdown b/website/docs/d/pi_instance_snapshot.html.markdown index 7c4412228b..d2941c798f 100644 --- a/website/docs/d/pi_instance_snapshot.html.markdown +++ b/website/docs/d/pi_instance_snapshot.html.markdown @@ -7,9 +7,11 @@ description: |- --- # ibm_pi_instance_snapshot + Retrieve information about a Power Systems Virtual Server instance snapshot. For more information, about Power Virtual Server instance snapshot, see [getting started with IBM Power Systems Virtual Servers](https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-getting-started). ## Example usage + ```terraform data "ibm_pi_instance_snapshot" "ds_instance_snapshot" { pi_cloud_instance_id = "49fba6c9-23f8-40bc-9899-aca322ee7d5b" @@ -17,13 +19,15 @@ data "ibm_pi_instance_snapshot" "ds_instance_snapshot" { } ``` -**Notes** +### Notes + - Please find [supported Regions](https://cloud.ibm.com/apidocs/power-cloud#endpoint) for endpoints. - If a Power cloud instance is provisioned at `lon04`, The provider level attributes should be as follows: - `region` - `lon` - `zone` - `lon04` Example usage: + ```terraform provider "ibm" { region = "lon" @@ -32,13 +36,15 @@ Example usage: ``` ## Argument reference -Review the argument references that you can specify for your data source. + +Review the argument references that you can specify for your data source. - `pi_cloud_instance_id` - (Required, String) The GUID of the service instance associated with an account. - `pi_snapshot_id` - (Required, String) The unique identifier of the Power Systems Virtual Machine instance snapshot. ## Attribute reference -In addition to all argument reference list, you can access the following attribute references after your data source is created. + +In addition to all argument reference list, you can access the following attribute references after your data source is created. - `action` - (String) Action performed on the instance snapshot. - `creation_date` - (String) Date of snapshot creation. diff --git a/website/docs/d/pi_instance_snapshots.html.markdown b/website/docs/d/pi_instance_snapshots.html.markdown index 5c05a5039b..809f9be468 100644 --- a/website/docs/d/pi_instance_snapshots.html.markdown +++ b/website/docs/d/pi_instance_snapshots.html.markdown @@ -7,22 +7,26 @@ description: |- --- # ibm_pi_instance_snapshots + Retrieve information about a Power Systems Virtual Server instance snapshots. For more information, about Power Virtual Server instance snapshots, see [getting started with IBM Power Systems Virtual Servers](https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-getting-started). ## Example usage + ```terraform data "ibm_pi_instance_snapshots" "ds_instance_snapshots" { pi_cloud_instance_id = "49fba6c9-23f8-40bc-9899-aca322ee7d5b" } ``` -**Notes** +### Notes + - Please find [supported Regions](https://cloud.ibm.com/apidocs/power-cloud#endpoint) for endpoints. - If a Power cloud instance is provisioned at `lon04`, The provider level attributes should be as follows: - `region` - `lon` - `zone` - `lon04` Example usage: + ```terraform provider "ibm" { region = "lon" @@ -31,12 +35,14 @@ Example usage: ``` ## Argument reference -Review the argument references that you can specify for your data source. + +Review the argument references that you can specify for your data source. - `pi_cloud_instance_id` - (Required, String) The GUID of the service instance associated with an account. ## Attribute reference -In addition to all argument reference list, you can access the following attribute references after your data source is created. + +In addition to all argument reference list, you can access the following attribute references after your data source is created. - `instance_snapshots` - (List) List of Power Virtual Machine instance snapshots within the given cloud instance. diff --git a/website/docs/r/pi_instance_snapshot.html.markdown b/website/docs/r/pi_instance_snapshot.html.markdown index d55ba7e430..2f10ae42a0 100644 --- a/website/docs/r/pi_instance_snapshot.html.markdown +++ b/website/docs/r/pi_instance_snapshot.html.markdown @@ -57,7 +57,7 @@ Review the argument references that you can specify for your resource. - `pi_instance_name` - (Required, String) The name of the instance you want to take a snapshot of. - `pi_snapshot_name` - (Required, String) The unique name of the snapshot. - `pi_user_tags` - (Optional, List) The user tags attached to this resource. -- `pi_volume_ids` - (Optional, String) A list of volume IDs of the instance that will be part of the snapshot. If none are provided, then all the volumes of the instance will be part of the snapshot. +- `pi_volume_ids` - (Optional, List) A list of volume IDs of the instance that will be part of the snapshot. If none are provided, then all the volumes of the instance will be part of the snapshot. ## Attribute reference @@ -69,7 +69,7 @@ In addition to all argument reference list, you can access the following attribu - `last_update_date` - (String) The last updated date of the snapshot. - `snapshot_id` - (String) ID of the PVM instance snapshot. - `status` - (String) Status of the PVM instance snapshot. -- `volume_snapshots` - (String) A map of volume snapshots included in the PVM instance snapshot. +- `volume_snapshots` - (Map) A map of volume snapshots included in the PVM instance snapshot. ## Import