ibm.PiRoute
Explore with Pulumi AI
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:
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Destination string - Destination of route.
- Pi
Name string - Name of the route.
- Pi
Next stringHop - The next hop.
- Pi
Action string - Specifies action for route. Valid values are
deliver
. Default value isdeliver
. - Pi
Advertise string - Indicates if the route is advertised. Default is
enable
. - Pi
Destination stringType - The destination type. valid values are
ipv4-address
. Default value isipv4-address
. - Pi
Enabled bool - Indicates if the route should be enabled in the fabric. Default value is
false
. - Pi
Next stringHop Type - The next hop type. Valid values are
ipv4-address
. Default value isipv4-address
. - Pi
Route stringId - List<string>
- The user tags attached to this resource.
- Timeouts
Pi
Route Timeouts
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Destination string - Destination of route.
- Pi
Name string - Name of the route.
- Pi
Next stringHop - The next hop.
- Pi
Action string - Specifies action for route. Valid values are
deliver
. Default value isdeliver
. - Pi
Advertise string - Indicates if the route is advertised. Default is
enable
. - Pi
Destination stringType - The destination type. valid values are
ipv4-address
. Default value isipv4-address
. - Pi
Enabled bool - Indicates if the route should be enabled in the fabric. Default value is
false
. - Pi
Next stringHop Type - The next hop type. Valid values are
ipv4-address
. Default value isipv4-address
. - Pi
Route stringId - []string
- The user tags attached to this resource.
- Timeouts
Pi
Route Timeouts Args
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Destination String - Destination of route.
- pi
Name String - Name of the route.
- pi
Next StringHop - The next hop.
- pi
Action String - Specifies action for route. Valid values are
deliver
. Default value isdeliver
. - pi
Advertise String - Indicates if the route is advertised. Default is
enable
. - pi
Destination StringType - The destination type. valid values are
ipv4-address
. Default value isipv4-address
. - pi
Enabled Boolean - Indicates if the route should be enabled in the fabric. Default value is
false
. - pi
Next StringHop Type - The next hop type. Valid values are
ipv4-address
. Default value isipv4-address
. - pi
Route StringId - List<String>
- The user tags attached to this resource.
- timeouts
Pi
Route Timeouts
- pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- pi
Destination string - Destination of route.
- pi
Name string - Name of the route.
- pi
Next stringHop - The next hop.
- pi
Action string - Specifies action for route. Valid values are
deliver
. Default value isdeliver
. - pi
Advertise string - Indicates if the route is advertised. Default is
enable
. - pi
Destination stringType - The destination type. valid values are
ipv4-address
. Default value isipv4-address
. - pi
Enabled boolean - Indicates if the route should be enabled in the fabric. Default value is
false
. - pi
Next stringHop Type - The next hop type. Valid values are
ipv4-address
. Default value isipv4-address
. - pi
Route stringId - string[]
- The user tags attached to this resource.
- timeouts
Pi
Route Timeouts
- pi_
cloud_ strinstance_ id - 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_ strhop - The next hop.
- pi_
action str - Specifies action for route. Valid values are
deliver
. Default value isdeliver
. - pi_
advertise str - Indicates if the route is advertised. Default is
enable
. - pi_
destination_ strtype - The destination type. valid values are
ipv4-address
. Default value isipv4-address
. - pi_
enabled bool - Indicates if the route should be enabled in the fabric. Default value is
false
. - pi_
next_ strhop_ type - The next hop type. Valid values are
ipv4-address
. Default value isipv4-address
. - pi_
route_ strid - Sequence[str]
- The user tags attached to this resource.
- timeouts
Pi
Route Timeouts Args
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Destination String - Destination of route.
- pi
Name String - Name of the route.
- pi
Next StringHop - The next hop.
- pi
Action String - Specifies action for route. Valid values are
deliver
. Default value isdeliver
. - pi
Advertise String - Indicates if the route is advertised. Default is
enable
. - pi
Destination StringType - The destination type. valid values are
ipv4-address
. Default value isipv4-address
. - pi
Enabled Boolean - Indicates if the route should be enabled in the fabric. Default value is
false
. - pi
Next StringHop Type - The next hop type. Valid values are
ipv4-address
. Default value isipv4-address
. - pi
Route StringId - 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:
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.
- Crn string
- (String) The CRN of this resource.
- Pi
Action string - Specifies action for route. Valid values are
deliver
. Default value isdeliver
. - Pi
Advertise string - Indicates if the route is advertised. Default is
enable
. - Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Destination string - Destination of route.
- Pi
Destination stringType - The destination type. valid values are
ipv4-address
. Default value isipv4-address
. - Pi
Enabled bool - Indicates if the route should be enabled in the fabric. Default value is
false
. - Pi
Name string - Name of the route.
- Pi
Next stringHop - The next hop.
- Pi
Next stringHop Type - The next hop type. Valid values are
ipv4-address
. Default value isipv4-address
. - Pi
Route stringId - List<string>
- The user tags attached to this resource.
- Route
Id string - (String) The unique route ID.
- State string
- (String) The state of the route.
- Timeouts
Pi
Route Timeouts
- Crn string
- (String) The CRN of this resource.
- Pi
Action string - Specifies action for route. Valid values are
deliver
. Default value isdeliver
. - Pi
Advertise string - Indicates if the route is advertised. Default is
enable
. - Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Destination string - Destination of route.
- Pi
Destination stringType - The destination type. valid values are
ipv4-address
. Default value isipv4-address
. - Pi
Enabled bool - Indicates if the route should be enabled in the fabric. Default value is
false
. - Pi
Name string - Name of the route.
- Pi
Next stringHop - The next hop.
- Pi
Next stringHop Type - The next hop type. Valid values are
ipv4-address
. Default value isipv4-address
. - Pi
Route stringId - []string
- The user tags attached to this resource.
- Route
Id string - (String) The unique route ID.
- State string
- (String) The state of the route.
- Timeouts
Pi
Route Timeouts Args
- crn String
- (String) The CRN of this resource.
- pi
Action String - Specifies action for route. Valid values are
deliver
. Default value isdeliver
. - pi
Advertise String - Indicates if the route is advertised. Default is
enable
. - pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Destination String - Destination of route.
- pi
Destination StringType - The destination type. valid values are
ipv4-address
. Default value isipv4-address
. - pi
Enabled Boolean - Indicates if the route should be enabled in the fabric. Default value is
false
. - pi
Name String - Name of the route.
- pi
Next StringHop - The next hop.
- pi
Next StringHop Type - The next hop type. Valid values are
ipv4-address
. Default value isipv4-address
. - pi
Route StringId - List<String>
- The user tags attached to this resource.
- route
Id String - (String) The unique route ID.
- state String
- (String) The state of the route.
- timeouts
Pi
Route Timeouts
- crn string
- (String) The CRN of this resource.
- pi
Action string - Specifies action for route. Valid values are
deliver
. Default value isdeliver
. - pi
Advertise string - Indicates if the route is advertised. Default is
enable
. - pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- pi
Destination string - Destination of route.
- pi
Destination stringType - The destination type. valid values are
ipv4-address
. Default value isipv4-address
. - pi
Enabled boolean - Indicates if the route should be enabled in the fabric. Default value is
false
. - pi
Name string - Name of the route.
- pi
Next stringHop - The next hop.
- pi
Next stringHop Type - The next hop type. Valid values are
ipv4-address
. Default value isipv4-address
. - pi
Route stringId - string[]
- The user tags attached to this resource.
- route
Id string - (String) The unique route ID.
- state string
- (String) The state of the route.
- timeouts
Pi
Route Timeouts
- crn str
- (String) The CRN of this resource.
- pi_
action str - Specifies action for route. Valid values are
deliver
. Default value isdeliver
. - pi_
advertise str - Indicates if the route is advertised. Default is
enable
. - pi_
cloud_ strinstance_ id - The GUID of the service instance associated with an account.
- pi_
destination str - Destination of route.
- pi_
destination_ strtype - The destination type. valid values are
ipv4-address
. Default value isipv4-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_ strhop - The next hop.
- pi_
next_ strhop_ type - The next hop type. Valid values are
ipv4-address
. Default value isipv4-address
. - pi_
route_ strid - 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
Pi
Route Timeouts Args
- crn String
- (String) The CRN of this resource.
- pi
Action String - Specifies action for route. Valid values are
deliver
. Default value isdeliver
. - pi
Advertise String - Indicates if the route is advertised. Default is
enable
. - pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Destination String - Destination of route.
- pi
Destination StringType - The destination type. valid values are
ipv4-address
. Default value isipv4-address
. - pi
Enabled Boolean - Indicates if the route should be enabled in the fabric. Default value is
false
. - pi
Name String - Name of the route.
- pi
Next StringHop - The next hop.
- pi
Next StringHop Type - The next hop type. Valid values are
ipv4-address
. Default value isipv4-address
. - pi
Route StringId - List<String>
- The user tags attached to this resource.
- route
Id String - (String) The unique route ID.
- state String
- (String) The state of the route.
- timeouts Property Map
Supporting Types
PiRouteTimeouts, PiRouteTimeoutsArgs
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.