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";
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 dictionaryThe following arguments are supported:
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.
 - Delete
Volume boolOn Instance Delete  - (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.
 - Volume
Attachment stringId  - (String) The unique identifier for this volume attachment.
 - Volume
References List<GetIs Instance Volume Attachment Volume Reference>  
- 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.
 - Delete
Volume boolOn Instance Delete  - (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.
 - Volume
Attachment stringId  - (String) The unique identifier for this volume attachment.
 - Volume
References []GetIs Instance Volume Attachment Volume Reference  
- 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.
 - delete
Volume BooleanOn Instance Delete  - (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.
 - volume
Attachment StringId  - (String) The unique identifier for this volume attachment.
 - volume
References List<GetIs Instance Volume Attachment Volume Reference>  
- 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.
 - delete
Volume booleanOn Instance Delete  - (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.
 - volume
Attachment stringId  - (String) The unique identifier for this volume attachment.
 - volume
References GetIs Instance Volume Attachment Volume Reference[]  
- 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_ boolon_ instance_ delete  - (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_ strid  - (String) The unique identifier for this volume attachment.
 - volume_
references Sequence[GetIs Instance Volume Attachment Volume Reference]  
- 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.
 - delete
Volume BooleanOn Instance Delete  - (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.
 - volume
Attachment StringId  - (String) The unique identifier for this volume attachment.
 - volume
References List<Property Map> 
Supporting Types
GetIsInstanceVolumeAttachmentVolumeReference      
- Volume
Crn string - Volume
Deleted string - Volume
Href string - Volume
Id string - Volume
Name string 
- Volume
Crn string - Volume
Deleted string - Volume
Href string - Volume
Id string - Volume
Name string 
- volume
Crn String - volume
Deleted String - volume
Href String - volume
Id String - volume
Name String 
- volume
Crn string - volume
Deleted string - volume
Href string - volume
Id string - volume
Name string 
- volume_
crn str - volume_
deleted str - volume_
href str - volume_
id str - volume_
name str 
- volume
Crn String - volume
Deleted String - volume
Href String - volume
Id String - volume
Name String 
Package Details
- Repository
 - ibm ibm-cloud/terraform-provider-ibm
 - License
 - Notes
 - This Pulumi package is based on the 
ibmTerraform Provider.