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

ibm.getIsInstanceNetworkInterfaceReservedIp

Explore with Pulumi AI

Import the details of an existing Reserved IP in a network interface of an instance as a read-only data source. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

Example Usage

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

const dataReservedIp = ibm.getIsInstanceNetworkInterfaceReservedIp({
    instance: ibm_is_instance.test_instance.id,
    networkInterface: ibm_is_instance.test_instance.network_interfaces[0].id,
    reservedIp: ibm_is_instance.test_instance.network_interfaces[0].ips[0].id,
});
Copy
import pulumi
import pulumi_ibm as ibm

data_reserved_ip = ibm.get_is_instance_network_interface_reserved_ip(instance=ibm_is_instance["test_instance"]["id"],
    network_interface=ibm_is_instance["test_instance"]["network_interfaces"][0]["id"],
    reserved_ip=ibm_is_instance["test_instance"]["network_interfaces"][0]["ips"][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.GetIsInstanceNetworkInterfaceReservedIp(ctx, &ibm.GetIsInstanceNetworkInterfaceReservedIpArgs{
			Instance:         ibm_is_instance.Test_instance.Id,
			NetworkInterface: ibm_is_instance.Test_instance.Network_interfaces[0].Id,
			ReservedIp:       ibm_is_instance.Test_instance.Network_interfaces[0].Ips[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 dataReservedIp = Ibm.GetIsInstanceNetworkInterfaceReservedIp.Invoke(new()
    {
        Instance = ibm_is_instance.Test_instance.Id,
        NetworkInterface = ibm_is_instance.Test_instance.Network_interfaces[0].Id,
        ReservedIp = ibm_is_instance.Test_instance.Network_interfaces[0].Ips[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.GetIsInstanceNetworkInterfaceReservedIpArgs;
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 dataReservedIp = IbmFunctions.getIsInstanceNetworkInterfaceReservedIp(GetIsInstanceNetworkInterfaceReservedIpArgs.builder()
            .instance(ibm_is_instance.test_instance().id())
            .networkInterface(ibm_is_instance.test_instance().network_interfaces()[0].id())
            .reservedIp(ibm_is_instance.test_instance().network_interfaces()[0].ips()[0].id())
            .build());

    }
}
Copy
variables:
  dataReservedIp:
    fn::invoke:
      function: ibm:getIsInstanceNetworkInterfaceReservedIp
      arguments:
        instance: ${ibm_is_instance.test_instance.id}
        networkInterface: ${ibm_is_instance.test_instance.network_interfaces[0].id}
        reservedIp: ${ibm_is_instance.test_instance.network_interfaces[0].ips[0].id}
Copy

Using getIsInstanceNetworkInterfaceReservedIp

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 getIsInstanceNetworkInterfaceReservedIp(args: GetIsInstanceNetworkInterfaceReservedIpArgs, opts?: InvokeOptions): Promise<GetIsInstanceNetworkInterfaceReservedIpResult>
function getIsInstanceNetworkInterfaceReservedIpOutput(args: GetIsInstanceNetworkInterfaceReservedIpOutputArgs, opts?: InvokeOptions): Output<GetIsInstanceNetworkInterfaceReservedIpResult>
Copy
def get_is_instance_network_interface_reserved_ip(id: Optional[str] = None,
                                                  instance: Optional[str] = None,
                                                  network_interface: Optional[str] = None,
                                                  reserved_ip: Optional[str] = None,
                                                  opts: Optional[InvokeOptions] = None) -> GetIsInstanceNetworkInterfaceReservedIpResult
def get_is_instance_network_interface_reserved_ip_output(id: Optional[pulumi.Input[str]] = None,
                                                  instance: Optional[pulumi.Input[str]] = None,
                                                  network_interface: Optional[pulumi.Input[str]] = None,
                                                  reserved_ip: Optional[pulumi.Input[str]] = None,
                                                  opts: Optional[InvokeOptions] = None) -> Output[GetIsInstanceNetworkInterfaceReservedIpResult]
Copy
func GetIsInstanceNetworkInterfaceReservedIp(ctx *Context, args *GetIsInstanceNetworkInterfaceReservedIpArgs, opts ...InvokeOption) (*GetIsInstanceNetworkInterfaceReservedIpResult, error)
func GetIsInstanceNetworkInterfaceReservedIpOutput(ctx *Context, args *GetIsInstanceNetworkInterfaceReservedIpOutputArgs, opts ...InvokeOption) GetIsInstanceNetworkInterfaceReservedIpResultOutput
Copy

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

public static class GetIsInstanceNetworkInterfaceReservedIp 
{
    public static Task<GetIsInstanceNetworkInterfaceReservedIpResult> InvokeAsync(GetIsInstanceNetworkInterfaceReservedIpArgs args, InvokeOptions? opts = null)
    public static Output<GetIsInstanceNetworkInterfaceReservedIpResult> Invoke(GetIsInstanceNetworkInterfaceReservedIpInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetIsInstanceNetworkInterfaceReservedIpResult> getIsInstanceNetworkInterfaceReservedIp(GetIsInstanceNetworkInterfaceReservedIpArgs args, InvokeOptions options)
public static Output<GetIsInstanceNetworkInterfaceReservedIpResult> getIsInstanceNetworkInterfaceReservedIp(GetIsInstanceNetworkInterfaceReservedIpArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getIsInstanceNetworkInterfaceReservedIp:getIsInstanceNetworkInterfaceReservedIp
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Instance This property is required. string
The id for the instance.
NetworkInterface This property is required. string
The id for the network interface.
ReservedIp This property is required. string
The id for the Reserved IP.
Id string
(String) The id for the reserved IP
Instance This property is required. string
The id for the instance.
NetworkInterface This property is required. string
The id for the network interface.
ReservedIp This property is required. string
The id for the Reserved IP.
Id string
(String) The id for the reserved IP
instance This property is required. String
The id for the instance.
networkInterface This property is required. String
The id for the network interface.
reservedIp This property is required. String
The id for the Reserved IP.
id String
(String) The id for the reserved IP
instance This property is required. string
The id for the instance.
networkInterface This property is required. string
The id for the network interface.
reservedIp This property is required. string
The id for the Reserved IP.
id string
(String) The id for the reserved IP
instance This property is required. str
The id for the instance.
network_interface This property is required. str
The id for the network interface.
reserved_ip This property is required. str
The id for the Reserved IP.
id str
(String) The id for the reserved IP
instance This property is required. String
The id for the instance.
networkInterface This property is required. String
The id for the network interface.
reservedIp This property is required. String
The id for the Reserved IP.
id String
(String) The id for the reserved IP

getIsInstanceNetworkInterfaceReservedIp Result

The following output properties are available:

Address string
AutoDelete bool
(String) The auto_delete boolean for reserved IP
CreatedAt string
(String) The creation timestamp for the reserved IP
Href string
(String) The unique reference for the reserved IP
Id string
(String) The id for the reserved IP
Instance string
Name string
(String) The name for the reserved IP
NetworkInterface string
Owner string
(String) The owner of the reserved IP
ReservedIp string
(String) Same as id
ResourceType string
(String) The type of resource
Target string
(String) The id for the target for the reserved IP
Address string
AutoDelete bool
(String) The auto_delete boolean for reserved IP
CreatedAt string
(String) The creation timestamp for the reserved IP
Href string
(String) The unique reference for the reserved IP
Id string
(String) The id for the reserved IP
Instance string
Name string
(String) The name for the reserved IP
NetworkInterface string
Owner string
(String) The owner of the reserved IP
ReservedIp string
(String) Same as id
ResourceType string
(String) The type of resource
Target string
(String) The id for the target for the reserved IP
address String
autoDelete Boolean
(String) The auto_delete boolean for reserved IP
createdAt String
(String) The creation timestamp for the reserved IP
href String
(String) The unique reference for the reserved IP
id String
(String) The id for the reserved IP
instance String
name String
(String) The name for the reserved IP
networkInterface String
owner String
(String) The owner of the reserved IP
reservedIp String
(String) Same as id
resourceType String
(String) The type of resource
target String
(String) The id for the target for the reserved IP
address string
autoDelete boolean
(String) The auto_delete boolean for reserved IP
createdAt string
(String) The creation timestamp for the reserved IP
href string
(String) The unique reference for the reserved IP
id string
(String) The id for the reserved IP
instance string
name string
(String) The name for the reserved IP
networkInterface string
owner string
(String) The owner of the reserved IP
reservedIp string
(String) Same as id
resourceType string
(String) The type of resource
target string
(String) The id for the target for the reserved IP
address str
auto_delete bool
(String) The auto_delete boolean for reserved IP
created_at str
(String) The creation timestamp for the reserved IP
href str
(String) The unique reference for the reserved IP
id str
(String) The id for the reserved IP
instance str
name str
(String) The name for the reserved IP
network_interface str
owner str
(String) The owner of the reserved IP
reserved_ip str
(String) Same as id
resource_type str
(String) The type of resource
target str
(String) The id for the target for the reserved IP
address String
autoDelete Boolean
(String) The auto_delete boolean for reserved IP
createdAt String
(String) The creation timestamp for the reserved IP
href String
(String) The unique reference for the reserved IP
id String
(String) The id for the reserved IP
instance String
name String
(String) The name for the reserved IP
networkInterface String
owner String
(String) The owner of the reserved IP
reservedIp String
(String) Same as id
resourceType String
(String) The type of resource
target String
(String) The id for the target for the reserved IP

Package Details

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