Managed Cluster
The managed cluster resource Azure REST API version: 2023-03-01-preview. Prior API version in Azure Native 1.x: 2020-01-01-preview. Other available API versions: 2020-01-01-preview, 2022-01-01, 2022-10-01-preview, 2023-07-01-preview, 2023-09-01-preview.
Example Usage
Put a cluster with maximum parameters
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ServiceFabric.ManagedCluster("managedCluster", new()
{
AddonFeatures = new[]
{
"DnsService",
"BackupRestoreService",
"ResourceMonitorService",
},
AdminPassword = "{vm-password}",
AdminUserName = "vmadmin",
AllowRdpAccess = true,
ApplicationTypeVersionsCleanupPolicy = new AzureNative.ServiceFabric.Inputs.ApplicationTypeVersionsCleanupPolicyArgs
{
MaxUnusedVersionsToKeep = 3,
},
AuxiliarySubnets = new[]
{
new AzureNative.ServiceFabric.Inputs.SubnetArgs
{
EnableIpv6 = true,
Name = "testSubnet1",
NetworkSecurityGroupId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1",
PrivateEndpointNetworkPolicies = "enabled",
PrivateLinkServiceNetworkPolicies = "enabled",
},
},
ClientConnectionPort = 19000,
ClusterCodeVersion = "7.1.168.9494",
ClusterName = "myCluster",
ClusterUpgradeMode = "Manual",
DnsName = "myCluster",
EnableAutoOSUpgrade = true,
EnableIpv6 = true,
FabricSettings = new[]
{
new AzureNative.ServiceFabric.Inputs.SettingsSectionDescriptionArgs
{
Name = "ManagedIdentityTokenService",
Parameters = new[]
{
new AzureNative.ServiceFabric.Inputs.SettingsParameterDescriptionArgs
{
Name = "IsEnabled",
Value = "true",
},
},
},
},
HttpGatewayConnectionPort = 19080,
IpTags = new[]
{
new AzureNative.ServiceFabric.Inputs.IPTagArgs
{
IpTagType = "FirstPartyUsage",
Tag = "SQL",
},
},
LoadBalancingRules = new[]
{
new AzureNative.ServiceFabric.Inputs.LoadBalancingRuleArgs
{
BackendPort = 80,
FrontendPort = 80,
ProbePort = 80,
ProbeProtocol = "http",
Protocol = "http",
},
new AzureNative.ServiceFabric.Inputs.LoadBalancingRuleArgs
{
BackendPort = 443,
FrontendPort = 443,
ProbePort = 443,
ProbeProtocol = "http",
Protocol = "http",
},
new AzureNative.ServiceFabric.Inputs.LoadBalancingRuleArgs
{
BackendPort = 10000,
FrontendPort = 10000,
LoadDistribution = "Default",
ProbePort = 10000,
ProbeProtocol = "http",
Protocol = "tcp",
},
},
Location = "eastus",
NetworkSecurityRules = new[]
{
new AzureNative.ServiceFabric.Inputs.NetworkSecurityRuleArgs
{
Access = "allow",
Description = "Test description",
DestinationAddressPrefixes = new[]
{
"*",
},
DestinationPortRanges = new[]
{
"*",
},
Direction = "inbound",
Name = "TestName",
Priority = 1010,
Protocol = "tcp",
SourceAddressPrefixes = new[]
{
"*",
},
SourcePortRanges = new[]
{
"*",
},
},
new AzureNative.ServiceFabric.Inputs.NetworkSecurityRuleArgs
{
Access = "allow",
DestinationAddressPrefix = "*",
DestinationPortRange = "33500-33699",
Direction = "inbound",
Name = "AllowARM",
Priority = 2002,
Protocol = "*",
SourceAddressPrefix = "AzureResourceManager",
SourcePortRange = "*",
},
},
PublicIPPrefixId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix",
ResourceGroupName = "resRg",
ServiceEndpoints = new[]
{
new AzureNative.ServiceFabric.Inputs.ServiceEndpointArgs
{
Locations = new[]
{
"eastus2",
"usnorth",
},
Service = "Microsoft.Storage",
},
},
Sku = new AzureNative.ServiceFabric.Inputs.SkuArgs
{
Name = "Basic",
},
Tags = null,
UseCustomVnet = true,
ZonalResiliency = true,
ZonalUpdateMode = "Fast",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/servicefabric/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := servicefabric.NewManagedCluster(ctx, "managedCluster", &servicefabric.ManagedClusterArgs{
AddonFeatures: pulumi.StringArray{
pulumi.String("DnsService"),
pulumi.String("BackupRestoreService"),
pulumi.String("ResourceMonitorService"),
},
AdminPassword: pulumi.String("{vm-password}"),
AdminUserName: pulumi.String("vmadmin"),
AllowRdpAccess: pulumi.Bool(true),
ApplicationTypeVersionsCleanupPolicy: &servicefabric.ApplicationTypeVersionsCleanupPolicyArgs{
MaxUnusedVersionsToKeep: pulumi.Int(3),
},
AuxiliarySubnets: []servicefabric.SubnetArgs{
{
EnableIpv6: pulumi.Bool(true),
Name: pulumi.String("testSubnet1"),
NetworkSecurityGroupId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1"),
PrivateEndpointNetworkPolicies: pulumi.String("enabled"),
PrivateLinkServiceNetworkPolicies: pulumi.String("enabled"),
},
},
ClientConnectionPort: pulumi.Int(19000),
ClusterCodeVersion: pulumi.String("7.1.168.9494"),
ClusterName: pulumi.String("myCluster"),
ClusterUpgradeMode: pulumi.String("Manual"),
DnsName: pulumi.String("myCluster"),
EnableAutoOSUpgrade: pulumi.Bool(true),
EnableIpv6: pulumi.Bool(true),
FabricSettings: []servicefabric.SettingsSectionDescriptionArgs{
{
Name: pulumi.String("ManagedIdentityTokenService"),
Parameters: servicefabric.SettingsParameterDescriptionArray{
{
Name: pulumi.String("IsEnabled"),
Value: pulumi.String("true"),
},
},
},
},
HttpGatewayConnectionPort: pulumi.Int(19080),
IpTags: []servicefabric.IPTagArgs{
{
IpTagType: pulumi.String("FirstPartyUsage"),
Tag: pulumi.String("SQL"),
},
},
LoadBalancingRules: []servicefabric.LoadBalancingRuleArgs{
{
BackendPort: pulumi.Int(80),
FrontendPort: pulumi.Int(80),
ProbePort: pulumi.Int(80),
ProbeProtocol: pulumi.String("http"),
Protocol: pulumi.String("http"),
},
{
BackendPort: pulumi.Int(443),
FrontendPort: pulumi.Int(443),
ProbePort: pulumi.Int(443),
ProbeProtocol: pulumi.String("http"),
Protocol: pulumi.String("http"),
},
{
BackendPort: pulumi.Int(10000),
FrontendPort: pulumi.Int(10000),
LoadDistribution: pulumi.String("Default"),
ProbePort: pulumi.Int(10000),
ProbeProtocol: pulumi.String("http"),
Protocol: pulumi.String("tcp"),
},
},
Location: pulumi.String("eastus"),
NetworkSecurityRules: []servicefabric.NetworkSecurityRuleArgs{
{
Access: pulumi.String("allow"),
Description: pulumi.String("Test description"),
DestinationAddressPrefixes: pulumi.StringArray{
pulumi.String("*"),
},
DestinationPortRanges: pulumi.StringArray{
pulumi.String("*"),
},
Direction: pulumi.String("inbound"),
Name: pulumi.String("TestName"),
Priority: pulumi.Int(1010),
Protocol: pulumi.String("tcp"),
SourceAddressPrefixes: pulumi.StringArray{
pulumi.String("*"),
},
SourcePortRanges: pulumi.StringArray{
pulumi.String("*"),
},
},
{
Access: pulumi.String("allow"),
DestinationAddressPrefix: pulumi.String("*"),
DestinationPortRange: pulumi.String("33500-33699"),
Direction: pulumi.String("inbound"),
Name: pulumi.String("AllowARM"),
Priority: pulumi.Int(2002),
Protocol: pulumi.String("*"),
SourceAddressPrefix: pulumi.String("AzureResourceManager"),
SourcePortRange: pulumi.String("*"),
},
},
PublicIPPrefixId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix"),
ResourceGroupName: pulumi.String("resRg"),
ServiceEndpoints: []servicefabric.ServiceEndpointArgs{
{
Locations: pulumi.StringArray{
pulumi.String("eastus2"),
pulumi.String("usnorth"),
},
Service: pulumi.String("Microsoft.Storage"),
},
},
Sku: &servicefabric.SkuArgs{
Name: pulumi.String("Basic"),
},
Tags: nil,
UseCustomVnet: pulumi.Bool(true),
ZonalResiliency: pulumi.Bool(true),
ZonalUpdateMode: pulumi.String("Fast"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.servicefabric.ManagedCluster;
import com.pulumi.azurenative.servicefabric.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.addonFeatures(
"DnsService",
"BackupRestoreService",
"ResourceMonitorService")
.adminPassword("{vm-password}")
.adminUserName("vmadmin")
.allowRdpAccess(true)
.applicationTypeVersionsCleanupPolicy(Map.of("maxUnusedVersionsToKeep", 3))
.auxiliarySubnets(Map.ofEntries(
Map.entry("enableIpv6", true),
Map.entry("name", "testSubnet1"),
Map.entry("networkSecurityGroupId", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1"),
Map.entry("privateEndpointNetworkPolicies", "enabled"),
Map.entry("privateLinkServiceNetworkPolicies", "enabled")
))
.clientConnectionPort(19000)
.clusterCodeVersion("7.1.168.9494")
.clusterName("myCluster")
.clusterUpgradeMode("Manual")
.dnsName("myCluster")
.enableAutoOSUpgrade(true)
.enableIpv6(true)
.fabricSettings(Map.ofEntries(
Map.entry("name", "ManagedIdentityTokenService"),
Map.entry("parameters", Map.ofEntries(
Map.entry("name", "IsEnabled"),
Map.entry("value", "true")
))
))
.httpGatewayConnectionPort(19080)
.ipTags(Map.ofEntries(
Map.entry("ipTagType", "FirstPartyUsage"),
Map.entry("tag", "SQL")
))
.loadBalancingRules(
Map.ofEntries(
Map.entry("backendPort", 80),
Map.entry("frontendPort", 80),
Map.entry("probePort", 80),
Map.entry("probeProtocol", "http"),
Map.entry("protocol", "http")
),
Map.ofEntries(
Map.entry("backendPort", 443),
Map.entry("frontendPort", 443),
Map.entry("probePort", 443),
Map.entry("probeProtocol", "http"),
Map.entry("protocol", "http")
),
Map.ofEntries(
Map.entry("backendPort", 10000),
Map.entry("frontendPort", 10000),
Map.entry("loadDistribution", "Default"),
Map.entry("probePort", 10000),
Map.entry("probeProtocol", "http"),
Map.entry("protocol", "tcp")
))
.location("eastus")
.networkSecurityRules(
Map.ofEntries(
Map.entry("access", "allow"),
Map.entry("description", "Test description"),
Map.entry("destinationAddressPrefixes", "*"),
Map.entry("destinationPortRanges", "*"),
Map.entry("direction", "inbound"),
Map.entry("name", "TestName"),
Map.entry("priority", 1010),
Map.entry("protocol", "tcp"),
Map.entry("sourceAddressPrefixes", "*"),
Map.entry("sourcePortRanges", "*")
),
Map.ofEntries(
Map.entry("access", "allow"),
Map.entry("destinationAddressPrefix", "*"),
Map.entry("destinationPortRange", "33500-33699"),
Map.entry("direction", "inbound"),
Map.entry("name", "AllowARM"),
Map.entry("priority", 2002),
Map.entry("protocol", "*"),
Map.entry("sourceAddressPrefix", "AzureResourceManager"),
Map.entry("sourcePortRange", "*")
))
.publicIPPrefixId("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix")
.resourceGroupName("resRg")
.serviceEndpoints(Map.ofEntries(
Map.entry("locations",
"eastus2",
"usnorth"),
Map.entry("service", "Microsoft.Storage")
))
.sku(Map.of("name", "Basic"))
.tags()
.useCustomVnet(true)
.zonalResiliency(true)
.zonalUpdateMode("Fast")
.build());
}
}
Content copied to clipboard
Put a cluster with minimum parameters
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ServiceFabric.ManagedCluster("managedCluster", new()
{
AdminPassword = "{vm-password}",
AdminUserName = "vmadmin",
ClusterName = "myCluster",
ClusterUpgradeCadence = "Wave1",
ClusterUpgradeMode = "Automatic",
DnsName = "myCluster",
FabricSettings = new[]
{
new AzureNative.ServiceFabric.Inputs.SettingsSectionDescriptionArgs
{
Name = "ManagedIdentityTokenService",
Parameters = new[]
{
new AzureNative.ServiceFabric.Inputs.SettingsParameterDescriptionArgs
{
Name = "IsEnabled",
Value = "true",
},
},
},
},
Location = "eastus",
ResourceGroupName = "resRg",
Sku = new AzureNative.ServiceFabric.Inputs.SkuArgs
{
Name = "Basic",
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/servicefabric/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := servicefabric.NewManagedCluster(ctx, "managedCluster", &servicefabric.ManagedClusterArgs{
AdminPassword: pulumi.String("{vm-password}"),
AdminUserName: pulumi.String("vmadmin"),
ClusterName: pulumi.String("myCluster"),
ClusterUpgradeCadence: pulumi.String("Wave1"),
ClusterUpgradeMode: pulumi.String("Automatic"),
DnsName: pulumi.String("myCluster"),
FabricSettings: []servicefabric.SettingsSectionDescriptionArgs{
{
Name: pulumi.String("ManagedIdentityTokenService"),
Parameters: servicefabric.SettingsParameterDescriptionArray{
{
Name: pulumi.String("IsEnabled"),
Value: pulumi.String("true"),
},
},
},
},
Location: pulumi.String("eastus"),
ResourceGroupName: pulumi.String("resRg"),
Sku: &servicefabric.SkuArgs{
Name: pulumi.String("Basic"),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.servicefabric.ManagedCluster;
import com.pulumi.azurenative.servicefabric.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.adminPassword("{vm-password}")
.adminUserName("vmadmin")
.clusterName("myCluster")
.clusterUpgradeCadence("Wave1")
.clusterUpgradeMode("Automatic")
.dnsName("myCluster")
.fabricSettings(Map.ofEntries(
Map.entry("name", "ManagedIdentityTokenService"),
Map.entry("parameters", Map.ofEntries(
Map.entry("name", "IsEnabled"),
Map.entry("value", "true")
))
))
.location("eastus")
.resourceGroupName("resRg")
.sku(Map.of("name", "Basic"))
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:servicefabric:ManagedCluster myCluster /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}
Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The Service Fabric runtime version of the cluster. This property is required when clusterUpgradeMode is set to 'Manual'. To get list of available Service Fabric versions for new clusters use ./ClusterVersion.md. To get the list of available version for existing clusters use availableClusterVersions.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard