1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsInstanceVolumeAttachment
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getIsInstanceVolumeAttachment

Explore with Pulumi AI

Retrieve information of an existing IBM Cloud infrastructure instance volume attachment as a read-only data source. For more information, about VPC virtual server instances, see Managing virtual server instances.

Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

provider.tf

import * as pulumi from "@pulumi/pulumi";
Copy
import pulumi
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;

return await Deployment.RunAsync(() => 
{
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
    }
}
Copy
{}
Copy

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";

const example = ibm.getIsInstanceVolumeAttachment({
    instance: ibm_is_instance.example.id,
    name: "example-instance-volume-attachment",
});
Copy
import pulumi
import pulumi_ibm as ibm

example = ibm.get_is_instance_volume_attachment(instance=ibm_is_instance["example"]["id"],
    name="example-instance-volume-attachment")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ibm.LookupIsInstanceVolumeAttachment(ctx, &ibm.LookupIsInstanceVolumeAttachmentArgs{
			Instance: ibm_is_instance.Example.Id,
			Name:     "example-instance-volume-attachment",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var example = Ibm.GetIsInstanceVolumeAttachment.Invoke(new()
    {
        Instance = ibm_is_instance.Example.Id,
        Name = "example-instance-volume-attachment",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetIsInstanceVolumeAttachmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = IbmFunctions.getIsInstanceVolumeAttachment(GetIsInstanceVolumeAttachmentArgs.builder()
            .instance(ibm_is_instance.example().id())
            .name("example-instance-volume-attachment")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: ibm:getIsInstanceVolumeAttachment
      arguments:
        instance: ${ibm_is_instance.example.id}
        name: example-instance-volume-attachment
Copy

Using getIsInstanceVolumeAttachment

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getIsInstanceVolumeAttachment(args: GetIsInstanceVolumeAttachmentArgs, opts?: InvokeOptions): Promise<GetIsInstanceVolumeAttachmentResult>
function getIsInstanceVolumeAttachmentOutput(args: GetIsInstanceVolumeAttachmentOutputArgs, opts?: InvokeOptions): Output<GetIsInstanceVolumeAttachmentResult>
Copy
def get_is_instance_volume_attachment(id: Optional[str] = None,
                                      instance: Optional[str] = None,
                                      name: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetIsInstanceVolumeAttachmentResult
def get_is_instance_volume_attachment_output(id: Optional[pulumi.Input[str]] = None,
                                      instance: Optional[pulumi.Input[str]] = None,
                                      name: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetIsInstanceVolumeAttachmentResult]
Copy
func LookupIsInstanceVolumeAttachment(ctx *Context, args *LookupIsInstanceVolumeAttachmentArgs, opts ...InvokeOption) (*LookupIsInstanceVolumeAttachmentResult, error)
func LookupIsInstanceVolumeAttachmentOutput(ctx *Context, args *LookupIsInstanceVolumeAttachmentOutputArgs, opts ...InvokeOption) LookupIsInstanceVolumeAttachmentResultOutput
Copy

> Note: This function is named LookupIsInstanceVolumeAttachment in the Go SDK.

public static class GetIsInstanceVolumeAttachment 
{
    public static Task<GetIsInstanceVolumeAttachmentResult> InvokeAsync(GetIsInstanceVolumeAttachmentArgs args, InvokeOptions? opts = null)
    public static Output<GetIsInstanceVolumeAttachmentResult> Invoke(GetIsInstanceVolumeAttachmentInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetIsInstanceVolumeAttachmentResult> getIsInstanceVolumeAttachment(GetIsInstanceVolumeAttachmentArgs args, InvokeOptions options)
public static Output<GetIsInstanceVolumeAttachmentResult> getIsInstanceVolumeAttachment(GetIsInstanceVolumeAttachmentArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getIsInstanceVolumeAttachment:getIsInstanceVolumeAttachment
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Instance This property is required. string
The ID of the instance.
Name This property is required. string
The name of the volume attachment.
Id string
(String) The unique identifier for this volume.
Instance This property is required. string
The ID of the instance.
Name This property is required. string
The name of the volume attachment.
Id string
(String) The unique identifier for this volume.
instance This property is required. String
The ID of the instance.
name This property is required. String
The name of the volume attachment.
id String
(String) The unique identifier for this volume.
instance This property is required. string
The ID of the instance.
name This property is required. string
The name of the volume attachment.
id string
(String) The unique identifier for this volume.
instance This property is required. str
The ID of the instance.
name This property is required. str
The name of the volume attachment.
id str
(String) The unique identifier for this volume.
instance This property is required. String
The ID of the instance.
name This property is required. String
The name of the volume attachment.
id String
(String) The unique identifier for this volume.

getIsInstanceVolumeAttachment Result

The following output properties are available:

Bandwidth double
(Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
DeleteVolumeOnInstanceDelete bool
(Boolean) If set to true, when deleting the instance the volume will also be deleted.
Device string
(String) A unique identifier for the device which is exposed to the instance operating system.
Href string
(String) The URL for this volume.
Id string
(String) The unique identifier for this volume.
Instance string
Name string
(String) The unique user-defined name for this volume.
Status string
(String) The status of this volume attachment.
Type string
(String) The type of volume attachment. Supported values are boot, data.
VolumeAttachmentId string
(String) The unique identifier for this volume attachment.
VolumeReferences List<GetIsInstanceVolumeAttachmentVolumeReference>
Bandwidth float64
(Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
DeleteVolumeOnInstanceDelete bool
(Boolean) If set to true, when deleting the instance the volume will also be deleted.
Device string
(String) A unique identifier for the device which is exposed to the instance operating system.
Href string
(String) The URL for this volume.
Id string
(String) The unique identifier for this volume.
Instance string
Name string
(String) The unique user-defined name for this volume.
Status string
(String) The status of this volume attachment.
Type string
(String) The type of volume attachment. Supported values are boot, data.
VolumeAttachmentId string
(String) The unique identifier for this volume attachment.
VolumeReferences []GetIsInstanceVolumeAttachmentVolumeReference
bandwidth Double
(Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
deleteVolumeOnInstanceDelete Boolean
(Boolean) If set to true, when deleting the instance the volume will also be deleted.
device String
(String) A unique identifier for the device which is exposed to the instance operating system.
href String
(String) The URL for this volume.
id String
(String) The unique identifier for this volume.
instance String
name String
(String) The unique user-defined name for this volume.
status String
(String) The status of this volume attachment.
type String
(String) The type of volume attachment. Supported values are boot, data.
volumeAttachmentId String
(String) The unique identifier for this volume attachment.
volumeReferences List<GetIsInstanceVolumeAttachmentVolumeReference>
bandwidth number
(Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
deleteVolumeOnInstanceDelete boolean
(Boolean) If set to true, when deleting the instance the volume will also be deleted.
device string
(String) A unique identifier for the device which is exposed to the instance operating system.
href string
(String) The URL for this volume.
id string
(String) The unique identifier for this volume.
instance string
name string
(String) The unique user-defined name for this volume.
status string
(String) The status of this volume attachment.
type string
(String) The type of volume attachment. Supported values are boot, data.
volumeAttachmentId string
(String) The unique identifier for this volume attachment.
volumeReferences GetIsInstanceVolumeAttachmentVolumeReference[]
bandwidth float
(Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
delete_volume_on_instance_delete bool
(Boolean) If set to true, when deleting the instance the volume will also be deleted.
device str
(String) A unique identifier for the device which is exposed to the instance operating system.
href str
(String) The URL for this volume.
id str
(String) The unique identifier for this volume.
instance str
name str
(String) The unique user-defined name for this volume.
status str
(String) The status of this volume attachment.
type str
(String) The type of volume attachment. Supported values are boot, data.
volume_attachment_id str
(String) The unique identifier for this volume attachment.
volume_references Sequence[GetIsInstanceVolumeAttachmentVolumeReference]
bandwidth Number
(Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
deleteVolumeOnInstanceDelete Boolean
(Boolean) If set to true, when deleting the instance the volume will also be deleted.
device String
(String) A unique identifier for the device which is exposed to the instance operating system.
href String
(String) The URL for this volume.
id String
(String) The unique identifier for this volume.
instance String
name String
(String) The unique user-defined name for this volume.
status String
(String) The status of this volume attachment.
type String
(String) The type of volume attachment. Supported values are boot, data.
volumeAttachmentId String
(String) The unique identifier for this volume attachment.
volumeReferences List<Property Map>

Supporting Types

GetIsInstanceVolumeAttachmentVolumeReference

VolumeCrn This property is required. string
VolumeDeleted This property is required. string
VolumeHref This property is required. string
VolumeId This property is required. string
VolumeName This property is required. string
VolumeCrn This property is required. string
VolumeDeleted This property is required. string
VolumeHref This property is required. string
VolumeId This property is required. string
VolumeName This property is required. string
volumeCrn This property is required. String
volumeDeleted This property is required. String
volumeHref This property is required. String
volumeId This property is required. String
volumeName This property is required. String
volumeCrn This property is required. string
volumeDeleted This property is required. string
volumeHref This property is required. string
volumeId This property is required. string
volumeName This property is required. string
volume_crn This property is required. str
volume_deleted This property is required. str
volume_href This property is required. str
volume_id This property is required. str
volume_name This property is required. str
volumeCrn This property is required. String
volumeDeleted This property is required. String
volumeHref This property is required. String
volumeId This property is required. String
volumeName This property is required. String

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.