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

ibm.getIsInstanceNetworkAttachment

Explore with Pulumi AI

Provides a read-only data source to retrieve information about an Instance NetworkAttachment. You can then reference the fields of the data source in other resources within the same configuration by using interpolation syntax.

Example Usage

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

const example = ibm.getIsInstanceNetworkAttachment({
    instance: ibm_is_instance.example.id,
    networkAttachment: ibm_is_instance.example.primary_network_attachment[0].id,
});
Copy
import pulumi
import pulumi_ibm as ibm

example = ibm.get_is_instance_network_attachment(instance=ibm_is_instance["example"]["id"],
    network_attachment=ibm_is_instance["example"]["primary_network_attachment"][0]["id"])
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.LookupIsInstanceNetworkAttachment(ctx, &ibm.LookupIsInstanceNetworkAttachmentArgs{
			Instance:          ibm_is_instance.Example.Id,
			NetworkAttachment: ibm_is_instance.Example.Primary_network_attachment[0].Id,
		}, 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.GetIsInstanceNetworkAttachment.Invoke(new()
    {
        Instance = ibm_is_instance.Example.Id,
        NetworkAttachment = ibm_is_instance.Example.Primary_network_attachment[0].Id,
    });

});
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.GetIsInstanceNetworkAttachmentArgs;
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.getIsInstanceNetworkAttachment(GetIsInstanceNetworkAttachmentArgs.builder()
            .instance(ibm_is_instance.example().id())
            .networkAttachment(ibm_is_instance.example().primary_network_attachment()[0].id())
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: ibm:getIsInstanceNetworkAttachment
      arguments:
        instance: ${ibm_is_instance.example.id}
        networkAttachment: ${ibm_is_instance.example.primary_network_attachment[0].id}
Copy

Using getIsInstanceNetworkAttachment

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 getIsInstanceNetworkAttachment(args: GetIsInstanceNetworkAttachmentArgs, opts?: InvokeOptions): Promise<GetIsInstanceNetworkAttachmentResult>
function getIsInstanceNetworkAttachmentOutput(args: GetIsInstanceNetworkAttachmentOutputArgs, opts?: InvokeOptions): Output<GetIsInstanceNetworkAttachmentResult>
Copy
def get_is_instance_network_attachment(id: Optional[str] = None,
                                       instance: Optional[str] = None,
                                       network_attachment: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetIsInstanceNetworkAttachmentResult
def get_is_instance_network_attachment_output(id: Optional[pulumi.Input[str]] = None,
                                       instance: Optional[pulumi.Input[str]] = None,
                                       network_attachment: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetIsInstanceNetworkAttachmentResult]
Copy
func LookupIsInstanceNetworkAttachment(ctx *Context, args *LookupIsInstanceNetworkAttachmentArgs, opts ...InvokeOption) (*LookupIsInstanceNetworkAttachmentResult, error)
func LookupIsInstanceNetworkAttachmentOutput(ctx *Context, args *LookupIsInstanceNetworkAttachmentOutputArgs, opts ...InvokeOption) LookupIsInstanceNetworkAttachmentResultOutput
Copy

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

public static class GetIsInstanceNetworkAttachment 
{
    public static Task<GetIsInstanceNetworkAttachmentResult> InvokeAsync(GetIsInstanceNetworkAttachmentArgs args, InvokeOptions? opts = null)
    public static Output<GetIsInstanceNetworkAttachmentResult> Invoke(GetIsInstanceNetworkAttachmentInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetIsInstanceNetworkAttachmentResult> getIsInstanceNetworkAttachment(GetIsInstanceNetworkAttachmentArgs args, InvokeOptions options)
public static Output<GetIsInstanceNetworkAttachmentResult> getIsInstanceNetworkAttachment(GetIsInstanceNetworkAttachmentArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getIsInstanceNetworkAttachment:getIsInstanceNetworkAttachment
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Instance This property is required. string
The virtual server instance identifier.
NetworkAttachment This property is required. string
The instance network attachment identifier.
Id string
(String) The unique identifier for this virtual network interface.
Instance This property is required. string
The virtual server instance identifier.
NetworkAttachment This property is required. string
The instance network attachment identifier.
Id string
(String) The unique identifier for this virtual network interface.
instance This property is required. String
The virtual server instance identifier.
networkAttachment This property is required. String
The instance network attachment identifier.
id String
(String) The unique identifier for this virtual network interface.
instance This property is required. string
The virtual server instance identifier.
networkAttachment This property is required. string
The instance network attachment identifier.
id string
(String) The unique identifier for this virtual network interface.
instance This property is required. str
The virtual server instance identifier.
network_attachment This property is required. str
The instance network attachment identifier.
id str
(String) The unique identifier for this virtual network interface.
instance This property is required. String
The virtual server instance identifier.
networkAttachment This property is required. String
The instance network attachment identifier.
id String
(String) The unique identifier for this virtual network interface.

getIsInstanceNetworkAttachment Result

The following output properties are available:

CreatedAt string
(String) The date and time that the instance network attachment was created.
Href string
(String) The URL for this virtual network interface.
Id string
(String) The unique identifier for this virtual network interface.
Instance string
LifecycleState string
(String) The lifecycle state of the instance network attachment. Allowable values are: deleting, failed, pending, stable, suspended, updating, waiting.
Name string
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
NetworkAttachment string
PortSpeed double
(Integer) The port speed for this instance network attachment in Mbps.
PrimaryIps List<GetIsInstanceNetworkAttachmentPrimaryIp>
(List) The primary IP address of the virtual network interface for the instance networkattachment. Nested schema for primary_ip:
ResourceType string
(String) The resource type.
Subnets List<GetIsInstanceNetworkAttachmentSubnet>
(List) The subnet of the virtual network interface for the instance network attachment. Nested schema for subnet:
Type string
(String) The instance network attachment type.
VirtualNetworkInterfaces List<GetIsInstanceNetworkAttachmentVirtualNetworkInterface>
(List) The virtual network interface for this instance network attachment. Nested schema for virtual_network_interface:
CreatedAt string
(String) The date and time that the instance network attachment was created.
Href string
(String) The URL for this virtual network interface.
Id string
(String) The unique identifier for this virtual network interface.
Instance string
LifecycleState string
(String) The lifecycle state of the instance network attachment. Allowable values are: deleting, failed, pending, stable, suspended, updating, waiting.
Name string
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
NetworkAttachment string
PortSpeed float64
(Integer) The port speed for this instance network attachment in Mbps.
PrimaryIps []GetIsInstanceNetworkAttachmentPrimaryIp
(List) The primary IP address of the virtual network interface for the instance networkattachment. Nested schema for primary_ip:
ResourceType string
(String) The resource type.
Subnets []GetIsInstanceNetworkAttachmentSubnet
(List) The subnet of the virtual network interface for the instance network attachment. Nested schema for subnet:
Type string
(String) The instance network attachment type.
VirtualNetworkInterfaces []GetIsInstanceNetworkAttachmentVirtualNetworkInterface
(List) The virtual network interface for this instance network attachment. Nested schema for virtual_network_interface:
createdAt String
(String) The date and time that the instance network attachment was created.
href String
(String) The URL for this virtual network interface.
id String
(String) The unique identifier for this virtual network interface.
instance String
lifecycleState String
(String) The lifecycle state of the instance network attachment. Allowable values are: deleting, failed, pending, stable, suspended, updating, waiting.
name String
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
networkAttachment String
portSpeed Double
(Integer) The port speed for this instance network attachment in Mbps.
primaryIps List<GetIsInstanceNetworkAttachmentPrimaryIp>
(List) The primary IP address of the virtual network interface for the instance networkattachment. Nested schema for primary_ip:
resourceType String
(String) The resource type.
subnets List<GetIsInstanceNetworkAttachmentSubnet>
(List) The subnet of the virtual network interface for the instance network attachment. Nested schema for subnet:
type String
(String) The instance network attachment type.
virtualNetworkInterfaces List<GetIsInstanceNetworkAttachmentVirtualNetworkInterface>
(List) The virtual network interface for this instance network attachment. Nested schema for virtual_network_interface:
createdAt string
(String) The date and time that the instance network attachment was created.
href string
(String) The URL for this virtual network interface.
id string
(String) The unique identifier for this virtual network interface.
instance string
lifecycleState string
(String) The lifecycle state of the instance network attachment. Allowable values are: deleting, failed, pending, stable, suspended, updating, waiting.
name string
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
networkAttachment string
portSpeed number
(Integer) The port speed for this instance network attachment in Mbps.
primaryIps GetIsInstanceNetworkAttachmentPrimaryIp[]
(List) The primary IP address of the virtual network interface for the instance networkattachment. Nested schema for primary_ip:
resourceType string
(String) The resource type.
subnets GetIsInstanceNetworkAttachmentSubnet[]
(List) The subnet of the virtual network interface for the instance network attachment. Nested schema for subnet:
type string
(String) The instance network attachment type.
virtualNetworkInterfaces GetIsInstanceNetworkAttachmentVirtualNetworkInterface[]
(List) The virtual network interface for this instance network attachment. Nested schema for virtual_network_interface:
created_at str
(String) The date and time that the instance network attachment was created.
href str
(String) The URL for this virtual network interface.
id str
(String) The unique identifier for this virtual network interface.
instance str
lifecycle_state str
(String) The lifecycle state of the instance network attachment. Allowable values are: deleting, failed, pending, stable, suspended, updating, waiting.
name str
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
network_attachment str
port_speed float
(Integer) The port speed for this instance network attachment in Mbps.
primary_ips Sequence[GetIsInstanceNetworkAttachmentPrimaryIp]
(List) The primary IP address of the virtual network interface for the instance networkattachment. Nested schema for primary_ip:
resource_type str
(String) The resource type.
subnets Sequence[GetIsInstanceNetworkAttachmentSubnet]
(List) The subnet of the virtual network interface for the instance network attachment. Nested schema for subnet:
type str
(String) The instance network attachment type.
virtual_network_interfaces Sequence[GetIsInstanceNetworkAttachmentVirtualNetworkInterface]
(List) The virtual network interface for this instance network attachment. Nested schema for virtual_network_interface:
createdAt String
(String) The date and time that the instance network attachment was created.
href String
(String) The URL for this virtual network interface.
id String
(String) The unique identifier for this virtual network interface.
instance String
lifecycleState String
(String) The lifecycle state of the instance network attachment. Allowable values are: deleting, failed, pending, stable, suspended, updating, waiting.
name String
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
networkAttachment String
portSpeed Number
(Integer) The port speed for this instance network attachment in Mbps.
primaryIps List<Property Map>
(List) The primary IP address of the virtual network interface for the instance networkattachment. Nested schema for primary_ip:
resourceType String
(String) The resource type.
subnets List<Property Map>
(List) The subnet of the virtual network interface for the instance network attachment. Nested schema for subnet:
type String
(String) The instance network attachment type.
virtualNetworkInterfaces List<Property Map>
(List) The virtual network interface for this instance network attachment. Nested schema for virtual_network_interface:

Supporting Types

GetIsInstanceNetworkAttachmentPrimaryIp

Address This property is required. string
(String) The IP address.If the address has not yet been selected, the value will be 0.0.0.0.This property may add support for IPv6 addresses in the future. When processing a value in this property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
Deleteds This property is required. List<GetIsInstanceNetworkAttachmentPrimaryIpDeleted>
(List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
Href This property is required. string
(String) The URL for this virtual network interface.
Id This property is required. string
(String) The unique identifier for this virtual network interface.
Name This property is required. string
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
ResourceType This property is required. string
(String) The resource type.
Address This property is required. string
(String) The IP address.If the address has not yet been selected, the value will be 0.0.0.0.This property may add support for IPv6 addresses in the future. When processing a value in this property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
Deleteds This property is required. []GetIsInstanceNetworkAttachmentPrimaryIpDeleted
(List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
Href This property is required. string
(String) The URL for this virtual network interface.
Id This property is required. string
(String) The unique identifier for this virtual network interface.
Name This property is required. string
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
ResourceType This property is required. string
(String) The resource type.
address This property is required. String
(String) The IP address.If the address has not yet been selected, the value will be 0.0.0.0.This property may add support for IPv6 addresses in the future. When processing a value in this property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
deleteds This property is required. List<GetIsInstanceNetworkAttachmentPrimaryIpDeleted>
(List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
href This property is required. String
(String) The URL for this virtual network interface.
id This property is required. String
(String) The unique identifier for this virtual network interface.
name This property is required. String
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
resourceType This property is required. String
(String) The resource type.
address This property is required. string
(String) The IP address.If the address has not yet been selected, the value will be 0.0.0.0.This property may add support for IPv6 addresses in the future. When processing a value in this property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
deleteds This property is required. GetIsInstanceNetworkAttachmentPrimaryIpDeleted[]
(List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
href This property is required. string
(String) The URL for this virtual network interface.
id This property is required. string
(String) The unique identifier for this virtual network interface.
name This property is required. string
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
resourceType This property is required. string
(String) The resource type.
address This property is required. str
(String) The IP address.If the address has not yet been selected, the value will be 0.0.0.0.This property may add support for IPv6 addresses in the future. When processing a value in this property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
deleteds This property is required. Sequence[GetIsInstanceNetworkAttachmentPrimaryIpDeleted]
(List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
href This property is required. str
(String) The URL for this virtual network interface.
id This property is required. str
(String) The unique identifier for this virtual network interface.
name This property is required. str
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
resource_type This property is required. str
(String) The resource type.
address This property is required. String
(String) The IP address.If the address has not yet been selected, the value will be 0.0.0.0.This property may add support for IPv6 addresses in the future. When processing a value in this property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
deleteds This property is required. List<Property Map>
(List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
href This property is required. String
(String) The URL for this virtual network interface.
id This property is required. String
(String) The unique identifier for this virtual network interface.
name This property is required. String
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
resourceType This property is required. String
(String) The resource type.

GetIsInstanceNetworkAttachmentPrimaryIpDeleted

MoreInfo This property is required. string
(String) Link to documentation about deleted resources.
MoreInfo This property is required. string
(String) Link to documentation about deleted resources.
moreInfo This property is required. String
(String) Link to documentation about deleted resources.
moreInfo This property is required. string
(String) Link to documentation about deleted resources.
more_info This property is required. str
(String) Link to documentation about deleted resources.
moreInfo This property is required. String
(String) Link to documentation about deleted resources.

GetIsInstanceNetworkAttachmentSubnet

Crn This property is required. string
(String) The CRN for this virtual network interface.
Deleteds This property is required. List<GetIsInstanceNetworkAttachmentSubnetDeleted>
(List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
Href This property is required. string
(String) The URL for this virtual network interface.
Id This property is required. string
(String) The unique identifier for this virtual network interface.
Name This property is required. string
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
ResourceType This property is required. string
(String) The resource type.
Crn This property is required. string
(String) The CRN for this virtual network interface.
Deleteds This property is required. []GetIsInstanceNetworkAttachmentSubnetDeleted
(List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
Href This property is required. string
(String) The URL for this virtual network interface.
Id This property is required. string
(String) The unique identifier for this virtual network interface.
Name This property is required. string
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
ResourceType This property is required. string
(String) The resource type.
crn This property is required. String
(String) The CRN for this virtual network interface.
deleteds This property is required. List<GetIsInstanceNetworkAttachmentSubnetDeleted>
(List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
href This property is required. String
(String) The URL for this virtual network interface.
id This property is required. String
(String) The unique identifier for this virtual network interface.
name This property is required. String
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
resourceType This property is required. String
(String) The resource type.
crn This property is required. string
(String) The CRN for this virtual network interface.
deleteds This property is required. GetIsInstanceNetworkAttachmentSubnetDeleted[]
(List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
href This property is required. string
(String) The URL for this virtual network interface.
id This property is required. string
(String) The unique identifier for this virtual network interface.
name This property is required. string
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
resourceType This property is required. string
(String) The resource type.
crn This property is required. str
(String) The CRN for this virtual network interface.
deleteds This property is required. Sequence[GetIsInstanceNetworkAttachmentSubnetDeleted]
(List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
href This property is required. str
(String) The URL for this virtual network interface.
id This property is required. str
(String) The unique identifier for this virtual network interface.
name This property is required. str
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
resource_type This property is required. str
(String) The resource type.
crn This property is required. String
(String) The CRN for this virtual network interface.
deleteds This property is required. List<Property Map>
(List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
href This property is required. String
(String) The URL for this virtual network interface.
id This property is required. String
(String) The unique identifier for this virtual network interface.
name This property is required. String
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
resourceType This property is required. String
(String) The resource type.

GetIsInstanceNetworkAttachmentSubnetDeleted

MoreInfo This property is required. string
(String) Link to documentation about deleted resources.
MoreInfo This property is required. string
(String) Link to documentation about deleted resources.
moreInfo This property is required. String
(String) Link to documentation about deleted resources.
moreInfo This property is required. string
(String) Link to documentation about deleted resources.
more_info This property is required. str
(String) Link to documentation about deleted resources.
moreInfo This property is required. String
(String) Link to documentation about deleted resources.

GetIsInstanceNetworkAttachmentVirtualNetworkInterface

Crn This property is required. string
(String) The CRN for this virtual network interface.
Href This property is required. string
(String) The URL for this virtual network interface.
Id This property is required. string
(String) The unique identifier for this virtual network interface.
Name This property is required. string
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
ResourceType This property is required. string
(String) The resource type.
Crn This property is required. string
(String) The CRN for this virtual network interface.
Href This property is required. string
(String) The URL for this virtual network interface.
Id This property is required. string
(String) The unique identifier for this virtual network interface.
Name This property is required. string
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
ResourceType This property is required. string
(String) The resource type.
crn This property is required. String
(String) The CRN for this virtual network interface.
href This property is required. String
(String) The URL for this virtual network interface.
id This property is required. String
(String) The unique identifier for this virtual network interface.
name This property is required. String
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
resourceType This property is required. String
(String) The resource type.
crn This property is required. string
(String) The CRN for this virtual network interface.
href This property is required. string
(String) The URL for this virtual network interface.
id This property is required. string
(String) The unique identifier for this virtual network interface.
name This property is required. string
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
resourceType This property is required. string
(String) The resource type.
crn This property is required. str
(String) The CRN for this virtual network interface.
href This property is required. str
(String) The URL for this virtual network interface.
id This property is required. str
(String) The unique identifier for this virtual network interface.
name This property is required. str
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
resource_type This property is required. str
(String) The resource type.
crn This property is required. String
(String) The CRN for this virtual network interface.
href This property is required. String
(String) The URL for this virtual network interface.
id This property is required. String
(String) The unique identifier for this virtual network interface.
name This property is required. String
(String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
resourceType This property is required. String
(String) The resource type.

Package Details

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