We recommend using Azure Native.
azure.network.RoutingIntent
Explore with Pulumi AI
Manages a Virtual Hub Routing Intent.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleVirtualWan = new azure.network.VirtualWan("example", {
name: "example-vwan",
resourceGroupName: example.name,
location: example.location,
});
const exampleVirtualHub = new azure.network.VirtualHub("example", {
name: "example-vhub",
resourceGroupName: example.name,
location: example.location,
virtualWanId: exampleVirtualWan.id,
addressPrefix: "10.0.1.0/24",
});
const exampleFirewall = new azure.network.Firewall("example", {
name: "example-fw",
location: example.location,
resourceGroupName: example.name,
skuName: "AZFW_Hub",
skuTier: "Standard",
virtualHub: {
virtualHubId: exampleVirtualHub.id,
publicIpCount: 1,
},
});
const exampleRoutingIntent = new azure.network.RoutingIntent("example", {
name: "example-routingintent",
virtualHubId: exampleVirtualHub.id,
routingPolicies: [{
name: "InternetTrafficPolicy",
destinations: ["Internet"],
nextHop: exampleFirewall.id,
}],
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_virtual_wan = azure.network.VirtualWan("example",
name="example-vwan",
resource_group_name=example.name,
location=example.location)
example_virtual_hub = azure.network.VirtualHub("example",
name="example-vhub",
resource_group_name=example.name,
location=example.location,
virtual_wan_id=example_virtual_wan.id,
address_prefix="10.0.1.0/24")
example_firewall = azure.network.Firewall("example",
name="example-fw",
location=example.location,
resource_group_name=example.name,
sku_name="AZFW_Hub",
sku_tier="Standard",
virtual_hub=azure.network.FirewallVirtualHubArgs(
virtual_hub_id=example_virtual_hub.id,
public_ip_count=1,
))
example_routing_intent = azure.network.RoutingIntent("example",
name="example-routingintent",
virtual_hub_id=example_virtual_hub.id,
routing_policies=[azure.network.RoutingIntentRoutingPolicyArgs(
name="InternetTrafficPolicy",
destinations=["Internet"],
next_hop=example_firewall.id,
)])
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{
Name: pulumi.String("example-vwan"),
ResourceGroupName: example.Name,
Location: example.Location,
})
if err != nil {
return err
}
exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{
Name: pulumi.String("example-vhub"),
ResourceGroupName: example.Name,
Location: example.Location,
VirtualWanId: exampleVirtualWan.ID(),
AddressPrefix: pulumi.String("10.0.1.0/24"),
})
if err != nil {
return err
}
exampleFirewall, err := network.NewFirewall(ctx, "example", &network.FirewallArgs{
Name: pulumi.String("example-fw"),
Location: example.Location,
ResourceGroupName: example.Name,
SkuName: pulumi.String("AZFW_Hub"),
SkuTier: pulumi.String("Standard"),
VirtualHub: &network.FirewallVirtualHubArgs{
VirtualHubId: exampleVirtualHub.ID(),
PublicIpCount: pulumi.Int(1),
},
})
if err != nil {
return err
}
_, err = network.NewRoutingIntent(ctx, "example", &network.RoutingIntentArgs{
Name: pulumi.String("example-routingintent"),
VirtualHubId: exampleVirtualHub.ID(),
RoutingPolicies: network.RoutingIntentRoutingPolicyArray{
&network.RoutingIntentRoutingPolicyArgs{
Name: pulumi.String("InternetTrafficPolicy"),
Destinations: pulumi.StringArray{
pulumi.String("Internet"),
},
NextHop: exampleFirewall.ID(),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleVirtualWan = new Azure.Network.VirtualWan("example", new()
{
Name = "example-vwan",
ResourceGroupName = example.Name,
Location = example.Location,
});
var exampleVirtualHub = new Azure.Network.VirtualHub("example", new()
{
Name = "example-vhub",
ResourceGroupName = example.Name,
Location = example.Location,
VirtualWanId = exampleVirtualWan.Id,
AddressPrefix = "10.0.1.0/24",
});
var exampleFirewall = new Azure.Network.Firewall("example", new()
{
Name = "example-fw",
Location = example.Location,
ResourceGroupName = example.Name,
SkuName = "AZFW_Hub",
SkuTier = "Standard",
VirtualHub = new Azure.Network.Inputs.FirewallVirtualHubArgs
{
VirtualHubId = exampleVirtualHub.Id,
PublicIpCount = 1,
},
});
var exampleRoutingIntent = new Azure.Network.RoutingIntent("example", new()
{
Name = "example-routingintent",
VirtualHubId = exampleVirtualHub.Id,
RoutingPolicies = new[]
{
new Azure.Network.Inputs.RoutingIntentRoutingPolicyArgs
{
Name = "InternetTrafficPolicy",
Destinations = new[]
{
"Internet",
},
NextHop = exampleFirewall.Id,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.VirtualWan;
import com.pulumi.azure.network.VirtualWanArgs;
import com.pulumi.azure.network.VirtualHub;
import com.pulumi.azure.network.VirtualHubArgs;
import com.pulumi.azure.network.Firewall;
import com.pulumi.azure.network.FirewallArgs;
import com.pulumi.azure.network.inputs.FirewallVirtualHubArgs;
import com.pulumi.azure.network.RoutingIntent;
import com.pulumi.azure.network.RoutingIntentArgs;
import com.pulumi.azure.network.inputs.RoutingIntentRoutingPolicyArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleVirtualWan = new VirtualWan("exampleVirtualWan", VirtualWanArgs.builder()
.name("example-vwan")
.resourceGroupName(example.name())
.location(example.location())
.build());
var exampleVirtualHub = new VirtualHub("exampleVirtualHub", VirtualHubArgs.builder()
.name("example-vhub")
.resourceGroupName(example.name())
.location(example.location())
.virtualWanId(exampleVirtualWan.id())
.addressPrefix("10.0.1.0/24")
.build());
var exampleFirewall = new Firewall("exampleFirewall", FirewallArgs.builder()
.name("example-fw")
.location(example.location())
.resourceGroupName(example.name())
.skuName("AZFW_Hub")
.skuTier("Standard")
.virtualHub(FirewallVirtualHubArgs.builder()
.virtualHubId(exampleVirtualHub.id())
.publicIpCount(1)
.build())
.build());
var exampleRoutingIntent = new RoutingIntent("exampleRoutingIntent", RoutingIntentArgs.builder()
.name("example-routingintent")
.virtualHubId(exampleVirtualHub.id())
.routingPolicies(RoutingIntentRoutingPolicyArgs.builder()
.name("InternetTrafficPolicy")
.destinations("Internet")
.nextHop(exampleFirewall.id())
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleVirtualWan:
type: azure:network:VirtualWan
name: example
properties:
name: example-vwan
resourceGroupName: ${example.name}
location: ${example.location}
exampleVirtualHub:
type: azure:network:VirtualHub
name: example
properties:
name: example-vhub
resourceGroupName: ${example.name}
location: ${example.location}
virtualWanId: ${exampleVirtualWan.id}
addressPrefix: 10.0.1.0/24
exampleFirewall:
type: azure:network:Firewall
name: example
properties:
name: example-fw
location: ${example.location}
resourceGroupName: ${example.name}
skuName: AZFW_Hub
skuTier: Standard
virtualHub:
virtualHubId: ${exampleVirtualHub.id}
publicIpCount: 1
exampleRoutingIntent:
type: azure:network:RoutingIntent
name: example
properties:
name: example-routingintent
virtualHubId: ${exampleVirtualHub.id}
routingPolicies:
- name: InternetTrafficPolicy
destinations:
- Internet
nextHop: ${exampleFirewall.id}
Create RoutingIntent Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RoutingIntent(name: string, args: RoutingIntentArgs, opts?: CustomResourceOptions);
@overload
def RoutingIntent(resource_name: str,
args: RoutingIntentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RoutingIntent(resource_name: str,
opts: Optional[ResourceOptions] = None,
routing_policies: Optional[Sequence[RoutingIntentRoutingPolicyArgs]] = None,
virtual_hub_id: Optional[str] = None,
name: Optional[str] = None)
func NewRoutingIntent(ctx *Context, name string, args RoutingIntentArgs, opts ...ResourceOption) (*RoutingIntent, error)
public RoutingIntent(string name, RoutingIntentArgs args, CustomResourceOptions? opts = null)
public RoutingIntent(String name, RoutingIntentArgs args)
public RoutingIntent(String name, RoutingIntentArgs args, CustomResourceOptions options)
type: azure:network:RoutingIntent
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 RoutingIntentArgs
- 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 RoutingIntentArgs
- 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 RoutingIntentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoutingIntentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RoutingIntentArgs
- 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 routingIntentResource = new Azure.Network.RoutingIntent("routingIntentResource", new()
{
RoutingPolicies = new[]
{
new Azure.Network.Inputs.RoutingIntentRoutingPolicyArgs
{
Destinations = new[]
{
"string",
},
Name = "string",
NextHop = "string",
},
},
VirtualHubId = "string",
Name = "string",
});
example, err := network.NewRoutingIntent(ctx, "routingIntentResource", &network.RoutingIntentArgs{
RoutingPolicies: network.RoutingIntentRoutingPolicyArray{
&network.RoutingIntentRoutingPolicyArgs{
Destinations: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
NextHop: pulumi.String("string"),
},
},
VirtualHubId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var routingIntentResource = new RoutingIntent("routingIntentResource", RoutingIntentArgs.builder()
.routingPolicies(RoutingIntentRoutingPolicyArgs.builder()
.destinations("string")
.name("string")
.nextHop("string")
.build())
.virtualHubId("string")
.name("string")
.build());
routing_intent_resource = azure.network.RoutingIntent("routingIntentResource",
routing_policies=[azure.network.RoutingIntentRoutingPolicyArgs(
destinations=["string"],
name="string",
next_hop="string",
)],
virtual_hub_id="string",
name="string")
const routingIntentResource = new azure.network.RoutingIntent("routingIntentResource", {
routingPolicies: [{
destinations: ["string"],
name: "string",
nextHop: "string",
}],
virtualHubId: "string",
name: "string",
});
type: azure:network:RoutingIntent
properties:
name: string
routingPolicies:
- destinations:
- string
name: string
nextHop: string
virtualHubId: string
RoutingIntent Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The RoutingIntent resource accepts the following input properties:
- Routing
Policies List<RoutingIntent Routing Policy> - One or more
routing_policy
blocks as defined below. - Virtual
Hub stringId - The resource ID of the Virtual Hub. Changing this forces a new resource to be created.
- Name string
- The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created.
- Routing
Policies []RoutingIntent Routing Policy Args - One or more
routing_policy
blocks as defined below. - Virtual
Hub stringId - The resource ID of the Virtual Hub. Changing this forces a new resource to be created.
- Name string
- The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created.
- routing
Policies List<RoutingIntent Routing Policy> - One or more
routing_policy
blocks as defined below. - virtual
Hub StringId - The resource ID of the Virtual Hub. Changing this forces a new resource to be created.
- name String
- The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created.
- routing
Policies RoutingIntent Routing Policy[] - One or more
routing_policy
blocks as defined below. - virtual
Hub stringId - The resource ID of the Virtual Hub. Changing this forces a new resource to be created.
- name string
- The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created.
- routing_
policies Sequence[RoutingIntent Routing Policy Args] - One or more
routing_policy
blocks as defined below. - virtual_
hub_ strid - The resource ID of the Virtual Hub. Changing this forces a new resource to be created.
- name str
- The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created.
- routing
Policies List<Property Map> - One or more
routing_policy
blocks as defined below. - virtual
Hub StringId - The resource ID of the Virtual Hub. Changing this forces a new resource to be created.
- name String
- The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the RoutingIntent resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing RoutingIntent Resource
Get an existing RoutingIntent 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?: RoutingIntentState, opts?: CustomResourceOptions): RoutingIntent
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
routing_policies: Optional[Sequence[RoutingIntentRoutingPolicyArgs]] = None,
virtual_hub_id: Optional[str] = None) -> RoutingIntent
func GetRoutingIntent(ctx *Context, name string, id IDInput, state *RoutingIntentState, opts ...ResourceOption) (*RoutingIntent, error)
public static RoutingIntent Get(string name, Input<string> id, RoutingIntentState? state, CustomResourceOptions? opts = null)
public static RoutingIntent get(String name, Output<String> id, RoutingIntentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Name string
- The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created.
- Routing
Policies List<RoutingIntent Routing Policy> - One or more
routing_policy
blocks as defined below. - Virtual
Hub stringId - The resource ID of the Virtual Hub. Changing this forces a new resource to be created.
- Name string
- The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created.
- Routing
Policies []RoutingIntent Routing Policy Args - One or more
routing_policy
blocks as defined below. - Virtual
Hub stringId - The resource ID of the Virtual Hub. Changing this forces a new resource to be created.
- name String
- The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created.
- routing
Policies List<RoutingIntent Routing Policy> - One or more
routing_policy
blocks as defined below. - virtual
Hub StringId - The resource ID of the Virtual Hub. Changing this forces a new resource to be created.
- name string
- The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created.
- routing
Policies RoutingIntent Routing Policy[] - One or more
routing_policy
blocks as defined below. - virtual
Hub stringId - The resource ID of the Virtual Hub. Changing this forces a new resource to be created.
- name str
- The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created.
- routing_
policies Sequence[RoutingIntent Routing Policy Args] - One or more
routing_policy
blocks as defined below. - virtual_
hub_ strid - The resource ID of the Virtual Hub. Changing this forces a new resource to be created.
- name String
- The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created.
- routing
Policies List<Property Map> - One or more
routing_policy
blocks as defined below. - virtual
Hub StringId - The resource ID of the Virtual Hub. Changing this forces a new resource to be created.
Supporting Types
RoutingIntentRoutingPolicy, RoutingIntentRoutingPolicyArgs
- Destinations List<string>
- A list of destinations which this routing policy is applicable to. Possible values are
Internet
andPrivateTraffic
. - Name string
- The unique name for the routing policy.
- Next
Hop string - The resource ID of the next hop on which this routing policy is applicable to.
- Destinations []string
- A list of destinations which this routing policy is applicable to. Possible values are
Internet
andPrivateTraffic
. - Name string
- The unique name for the routing policy.
- Next
Hop string - The resource ID of the next hop on which this routing policy is applicable to.
- destinations List<String>
- A list of destinations which this routing policy is applicable to. Possible values are
Internet
andPrivateTraffic
. - name String
- The unique name for the routing policy.
- next
Hop String - The resource ID of the next hop on which this routing policy is applicable to.
- destinations string[]
- A list of destinations which this routing policy is applicable to. Possible values are
Internet
andPrivateTraffic
. - name string
- The unique name for the routing policy.
- next
Hop string - The resource ID of the next hop on which this routing policy is applicable to.
- destinations Sequence[str]
- A list of destinations which this routing policy is applicable to. Possible values are
Internet
andPrivateTraffic
. - name str
- The unique name for the routing policy.
- next_
hop str - The resource ID of the next hop on which this routing policy is applicable to.
- destinations List<String>
- A list of destinations which this routing policy is applicable to. Possible values are
Internet
andPrivateTraffic
. - name String
- The unique name for the routing policy.
- next
Hop String - The resource ID of the next hop on which this routing policy is applicable to.
Import
Virtual Hub Routing Intents can be imported using the resource id
, e.g.
$ pulumi import azure:network/routingIntent:RoutingIntent example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/virtualHubs/virtualHub1/routingIntent/routingIntent1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.