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

ibm.getPiInstanceIp

Explore with Pulumi AI

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

    Retrieve information about a Power Systems Virtual Server instance IP address. For more information, about Power Systems Virtual Server instance IP address, see configuring and adding a private network subnet.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const dsInstanceIp = ibm.getPiInstanceIp({
        piCloudInstanceId: "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
        piInstanceName: "terraform-test-instance",
        piNetworkName: "APP",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    ds_instance_ip = ibm.get_pi_instance_ip(pi_cloud_instance_id="49fba6c9-23f8-40bc-9899-aca322ee7d5b",
        pi_instance_name="terraform-test-instance",
        pi_network_name="APP")
    
    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.GetPiInstanceIp(ctx, &ibm.GetPiInstanceIpArgs{
    			PiCloudInstanceId: "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
    			PiInstanceName:    "terraform-test-instance",
    			PiNetworkName:     "APP",
    		}, 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 dsInstanceIp = Ibm.GetPiInstanceIp.Invoke(new()
        {
            PiCloudInstanceId = "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
            PiInstanceName = "terraform-test-instance",
            PiNetworkName = "APP",
        });
    
    });
    
    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.GetPiInstanceIpArgs;
    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 dsInstanceIp = IbmFunctions.getPiInstanceIp(GetPiInstanceIpArgs.builder()
                .piCloudInstanceId("49fba6c9-23f8-40bc-9899-aca322ee7d5b")
                .piInstanceName("terraform-test-instance")
                .piNetworkName("APP")
                .build());
    
        }
    }
    
    variables:
      dsInstanceIp:
        fn::invoke:
          function: ibm:getPiInstanceIp
          arguments:
            piCloudInstanceId: 49fba6c9-23f8-40bc-9899-aca322ee7d5b
            piInstanceName: terraform-test-instance
            piNetworkName: APP
    

    Notes

    • Please find supported Regions for endpoints.
    • If a Power cloud instance is provisioned at lon04, The provider level attributes should be as follows:
      • region - lon
      • zone - lon04

    Example usage:

    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) {
        }
    }
    
    {}
    

    Using getPiInstanceIp

    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 getPiInstanceIp(args: GetPiInstanceIpArgs, opts?: InvokeOptions): Promise<GetPiInstanceIpResult>
    function getPiInstanceIpOutput(args: GetPiInstanceIpOutputArgs, opts?: InvokeOptions): Output<GetPiInstanceIpResult>
    def get_pi_instance_ip(id: Optional[str] = None,
                           pi_cloud_instance_id: Optional[str] = None,
                           pi_instance_name: Optional[str] = None,
                           pi_network_name: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetPiInstanceIpResult
    def get_pi_instance_ip_output(id: Optional[pulumi.Input[str]] = None,
                           pi_cloud_instance_id: Optional[pulumi.Input[str]] = None,
                           pi_instance_name: Optional[pulumi.Input[str]] = None,
                           pi_network_name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetPiInstanceIpResult]
    func GetPiInstanceIp(ctx *Context, args *GetPiInstanceIpArgs, opts ...InvokeOption) (*GetPiInstanceIpResult, error)
    func GetPiInstanceIpOutput(ctx *Context, args *GetPiInstanceIpOutputArgs, opts ...InvokeOption) GetPiInstanceIpResultOutput

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

    public static class GetPiInstanceIp 
    {
        public static Task<GetPiInstanceIpResult> InvokeAsync(GetPiInstanceIpArgs args, InvokeOptions? opts = null)
        public static Output<GetPiInstanceIpResult> Invoke(GetPiInstanceIpInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPiInstanceIpResult> getPiInstanceIp(GetPiInstanceIpArgs args, InvokeOptions options)
    public static Output<GetPiInstanceIpResult> getPiInstanceIp(GetPiInstanceIpArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getPiInstanceIp:getPiInstanceIp
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiInstanceName string
    The unique identifier or name of the instance.
    PiNetworkName string
    The subnet that the instance belongs to.
    Id string
    (String) The unique identifier of the network.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiInstanceName string
    The unique identifier or name of the instance.
    PiNetworkName string
    The subnet that the instance belongs to.
    Id string
    (String) The unique identifier of the network.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piInstanceName String
    The unique identifier or name of the instance.
    piNetworkName String
    The subnet that the instance belongs to.
    id String
    (String) The unique identifier of the network.
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piInstanceName string
    The unique identifier or name of the instance.
    piNetworkName string
    The subnet that the instance belongs to.
    id string
    (String) The unique identifier of the network.
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_instance_name str
    The unique identifier or name of the instance.
    pi_network_name str
    The subnet that the instance belongs to.
    id str
    (String) The unique identifier of the network.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piInstanceName String
    The unique identifier or name of the instance.
    piNetworkName String
    The subnet that the instance belongs to.
    id String
    (String) The unique identifier of the network.

    getPiInstanceIp Result

    The following output properties are available:

    ExternalIp string
    (String) The external IP of the network that is attached to this instance.
    Id string
    (String) The unique identifier of the network.
    Ip string
    (String) The IP address that is attached to this instance from the subnet.
    Ipoctet string
    (String) The IP octet of the network that is attached to this instance.
    MacAddress string
    (String) The MAC address of the network that is attached to this instance.
    Macaddress string

    Deprecated: Deprecated

    NetworkId string
    (String) ID of the network.
    NetworkInterfaceId string
    (String) ID of the network interface.
    NetworkSecurityGroupIds List<string>
    (List) IDs of the network necurity groups that the network interface is a member of.
    NetworkSecurityGroupsHreves List<string>
    (List) Links to the network security groups that the network interface is a member of.
    PiCloudInstanceId string
    PiInstanceName string
    PiNetworkName string
    Type string
    (String) The type of the network that is attached to this instance.
    ExternalIp string
    (String) The external IP of the network that is attached to this instance.
    Id string
    (String) The unique identifier of the network.
    Ip string
    (String) The IP address that is attached to this instance from the subnet.
    Ipoctet string
    (String) The IP octet of the network that is attached to this instance.
    MacAddress string
    (String) The MAC address of the network that is attached to this instance.
    Macaddress string

    Deprecated: Deprecated

    NetworkId string
    (String) ID of the network.
    NetworkInterfaceId string
    (String) ID of the network interface.
    NetworkSecurityGroupIds []string
    (List) IDs of the network necurity groups that the network interface is a member of.
    NetworkSecurityGroupsHreves []string
    (List) Links to the network security groups that the network interface is a member of.
    PiCloudInstanceId string
    PiInstanceName string
    PiNetworkName string
    Type string
    (String) The type of the network that is attached to this instance.
    externalIp String
    (String) The external IP of the network that is attached to this instance.
    id String
    (String) The unique identifier of the network.
    ip String
    (String) The IP address that is attached to this instance from the subnet.
    ipoctet String
    (String) The IP octet of the network that is attached to this instance.
    macAddress String
    (String) The MAC address of the network that is attached to this instance.
    macaddress String

    Deprecated: Deprecated

    networkId String
    (String) ID of the network.
    networkInterfaceId String
    (String) ID of the network interface.
    networkSecurityGroupIds List<String>
    (List) IDs of the network necurity groups that the network interface is a member of.
    networkSecurityGroupsHreves List<String>
    (List) Links to the network security groups that the network interface is a member of.
    piCloudInstanceId String
    piInstanceName String
    piNetworkName String
    type String
    (String) The type of the network that is attached to this instance.
    externalIp string
    (String) The external IP of the network that is attached to this instance.
    id string
    (String) The unique identifier of the network.
    ip string
    (String) The IP address that is attached to this instance from the subnet.
    ipoctet string
    (String) The IP octet of the network that is attached to this instance.
    macAddress string
    (String) The MAC address of the network that is attached to this instance.
    macaddress string

    Deprecated: Deprecated

    networkId string
    (String) ID of the network.
    networkInterfaceId string
    (String) ID of the network interface.
    networkSecurityGroupIds string[]
    (List) IDs of the network necurity groups that the network interface is a member of.
    networkSecurityGroupsHreves string[]
    (List) Links to the network security groups that the network interface is a member of.
    piCloudInstanceId string
    piInstanceName string
    piNetworkName string
    type string
    (String) The type of the network that is attached to this instance.
    external_ip str
    (String) The external IP of the network that is attached to this instance.
    id str
    (String) The unique identifier of the network.
    ip str
    (String) The IP address that is attached to this instance from the subnet.
    ipoctet str
    (String) The IP octet of the network that is attached to this instance.
    mac_address str
    (String) The MAC address of the network that is attached to this instance.
    macaddress str

    Deprecated: Deprecated

    network_id str
    (String) ID of the network.
    network_interface_id str
    (String) ID of the network interface.
    network_security_group_ids Sequence[str]
    (List) IDs of the network necurity groups that the network interface is a member of.
    network_security_groups_hreves Sequence[str]
    (List) Links to the network security groups that the network interface is a member of.
    pi_cloud_instance_id str
    pi_instance_name str
    pi_network_name str
    type str
    (String) The type of the network that is attached to this instance.
    externalIp String
    (String) The external IP of the network that is attached to this instance.
    id String
    (String) The unique identifier of the network.
    ip String
    (String) The IP address that is attached to this instance from the subnet.
    ipoctet String
    (String) The IP octet of the network that is attached to this instance.
    macAddress String
    (String) The MAC address of the network that is attached to this instance.
    macaddress String

    Deprecated: Deprecated

    networkId String
    (String) ID of the network.
    networkInterfaceId String
    (String) ID of the network interface.
    networkSecurityGroupIds List<String>
    (List) IDs of the network necurity groups that the network interface is a member of.
    networkSecurityGroupsHreves List<String>
    (List) Links to the network security groups that the network interface is a member of.
    piCloudInstanceId String
    piInstanceName String
    piNetworkName String
    type String
    (String) The type of the network that is attached to this instance.

    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