1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsInstanceVolumeAttachment
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getIsInstanceVolumeAttachment

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    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";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    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) {
        }
    }
    
    {}
    

    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",
    });
    
    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")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ibm:getIsInstanceVolumeAttachment
          arguments:
            instance: ${ibm_is_instance.example.id}
            name: example-instance-volume-attachment
    

    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>
    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]
    func LookupIsInstanceVolumeAttachment(ctx *Context, args *LookupIsInstanceVolumeAttachmentArgs, opts ...InvokeOption) (*LookupIsInstanceVolumeAttachmentResult, error)
    func LookupIsInstanceVolumeAttachmentOutput(ctx *Context, args *LookupIsInstanceVolumeAttachmentOutputArgs, opts ...InvokeOption) LookupIsInstanceVolumeAttachmentResultOutput

    > 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)
    }
    public static CompletableFuture<GetIsInstanceVolumeAttachmentResult> getIsInstanceVolumeAttachment(GetIsInstanceVolumeAttachmentArgs args, InvokeOptions options)
    public static Output<GetIsInstanceVolumeAttachmentResult> getIsInstanceVolumeAttachment(GetIsInstanceVolumeAttachmentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsInstanceVolumeAttachment:getIsInstanceVolumeAttachment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Instance string
    The ID of the instance.
    Name string
    The name of the volume attachment.
    Id string
    (String) The unique identifier for this volume.
    Instance string
    The ID of the instance.
    Name string
    The name of the volume attachment.
    Id string
    (String) The unique identifier for this volume.
    instance String
    The ID of the instance.
    name String
    The name of the volume attachment.
    id String
    (String) The unique identifier for this volume.
    instance string
    The ID of the instance.
    name string
    The name of the volume attachment.
    id string
    (String) The unique identifier for this volume.
    instance str
    The ID of the instance.
    name str
    The name of the volume attachment.
    id str
    (String) The unique identifier for this volume.
    instance String
    The ID of the instance.
    name 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 string
    VolumeDeleted string
    VolumeHref string
    VolumeId string
    VolumeName string
    VolumeCrn string
    VolumeDeleted string
    VolumeHref string
    VolumeId string
    VolumeName string
    volumeCrn String
    volumeDeleted String
    volumeHref String
    volumeId String
    volumeName String
    volumeCrn string
    volumeDeleted string
    volumeHref string
    volumeId string
    volumeName string
    volumeCrn String
    volumeDeleted String
    volumeHref String
    volumeId String
    volumeName String

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud