ibm 1.78.0 published on Wednesday, Apr 30, 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,
});
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"])
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
})
}
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,
});
});
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());
}
}
variables:
example:
fn::invoke:
function: ibm:getIsInstanceNetworkAttachment
arguments:
instance: ${ibm_is_instance.example.id}
networkAttachment: ${ibm_is_instance.example.primary_network_attachment[0].id}
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>
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]
func LookupIsInstanceNetworkAttachment(ctx *Context, args *LookupIsInstanceNetworkAttachmentArgs, opts ...InvokeOption) (*LookupIsInstanceNetworkAttachmentResult, error)
func LookupIsInstanceNetworkAttachmentOutput(ctx *Context, args *LookupIsInstanceNetworkAttachmentOutputArgs, opts ...InvokeOption) LookupIsInstanceNetworkAttachmentResultOutput
> 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)
}
public static CompletableFuture<GetIsInstanceNetworkAttachmentResult> getIsInstanceNetworkAttachment(GetIsInstanceNetworkAttachmentArgs args, InvokeOptions options)
public static Output<GetIsInstanceNetworkAttachmentResult> getIsInstanceNetworkAttachment(GetIsInstanceNetworkAttachmentArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getIsInstanceNetworkAttachment:getIsInstanceNetworkAttachment
arguments:
# arguments dictionary
The following arguments are supported:
- Instance string
- The virtual server instance identifier.
- Network
Attachment string - The instance network attachment identifier.
- Id string
- (String) The unique identifier for this virtual network interface.
- Instance string
- The virtual server instance identifier.
- Network
Attachment string - The instance network attachment identifier.
- Id string
- (String) The unique identifier for this virtual network interface.
- instance String
- The virtual server instance identifier.
- network
Attachment String - The instance network attachment identifier.
- id String
- (String) The unique identifier for this virtual network interface.
- instance string
- The virtual server instance identifier.
- network
Attachment string - The instance network attachment identifier.
- id string
- (String) The unique identifier for this virtual network interface.
- instance str
- The virtual server instance identifier.
- network_
attachment str - The instance network attachment identifier.
- id str
- (String) The unique identifier for this virtual network interface.
- instance String
- The virtual server instance identifier.
- network
Attachment 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:
- Created
At 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
- Lifecycle
State 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.
- Network
Attachment string - Port
Speed double - (Integer) The port speed for this instance network attachment in Mbps.
- Primary
Ips List<GetIs Instance Network Attachment Primary Ip> - (List) The primary IP address of the virtual network interface for the instance networkattachment. Nested schema for primary_ip:
- Resource
Type string - (String) The resource type.
- Subnets
List<Get
Is Instance Network Attachment Subnet> - (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.
- Virtual
Network List<GetInterfaces Is Instance Network Attachment Virtual Network Interface> - (List) The virtual network interface for this instance network attachment. Nested schema for virtual_network_interface:
- Created
At 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
- Lifecycle
State 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.
- Network
Attachment string - Port
Speed float64 - (Integer) The port speed for this instance network attachment in Mbps.
- Primary
Ips []GetIs Instance Network Attachment Primary Ip - (List) The primary IP address of the virtual network interface for the instance networkattachment. Nested schema for primary_ip:
- Resource
Type string - (String) The resource type.
- Subnets
[]Get
Is Instance Network Attachment Subnet - (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.
- Virtual
Network []GetInterfaces Is Instance Network Attachment Virtual Network Interface - (List) The virtual network interface for this instance network attachment. Nested schema for virtual_network_interface:
- created
At 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
- lifecycle
State 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.
- network
Attachment String - port
Speed Double - (Integer) The port speed for this instance network attachment in Mbps.
- primary
Ips List<GetIs Instance Network Attachment Primary Ip> - (List) The primary IP address of the virtual network interface for the instance networkattachment. Nested schema for primary_ip:
- resource
Type String - (String) The resource type.
- subnets
List<Get
Is Instance Network Attachment Subnet> - (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.
- virtual
Network List<GetInterfaces Is Instance Network Attachment Virtual Network Interface> - (List) The virtual network interface for this instance network attachment. Nested schema for virtual_network_interface:
- created
At 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
- lifecycle
State 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.
- network
Attachment string - port
Speed number - (Integer) The port speed for this instance network attachment in Mbps.
- primary
Ips GetIs Instance Network Attachment Primary Ip[] - (List) The primary IP address of the virtual network interface for the instance networkattachment. Nested schema for primary_ip:
- resource
Type string - (String) The resource type.
- subnets
Get
Is Instance Network Attachment Subnet[] - (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.
- virtual
Network GetInterfaces Is Instance Network Attachment Virtual Network Interface[] - (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[GetIs Instance Network Attachment Primary Ip] - (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[Get
Is Instance Network Attachment Subnet] - (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_ Sequence[Getinterfaces Is Instance Network Attachment Virtual Network Interface] - (List) The virtual network interface for this instance network attachment. Nested schema for virtual_network_interface:
- created
At 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
- lifecycle
State 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.
- network
Attachment String - port
Speed Number - (Integer) The port speed for this instance network attachment in Mbps.
- primary
Ips List<Property Map> - (List) The primary IP address of the virtual network interface for the instance networkattachment. Nested schema for primary_ip:
- resource
Type 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.
- virtual
Network List<Property Map>Interfaces - (List) The virtual network interface for this instance network attachment. Nested schema for virtual_network_interface:
Supporting Types
GetIsInstanceNetworkAttachmentPrimaryIp
- Address 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
List<Get
Is Instance Network Attachment Primary Ip Deleted> - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
- Href string
- (String) The URL for this virtual network interface.
- Id string
- (String) The unique identifier for this virtual network interface.
- Name string
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- Resource
Type string - (String) The resource type.
- Address 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
[]Get
Is Instance Network Attachment Primary Ip Deleted - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
- Href string
- (String) The URL for this virtual network interface.
- Id string
- (String) The unique identifier for this virtual network interface.
- Name string
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- Resource
Type string - (String) The resource type.
- address 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
List<Get
Is Instance Network Attachment Primary Ip Deleted> - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
- href String
- (String) The URL for this virtual network interface.
- id String
- (String) The unique identifier for this virtual network interface.
- name String
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- resource
Type String - (String) The resource type.
- address 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
Get
Is Instance Network Attachment Primary Ip Deleted[] - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
- href string
- (String) The URL for this virtual network interface.
- id string
- (String) The unique identifier for this virtual network interface.
- name string
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- resource
Type string - (String) The resource type.
- address 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
Sequence[Get
Is Instance Network Attachment Primary Ip Deleted] - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
- href str
- (String) The URL for this virtual network interface.
- id str
- (String) The unique identifier for this virtual network interface.
- name str
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- resource_
type str - (String) The resource type.
- address 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 List<Property Map>
- (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
- href String
- (String) The URL for this virtual network interface.
- id String
- (String) The unique identifier for this virtual network interface.
- name String
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- resource
Type String - (String) The resource type.
GetIsInstanceNetworkAttachmentPrimaryIpDeleted
- More
Info string - (String) Link to documentation about deleted resources.
- More
Info string - (String) Link to documentation about deleted resources.
- more
Info String - (String) Link to documentation about deleted resources.
- more
Info string - (String) Link to documentation about deleted resources.
- more_
info str - (String) Link to documentation about deleted resources.
- more
Info String - (String) Link to documentation about deleted resources.
GetIsInstanceNetworkAttachmentSubnet
- Crn string
- (String) The CRN for this virtual network interface.
- Deleteds
List<Get
Is Instance Network Attachment Subnet Deleted> - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
- Href string
- (String) The URL for this virtual network interface.
- Id string
- (String) The unique identifier for this virtual network interface.
- Name string
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- Resource
Type string - (String) The resource type.
- Crn string
- (String) The CRN for this virtual network interface.
- Deleteds
[]Get
Is Instance Network Attachment Subnet Deleted - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
- Href string
- (String) The URL for this virtual network interface.
- Id string
- (String) The unique identifier for this virtual network interface.
- Name string
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- Resource
Type string - (String) The resource type.
- crn String
- (String) The CRN for this virtual network interface.
- deleteds
List<Get
Is Instance Network Attachment Subnet Deleted> - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
- href String
- (String) The URL for this virtual network interface.
- id String
- (String) The unique identifier for this virtual network interface.
- name String
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- resource
Type String - (String) The resource type.
- crn string
- (String) The CRN for this virtual network interface.
- deleteds
Get
Is Instance Network Attachment Subnet Deleted[] - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
- href string
- (String) The URL for this virtual network interface.
- id string
- (String) The unique identifier for this virtual network interface.
- name string
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- resource
Type string - (String) The resource type.
- crn str
- (String) The CRN for this virtual network interface.
- deleteds
Sequence[Get
Is Instance Network Attachment Subnet Deleted] - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
- href str
- (String) The URL for this virtual network interface.
- id str
- (String) The unique identifier for this virtual network interface.
- name str
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- resource_
type str - (String) The resource type.
- crn String
- (String) The CRN for this virtual network interface.
- deleteds List<Property Map>
- (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. Nested schema for deleted:
- href String
- (String) The URL for this virtual network interface.
- id String
- (String) The unique identifier for this virtual network interface.
- name String
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- resource
Type String - (String) The resource type.
GetIsInstanceNetworkAttachmentSubnetDeleted
- More
Info string - (String) Link to documentation about deleted resources.
- More
Info string - (String) Link to documentation about deleted resources.
- more
Info String - (String) Link to documentation about deleted resources.
- more
Info string - (String) Link to documentation about deleted resources.
- more_
info str - (String) Link to documentation about deleted resources.
- more
Info String - (String) Link to documentation about deleted resources.
GetIsInstanceNetworkAttachmentVirtualNetworkInterface
- Crn string
- (String) The CRN for this virtual network interface.
- Href string
- (String) The URL for this virtual network interface.
- Id string
- (String) The unique identifier for this virtual network interface.
- Name string
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- Resource
Type string - (String) The resource type.
- Crn string
- (String) The CRN for this virtual network interface.
- Href string
- (String) The URL for this virtual network interface.
- Id string
- (String) The unique identifier for this virtual network interface.
- Name string
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- Resource
Type string - (String) The resource type.
- crn String
- (String) The CRN for this virtual network interface.
- href String
- (String) The URL for this virtual network interface.
- id String
- (String) The unique identifier for this virtual network interface.
- name String
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- resource
Type String - (String) The resource type.
- crn string
- (String) The CRN for this virtual network interface.
- href string
- (String) The URL for this virtual network interface.
- id string
- (String) The unique identifier for this virtual network interface.
- name string
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- resource
Type string - (String) The resource type.
- crn str
- (String) The CRN for this virtual network interface.
- href str
- (String) The URL for this virtual network interface.
- id str
- (String) The unique identifier for this virtual network interface.
- name str
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- resource_
type str - (String) The resource type.
- crn String
- (String) The CRN for this virtual network interface.
- href String
- (String) The URL for this virtual network interface.
- id String
- (String) The unique identifier for this virtual network interface.
- name String
- (String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.
- resource
Type 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.