Default Cni Network
API Version: 2022-12-12-preview.
Example Usage
Create or update default CNI network
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var defaultCniNetwork = new AzureNative.NetworkCloud.DefaultCniNetwork("defaultCniNetwork", new()
{
CniBgpConfiguration = new AzureNative.NetworkCloud.Inputs.CniBgpConfigurationArgs
{
BgpPeers = new[]
{
new AzureNative.NetworkCloud.Inputs.BgpPeerArgs
{
AsNumber = 64497,
PeerIp = "203.0.113.254",
},
},
CommunityAdvertisements = new[]
{
new AzureNative.NetworkCloud.Inputs.CommunityAdvertisementArgs
{
Communities = new[]
{
"64512:100",
},
SubnetPrefix = "192.0.2.0/27",
},
},
ServiceExternalPrefixes = new[]
{
"192.0.2.0/28",
},
ServiceLoadBalancerPrefixes = new[]
{
"192.0.2.16/28",
},
},
DefaultCniNetworkName = "defaultCniNetworkName",
ExtendedLocation = new AzureNative.NetworkCloud.Inputs.ExtendedLocationArgs
{
Name = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName",
Type = "CustomLocation",
},
IpAllocationType = "DualStack",
Ipv4ConnectedPrefix = "203.0.113.0/24",
Ipv6ConnectedPrefix = "2001:db8:0:3::/64",
L3IsolationDomainId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName",
Location = "location",
ResourceGroupName = "resourceGroupName",
Tags =
{
{ "key1", "myvalue1" },
{ "key2", "myvalue2" },
},
Vlan = 12,
});
});
package main
import (
networkcloud "github.com/pulumi/pulumi-azure-native-sdk/networkcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkcloud.NewDefaultCniNetwork(ctx, "defaultCniNetwork", &networkcloud.DefaultCniNetworkArgs{
CniBgpConfiguration: networkcloud.CniBgpConfigurationResponse{
BgpPeers: networkcloud.BgpPeerArray{
&networkcloud.BgpPeerArgs{
AsNumber: pulumi.Float64(64497),
PeerIp: pulumi.String("203.0.113.254"),
},
},
CommunityAdvertisements: networkcloud.CommunityAdvertisementArray{
&networkcloud.CommunityAdvertisementArgs{
Communities: pulumi.StringArray{
pulumi.String("64512:100"),
},
SubnetPrefix: pulumi.String("192.0.2.0/27"),
},
},
ServiceExternalPrefixes: pulumi.StringArray{
pulumi.String("192.0.2.0/28"),
},
ServiceLoadBalancerPrefixes: pulumi.StringArray{
pulumi.String("192.0.2.16/28"),
},
},
DefaultCniNetworkName: pulumi.String("defaultCniNetworkName"),
ExtendedLocation: &networkcloud.ExtendedLocationArgs{
Name: pulumi.String("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"),
Type: pulumi.String("CustomLocation"),
},
IpAllocationType: pulumi.String("DualStack"),
Ipv4ConnectedPrefix: pulumi.String("203.0.113.0/24"),
Ipv6ConnectedPrefix: pulumi.String("2001:db8:0:3::/64"),
L3IsolationDomainId: pulumi.String("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName"),
Location: pulumi.String("location"),
ResourceGroupName: pulumi.String("resourceGroupName"),
Tags: pulumi.StringMap{
"key1": pulumi.String("myvalue1"),
"key2": pulumi.String("myvalue2"),
},
Vlan: pulumi.Float64(12),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.networkcloud.DefaultCniNetwork;
import com.pulumi.azurenative.networkcloud.DefaultCniNetworkArgs;
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 defaultCniNetwork = new DefaultCniNetwork("defaultCniNetwork", DefaultCniNetworkArgs.builder()
.cniBgpConfiguration(Map.ofEntries(
Map.entry("bgpPeers", Map.ofEntries(
Map.entry("asNumber", 64497),
Map.entry("peerIp", "203.0.113.254")
)),
Map.entry("communityAdvertisements", Map.ofEntries(
Map.entry("communities", "64512:100"),
Map.entry("subnetPrefix", "192.0.2.0/27")
)),
Map.entry("serviceExternalPrefixes", "192.0.2.0/28"),
Map.entry("serviceLoadBalancerPrefixes", "192.0.2.16/28")
))
.defaultCniNetworkName("defaultCniNetworkName")
.extendedLocation(Map.ofEntries(
Map.entry("name", "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"),
Map.entry("type", "CustomLocation")
))
.ipAllocationType("DualStack")
.ipv4ConnectedPrefix("203.0.113.0/24")
.ipv6ConnectedPrefix("2001:db8:0:3::/64")
.l3IsolationDomainId("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName")
.location("location")
.resourceGroupName("resourceGroupName")
.tags(Map.ofEntries(
Map.entry("key1", "myvalue1"),
Map.entry("key2", "myvalue2")
))
.vlan(12)
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:networkcloud:DefaultCniNetwork defaultcniNetworkName /subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/defaultcniNetworks/defaultcniNetworkName
Properties
The autonomous system number that the fabric expects to peer with, derived from the associated L3 isolation domain.
The Calico BGP configuration.
The more detailed status of the default CNI network.
The descriptive message about the current detailed status.
The extended location of the cluster associated with the resource.
The L3 isolation fabric BGP peering connectivity information necessary for BGP peering the Hybrid AKS Cluster with the switch fabric.
The list of Hybrid AKS cluster resource ID(s) that are associated with this default CNI network.
The name of the interface that will be present in the virtual machine to represent this network.
The type of the IP address allocation.
The IPV4 prefix (CIDR) assigned to this default CNI network. It is required when the IP allocation type is IPV4 or DualStack.
The IPV6 prefix (CIDR) assigned to this default CNI network. It is required when the IP allocation type is IPV6 or DualStack.
The resource ID of the Network Fabric l3IsolationDomain.
The provisioning state of the default CNI network.
Azure Resource Manager metadata containing createdBy and modifiedBy information.