1. Packages
  2. Ibm Provider
  3. API Docs
  4. PiRoute
ibm 1.81.1 published on Wednesday, Aug 6, 2025 by ibm-cloud

ibm.PiRoute

Explore with Pulumi AI

ibm logo
ibm 1.81.1 published on Wednesday, Aug 6, 2025 by ibm-cloud

    Create, update or delete a route.

    Example Usage

    The following example enables you to create a route:

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const route = new ibm.PiRoute("route", {
        piCloudInstanceId: "<cloud-instance-id>",
        piDestination: "<destination-cidr>",
        piName: "test-route",
        piNextHop: "<next-hop-ip>",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    route = ibm.PiRoute("route",
        pi_cloud_instance_id="<cloud-instance-id>",
        pi_destination="<destination-cidr>",
        pi_name="test-route",
        pi_next_hop="<next-hop-ip>")
    
    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.NewPiRoute(ctx, "route", &ibm.PiRouteArgs{
    			PiCloudInstanceId: pulumi.String("<cloud-instance-id>"),
    			PiDestination:     pulumi.String("<destination-cidr>"),
    			PiName:            pulumi.String("test-route"),
    			PiNextHop:         pulumi.String("<next-hop-ip>"),
    		})
    		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 route = new Ibm.PiRoute("route", new()
        {
            PiCloudInstanceId = "<cloud-instance-id>",
            PiDestination = "<destination-cidr>",
            PiName = "test-route",
            PiNextHop = "<next-hop-ip>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.PiRoute;
    import com.pulumi.ibm.PiRouteArgs;
    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) {
            var route = new PiRoute("route", PiRouteArgs.builder()
                .piCloudInstanceId("<cloud-instance-id>")
                .piDestination("<destination-cidr>")
                .piName("test-route")
                .piNextHop("<next-hop-ip>")
                .build());
    
        }
    }
    
    resources:
      route:
        type: ibm:PiRoute
        properties:
          piCloudInstanceId: <cloud-instance-id>
          piDestination: <destination-cidr>
          piName: test-route
          piNextHop: <next-hop-ip>
    

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

    Create PiRoute Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PiRoute(name: string, args: PiRouteArgs, opts?: CustomResourceOptions);
    @overload
    def PiRoute(resource_name: str,
                args: PiRouteArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def PiRoute(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                pi_cloud_instance_id: Optional[str] = None,
                pi_destination: Optional[str] = None,
                pi_name: Optional[str] = None,
                pi_next_hop: Optional[str] = None,
                pi_action: Optional[str] = None,
                pi_advertise: Optional[str] = None,
                pi_destination_type: Optional[str] = None,
                pi_enabled: Optional[bool] = None,
                pi_next_hop_type: Optional[str] = None,
                pi_route_id: Optional[str] = None,
                pi_user_tags: Optional[Sequence[str]] = None,
                timeouts: Optional[PiRouteTimeoutsArgs] = None)
    func NewPiRoute(ctx *Context, name string, args PiRouteArgs, opts ...ResourceOption) (*PiRoute, error)
    public PiRoute(string name, PiRouteArgs args, CustomResourceOptions? opts = null)
    public PiRoute(String name, PiRouteArgs args)
    public PiRoute(String name, PiRouteArgs args, CustomResourceOptions options)
    
    type: ibm:PiRoute
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PiRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PiRouteArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PiRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PiRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PiRouteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var piRouteResource = new Ibm.PiRoute("piRouteResource", new()
    {
        PiCloudInstanceId = "string",
        PiDestination = "string",
        PiName = "string",
        PiNextHop = "string",
        PiAction = "string",
        PiAdvertise = "string",
        PiDestinationType = "string",
        PiEnabled = false,
        PiNextHopType = "string",
        PiRouteId = "string",
        PiUserTags = new[]
        {
            "string",
        },
        Timeouts = new Ibm.Inputs.PiRouteTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := ibm.NewPiRoute(ctx, "piRouteResource", &ibm.PiRouteArgs{
    	PiCloudInstanceId: pulumi.String("string"),
    	PiDestination:     pulumi.String("string"),
    	PiName:            pulumi.String("string"),
    	PiNextHop:         pulumi.String("string"),
    	PiAction:          pulumi.String("string"),
    	PiAdvertise:       pulumi.String("string"),
    	PiDestinationType: pulumi.String("string"),
    	PiEnabled:         pulumi.Bool(false),
    	PiNextHopType:     pulumi.String("string"),
    	PiRouteId:         pulumi.String("string"),
    	PiUserTags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeouts: &ibm.PiRouteTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var piRouteResource = new PiRoute("piRouteResource", PiRouteArgs.builder()
        .piCloudInstanceId("string")
        .piDestination("string")
        .piName("string")
        .piNextHop("string")
        .piAction("string")
        .piAdvertise("string")
        .piDestinationType("string")
        .piEnabled(false)
        .piNextHopType("string")
        .piRouteId("string")
        .piUserTags("string")
        .timeouts(PiRouteTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    pi_route_resource = ibm.PiRoute("piRouteResource",
        pi_cloud_instance_id="string",
        pi_destination="string",
        pi_name="string",
        pi_next_hop="string",
        pi_action="string",
        pi_advertise="string",
        pi_destination_type="string",
        pi_enabled=False,
        pi_next_hop_type="string",
        pi_route_id="string",
        pi_user_tags=["string"],
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const piRouteResource = new ibm.PiRoute("piRouteResource", {
        piCloudInstanceId: "string",
        piDestination: "string",
        piName: "string",
        piNextHop: "string",
        piAction: "string",
        piAdvertise: "string",
        piDestinationType: "string",
        piEnabled: false,
        piNextHopType: "string",
        piRouteId: "string",
        piUserTags: ["string"],
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: ibm:PiRoute
    properties:
        piAction: string
        piAdvertise: string
        piCloudInstanceId: string
        piDestination: string
        piDestinationType: string
        piEnabled: false
        piName: string
        piNextHop: string
        piNextHopType: string
        piRouteId: string
        piUserTags:
            - string
        timeouts:
            create: string
            delete: string
            update: string
    

    PiRoute Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The PiRoute resource accepts the following input properties:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiDestination string
    Destination of route.
    PiName string
    Name of the route.
    PiNextHop string
    The next hop.
    PiAction string
    Specifies action for route. Valid values are deliver. Default value is deliver.
    PiAdvertise string
    Indicates if the route is advertised. Default is enable.
    PiDestinationType string
    The destination type. valid values are ipv4-address. Default value is ipv4-address.
    PiEnabled bool
    Indicates if the route should be enabled in the fabric. Default value is false.
    PiNextHopType string
    The next hop type. Valid values are ipv4-address. Default value is ipv4-address.
    PiRouteId string
    PiUserTags List<string>
    The user tags attached to this resource.
    Timeouts PiRouteTimeouts
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiDestination string
    Destination of route.
    PiName string
    Name of the route.
    PiNextHop string
    The next hop.
    PiAction string
    Specifies action for route. Valid values are deliver. Default value is deliver.
    PiAdvertise string
    Indicates if the route is advertised. Default is enable.
    PiDestinationType string
    The destination type. valid values are ipv4-address. Default value is ipv4-address.
    PiEnabled bool
    Indicates if the route should be enabled in the fabric. Default value is false.
    PiNextHopType string
    The next hop type. Valid values are ipv4-address. Default value is ipv4-address.
    PiRouteId string
    PiUserTags []string
    The user tags attached to this resource.
    Timeouts PiRouteTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piDestination String
    Destination of route.
    piName String
    Name of the route.
    piNextHop String
    The next hop.
    piAction String
    Specifies action for route. Valid values are deliver. Default value is deliver.
    piAdvertise String
    Indicates if the route is advertised. Default is enable.
    piDestinationType String
    The destination type. valid values are ipv4-address. Default value is ipv4-address.
    piEnabled Boolean
    Indicates if the route should be enabled in the fabric. Default value is false.
    piNextHopType String
    The next hop type. Valid values are ipv4-address. Default value is ipv4-address.
    piRouteId String
    piUserTags List<String>
    The user tags attached to this resource.
    timeouts PiRouteTimeouts
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piDestination string
    Destination of route.
    piName string
    Name of the route.
    piNextHop string
    The next hop.
    piAction string
    Specifies action for route. Valid values are deliver. Default value is deliver.
    piAdvertise string
    Indicates if the route is advertised. Default is enable.
    piDestinationType string
    The destination type. valid values are ipv4-address. Default value is ipv4-address.
    piEnabled boolean
    Indicates if the route should be enabled in the fabric. Default value is false.
    piNextHopType string
    The next hop type. Valid values are ipv4-address. Default value is ipv4-address.
    piRouteId string
    piUserTags string[]
    The user tags attached to this resource.
    timeouts PiRouteTimeouts
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_destination str
    Destination of route.
    pi_name str
    Name of the route.
    pi_next_hop str
    The next hop.
    pi_action str
    Specifies action for route. Valid values are deliver. Default value is deliver.
    pi_advertise str
    Indicates if the route is advertised. Default is enable.
    pi_destination_type str
    The destination type. valid values are ipv4-address. Default value is ipv4-address.
    pi_enabled bool
    Indicates if the route should be enabled in the fabric. Default value is false.
    pi_next_hop_type str
    The next hop type. Valid values are ipv4-address. Default value is ipv4-address.
    pi_route_id str
    pi_user_tags Sequence[str]
    The user tags attached to this resource.
    timeouts PiRouteTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piDestination String
    Destination of route.
    piName String
    Name of the route.
    piNextHop String
    The next hop.
    piAction String
    Specifies action for route. Valid values are deliver. Default value is deliver.
    piAdvertise String
    Indicates if the route is advertised. Default is enable.
    piDestinationType String
    The destination type. valid values are ipv4-address. Default value is ipv4-address.
    piEnabled Boolean
    Indicates if the route should be enabled in the fabric. Default value is false.
    piNextHopType String
    The next hop type. Valid values are ipv4-address. Default value is ipv4-address.
    piRouteId String
    piUserTags List<String>
    The user tags attached to this resource.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PiRoute resource produces the following output properties:

    Crn string
    (String) The CRN of this resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    RouteId string
    (String) The unique route ID.
    State string
    (String) The state of the route.
    Crn string
    (String) The CRN of this resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    RouteId string
    (String) The unique route ID.
    State string
    (String) The state of the route.
    crn String
    (String) The CRN of this resource.
    id String
    The provider-assigned unique ID for this managed resource.
    routeId String
    (String) The unique route ID.
    state String
    (String) The state of the route.
    crn string
    (String) The CRN of this resource.
    id string
    The provider-assigned unique ID for this managed resource.
    routeId string
    (String) The unique route ID.
    state string
    (String) The state of the route.
    crn str
    (String) The CRN of this resource.
    id str
    The provider-assigned unique ID for this managed resource.
    route_id str
    (String) The unique route ID.
    state str
    (String) The state of the route.
    crn String
    (String) The CRN of this resource.
    id String
    The provider-assigned unique ID for this managed resource.
    routeId String
    (String) The unique route ID.
    state String
    (String) The state of the route.

    Look up Existing PiRoute Resource

    Get an existing PiRoute resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PiRouteState, opts?: CustomResourceOptions): PiRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            crn: Optional[str] = None,
            pi_action: Optional[str] = None,
            pi_advertise: Optional[str] = None,
            pi_cloud_instance_id: Optional[str] = None,
            pi_destination: Optional[str] = None,
            pi_destination_type: Optional[str] = None,
            pi_enabled: Optional[bool] = None,
            pi_name: Optional[str] = None,
            pi_next_hop: Optional[str] = None,
            pi_next_hop_type: Optional[str] = None,
            pi_route_id: Optional[str] = None,
            pi_user_tags: Optional[Sequence[str]] = None,
            route_id: Optional[str] = None,
            state: Optional[str] = None,
            timeouts: Optional[PiRouteTimeoutsArgs] = None) -> PiRoute
    func GetPiRoute(ctx *Context, name string, id IDInput, state *PiRouteState, opts ...ResourceOption) (*PiRoute, error)
    public static PiRoute Get(string name, Input<string> id, PiRouteState? state, CustomResourceOptions? opts = null)
    public static PiRoute get(String name, Output<String> id, PiRouteState state, CustomResourceOptions options)
    resources:  _:    type: ibm:PiRoute    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Crn string
    (String) The CRN of this resource.
    PiAction string
    Specifies action for route. Valid values are deliver. Default value is deliver.
    PiAdvertise string
    Indicates if the route is advertised. Default is enable.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiDestination string
    Destination of route.
    PiDestinationType string
    The destination type. valid values are ipv4-address. Default value is ipv4-address.
    PiEnabled bool
    Indicates if the route should be enabled in the fabric. Default value is false.
    PiName string
    Name of the route.
    PiNextHop string
    The next hop.
    PiNextHopType string
    The next hop type. Valid values are ipv4-address. Default value is ipv4-address.
    PiRouteId string
    PiUserTags List<string>
    The user tags attached to this resource.
    RouteId string
    (String) The unique route ID.
    State string
    (String) The state of the route.
    Timeouts PiRouteTimeouts
    Crn string
    (String) The CRN of this resource.
    PiAction string
    Specifies action for route. Valid values are deliver. Default value is deliver.
    PiAdvertise string
    Indicates if the route is advertised. Default is enable.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiDestination string
    Destination of route.
    PiDestinationType string
    The destination type. valid values are ipv4-address. Default value is ipv4-address.
    PiEnabled bool
    Indicates if the route should be enabled in the fabric. Default value is false.
    PiName string
    Name of the route.
    PiNextHop string
    The next hop.
    PiNextHopType string
    The next hop type. Valid values are ipv4-address. Default value is ipv4-address.
    PiRouteId string
    PiUserTags []string
    The user tags attached to this resource.
    RouteId string
    (String) The unique route ID.
    State string
    (String) The state of the route.
    Timeouts PiRouteTimeoutsArgs
    crn String
    (String) The CRN of this resource.
    piAction String
    Specifies action for route. Valid values are deliver. Default value is deliver.
    piAdvertise String
    Indicates if the route is advertised. Default is enable.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piDestination String
    Destination of route.
    piDestinationType String
    The destination type. valid values are ipv4-address. Default value is ipv4-address.
    piEnabled Boolean
    Indicates if the route should be enabled in the fabric. Default value is false.
    piName String
    Name of the route.
    piNextHop String
    The next hop.
    piNextHopType String
    The next hop type. Valid values are ipv4-address. Default value is ipv4-address.
    piRouteId String
    piUserTags List<String>
    The user tags attached to this resource.
    routeId String
    (String) The unique route ID.
    state String
    (String) The state of the route.
    timeouts PiRouteTimeouts
    crn string
    (String) The CRN of this resource.
    piAction string
    Specifies action for route. Valid values are deliver. Default value is deliver.
    piAdvertise string
    Indicates if the route is advertised. Default is enable.
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piDestination string
    Destination of route.
    piDestinationType string
    The destination type. valid values are ipv4-address. Default value is ipv4-address.
    piEnabled boolean
    Indicates if the route should be enabled in the fabric. Default value is false.
    piName string
    Name of the route.
    piNextHop string
    The next hop.
    piNextHopType string
    The next hop type. Valid values are ipv4-address. Default value is ipv4-address.
    piRouteId string
    piUserTags string[]
    The user tags attached to this resource.
    routeId string
    (String) The unique route ID.
    state string
    (String) The state of the route.
    timeouts PiRouteTimeouts
    crn str
    (String) The CRN of this resource.
    pi_action str
    Specifies action for route. Valid values are deliver. Default value is deliver.
    pi_advertise str
    Indicates if the route is advertised. Default is enable.
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_destination str
    Destination of route.
    pi_destination_type str
    The destination type. valid values are ipv4-address. Default value is ipv4-address.
    pi_enabled bool
    Indicates if the route should be enabled in the fabric. Default value is false.
    pi_name str
    Name of the route.
    pi_next_hop str
    The next hop.
    pi_next_hop_type str
    The next hop type. Valid values are ipv4-address. Default value is ipv4-address.
    pi_route_id str
    pi_user_tags Sequence[str]
    The user tags attached to this resource.
    route_id str
    (String) The unique route ID.
    state str
    (String) The state of the route.
    timeouts PiRouteTimeoutsArgs
    crn String
    (String) The CRN of this resource.
    piAction String
    Specifies action for route. Valid values are deliver. Default value is deliver.
    piAdvertise String
    Indicates if the route is advertised. Default is enable.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piDestination String
    Destination of route.
    piDestinationType String
    The destination type. valid values are ipv4-address. Default value is ipv4-address.
    piEnabled Boolean
    Indicates if the route should be enabled in the fabric. Default value is false.
    piName String
    Name of the route.
    piNextHop String
    The next hop.
    piNextHopType String
    The next hop type. Valid values are ipv4-address. Default value is ipv4-address.
    piRouteId String
    piUserTags List<String>
    The user tags attached to this resource.
    routeId String
    (String) The unique route ID.
    state String
    (String) The state of the route.
    timeouts Property Map

    Supporting Types

    PiRouteTimeouts, PiRouteTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Import

    Example

    bash

    $ pulumi import ibm:index/piRoute:PiRoute example d7bec597-4726-451f-8a63-e62e6f19c32c/b17a2b7f-77ab-491c-811e-495f8d4c8947
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.81.1 published on Wednesday, Aug 6, 2025 by ibm-cloud