Updating Block Storage for VPC snapshot software attachments

You can update the name of the software attachments of a snapshot.

Provisioning a virtual server instance from a catalog image with a software billing plan creates a boot volume with a software attachment. The software attachment contains the software plan and licensable software details. When you create a snapshot of that boot volume, the snapshot inherits the software attachment. Snapshots that were created before this feature was available and that reference a software billing plan are also updated with a software attachment. You can update the software attachment of the snapshot from the CLI, API, or Terraform.

Updating a snapshot software attachment in the console

Updating a snapshot software attachment is not supported in the console. To update a snapshot software attachment, use the CLI, API, or Terraform instructions.

Updating a snapshot software attachment with the CLI

Before you can use the CLI, you must install the IBM Cloud CLI and the VPC CLI plug-in. For more information, see the CLI prerequisites.

To update a snapshot software attachment, use the ibmcloud is snapshot-software-attachment-update command. The SNAPSHOT variable is the ID or name of the snapshot. The SWAC variable is the ID or name of the snapshot software attachment. The --name value is the new name for the snapshot software attachment.

ibmcloud is snapshot-software-attachment-update SNAPSHOT SWAC --name NEW_NAME [--output JSON] [-q, --quiet]

The following example renames the software attachment my-snapshot-software-attachment to my-renamed-snapshot-software-attachment for the snapshot my-snapshot.

ibmcloud is snapshot-software-attachment-update my-snapshot my-snapshot-software-attachment --name my-renamed-snapshot-software-attachment

For more information about available command options, see ibmcloud is snapshot-software-attachment-update.

Retrieving a snapshot software attachment with the CLI

You can retrieve a specific software attachment of a snapshot by ID or name from the CLI. Use ibmcloud is snapshot-software-attachment. The SNAPSHOT variable is the ID or name of the snapshot. The SWAC variable is the snapshot software attachment ID or name.

ibmcloud is snapshot-software-attachment SNAPSHOT SWAC [--output JSON] [-q, --quiet]
  • To retrieve a snapshot software attachment by ID, specify the software attachment ID as the SWAC variable.

    The following example retrieves the software attachment with ID r134-fbb5d014-5cf1-4bf9-af23-86fc238c3c0a for the snapshot cli-snap.

    ibmcloud is snapshot-software-attachment cli-snap r134-fbb5d014-5cf1-4bf9-af23-86fc238c3c0a
    
  • To retrieve a snapshot software attachment by name, specify the software attachment name as the SWAC variable.

    The following example retrieves the software attachment named twiddling-thud-stash-reliant for the snapshot cli-snap.

    ibmcloud is snapshot-software-attachment cli-snap twiddling-thud-stash-reliant
    

For more information about available command options, see ibmcloud is snapshot-software-attachment.

Updating a snapshot software attachment with the API

Make a PATCH /snapshots/{snapshot_id}/software_attachments/{id} request and specify the snapshot ID and the software attachment ID to update the software attachment with the information that is provided in a snapshot software attachment patch object.

The following example updates a software attachment with an ID of $software_attachment_id for a snapshot with an ID of $snapshot_id.

curl -X PATCH "https://us-south.iaas.cloud.ibm.com/v1/snapshots/$snapshot_id/software_attachments/$software_attachment_id?version=2026-06-23&generation=2" \
  -H "accept: application/json" \
  -H "Content-Type: application/merge-patch+json" \
  -H "Authorization: Bearer $iam_token" \
  -d '{"name":"my-renamed-snapshot-software-attachment"}'

For more information, see Update a snapshot software attachment in the VPC API reference.

Retrieving a snapshot software attachment with the API

Make a GET /snapshots/{snapshot_id}/software_attachments/{id} request and specify the software attachment ID and snapshot ID. This request retrieves a single snapshot software attachment that is specified by an identifier in the URL.

The following example retrieves a specific software attachment with an ID of $software_attachment_id for a snapshot with a snapshot ID of $snapshot_id.

curl -X GET "https://us-south.iaas.cloud.ibm.com/v1/snapshot/$snapshot_id/software_attachments/$software_attachment_id?version=2026-06-23&generation=2" -H "accept: application/json" -H "Authorization: Bearer $iam_token"

For more information, see Retrieve a snapshot software attachment in the VPC API.

Updating a snapshot software attachment with Terraform

You can't directly create a software attachment. The software attachment is automatically created when a snapshot is created from a boot volume that has an associated software billing plan.

You use the ibm_is_snapshot_software_attachment resource to manage an existing attachment by adopting it and setting its name. The snapshot_id argument is the snapshot identifier. The name argument is the name to set on the snapshot software attachment.

The following example sets the name of the software attachment.

resource "ibm_is_snapshot_software_attachment" "is_snapshot_software_attachment_instance" {
  name = "my-software-attachment"
  snapshot_id = "snapshot_id"
}

After you define the resource, run terraform apply to adopt the attachment and apply the name.

To update the name of an existing software attachment, update the name argument and run terraform plan to preview the changes, then run terraform apply to apply them.

You can't delete a software attachment by using Terraform. The lifecycle of a software attachment is linked to the snapshot that it is associated with. Running terraform destroy on the ibm_is_snapshot_software_attachment resource removes it only from the Terraform state.

For more information, see ibm_is_snapshot_software_attachment.</

Retrieving a snapshot software attachment with Terraform

You can use Terraform to retrieve the software attachments of a snapshot.

  • To retrieve a specific snapshot software attachment by ID, use the ibm_is_snapshot_software_attachment data source. Specify the snapshot_id and is_snapshot_software_attachment_id arguments.

    data "ibm_is_snapshot_software_attachment" "is_snapshot_software_attachment_instance" {
      snapshot_id                        = ibm_is_snapshot_software_attachment.is_snapshot_software_attachment_instance.snapshot_id
      is_snapshot_software_attachment_id = ibm_is_snapshot_software_attachment.is_snapshot_software_attachment_instance.is_snapshot_software_attachment_id
    }
    
  • To list all software attachments for a snapshot, use the ibm_is_snapshot_software_attachments data source. Specify the snapshot_id argument.

    data "ibm_is_snapshot_software_attachments" "is_snapshot_software_attachments_instance" {
      snapshot_id = ibm_is_snapshot_software_attachment.is_snapshot_software_attachment_instance.snapshot_id
    }
    

For more information, see ibm_is_snapshot_software_attachment.

Next steps