1. Packages
  2. Azure Classic
  3. API Docs
  4. mssql
  5. ManagedInstance

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

azure.mssql.ManagedInstance

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

    Manages a Microsoft SQL Azure Managed Instance.

    Note: All arguments including the administrator login and password will be stored in the raw state as plain-text. Read more about sensitive data in state.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
        {
            Location = "West Europe",
        });
    
        var exampleNetworkSecurityGroup = new Azure.Network.NetworkSecurityGroup("exampleNetworkSecurityGroup", new()
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
        });
    
        var allowManagementInbound = new Azure.Network.NetworkSecurityRule("allowManagementInbound", new()
        {
            Priority = 106,
            Direction = "Inbound",
            Access = "Allow",
            Protocol = "Tcp",
            SourcePortRange = "*",
            DestinationPortRanges = new[]
            {
                "9000",
                "9003",
                "1438",
                "1440",
                "1452",
            },
            SourceAddressPrefix = "*",
            DestinationAddressPrefix = "*",
            ResourceGroupName = exampleResourceGroup.Name,
            NetworkSecurityGroupName = exampleNetworkSecurityGroup.Name,
        });
    
        var allowMisubnetInbound = new Azure.Network.NetworkSecurityRule("allowMisubnetInbound", new()
        {
            Priority = 200,
            Direction = "Inbound",
            Access = "Allow",
            Protocol = "*",
            SourcePortRange = "*",
            DestinationPortRange = "*",
            SourceAddressPrefix = "10.0.0.0/24",
            DestinationAddressPrefix = "*",
            ResourceGroupName = exampleResourceGroup.Name,
            NetworkSecurityGroupName = exampleNetworkSecurityGroup.Name,
        });
    
        var allowHealthProbeInbound = new Azure.Network.NetworkSecurityRule("allowHealthProbeInbound", new()
        {
            Priority = 300,
            Direction = "Inbound",
            Access = "Allow",
            Protocol = "*",
            SourcePortRange = "*",
            DestinationPortRange = "*",
            SourceAddressPrefix = "AzureLoadBalancer",
            DestinationAddressPrefix = "*",
            ResourceGroupName = exampleResourceGroup.Name,
            NetworkSecurityGroupName = exampleNetworkSecurityGroup.Name,
        });
    
        var allowTdsInbound = new Azure.Network.NetworkSecurityRule("allowTdsInbound", new()
        {
            Priority = 1000,
            Direction = "Inbound",
            Access = "Allow",
            Protocol = "Tcp",
            SourcePortRange = "*",
            DestinationPortRange = "1433",
            SourceAddressPrefix = "VirtualNetwork",
            DestinationAddressPrefix = "*",
            ResourceGroupName = exampleResourceGroup.Name,
            NetworkSecurityGroupName = exampleNetworkSecurityGroup.Name,
        });
    
        var denyAllInbound = new Azure.Network.NetworkSecurityRule("denyAllInbound", new()
        {
            Priority = 4096,
            Direction = "Inbound",
            Access = "Deny",
            Protocol = "*",
            SourcePortRange = "*",
            DestinationPortRange = "*",
            SourceAddressPrefix = "*",
            DestinationAddressPrefix = "*",
            ResourceGroupName = exampleResourceGroup.Name,
            NetworkSecurityGroupName = exampleNetworkSecurityGroup.Name,
        });
    
        var allowManagementOutbound = new Azure.Network.NetworkSecurityRule("allowManagementOutbound", new()
        {
            Priority = 102,
            Direction = "Outbound",
            Access = "Allow",
            Protocol = "Tcp",
            SourcePortRange = "*",
            DestinationPortRanges = new[]
            {
                "80",
                "443",
                "12000",
            },
            SourceAddressPrefix = "*",
            DestinationAddressPrefix = "*",
            ResourceGroupName = exampleResourceGroup.Name,
            NetworkSecurityGroupName = exampleNetworkSecurityGroup.Name,
        });
    
        var allowMisubnetOutbound = new Azure.Network.NetworkSecurityRule("allowMisubnetOutbound", new()
        {
            Priority = 200,
            Direction = "Outbound",
            Access = "Allow",
            Protocol = "*",
            SourcePortRange = "*",
            DestinationPortRange = "*",
            SourceAddressPrefix = "10.0.0.0/24",
            DestinationAddressPrefix = "*",
            ResourceGroupName = exampleResourceGroup.Name,
            NetworkSecurityGroupName = exampleNetworkSecurityGroup.Name,
        });
    
        var denyAllOutbound = new Azure.Network.NetworkSecurityRule("denyAllOutbound", new()
        {
            Priority = 4096,
            Direction = "Outbound",
            Access = "Deny",
            Protocol = "*",
            SourcePortRange = "*",
            DestinationPortRange = "*",
            SourceAddressPrefix = "*",
            DestinationAddressPrefix = "*",
            ResourceGroupName = exampleResourceGroup.Name,
            NetworkSecurityGroupName = exampleNetworkSecurityGroup.Name,
        });
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
            Location = exampleResourceGroup.Location,
        });
    
        var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            VirtualNetworkName = exampleVirtualNetwork.Name,
            AddressPrefixes = new[]
            {
                "10.0.0.0/24",
            },
            Delegations = new[]
            {
                new Azure.Network.Inputs.SubnetDelegationArgs
                {
                    Name = "managedinstancedelegation",
                    ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs
                    {
                        Name = "Microsoft.Sql/managedInstances",
                        Actions = new[]
                        {
                            "Microsoft.Network/virtualNetworks/subnets/join/action",
                            "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action",
                            "Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action",
                        },
                    },
                },
            },
        });
    
        var exampleSubnetNetworkSecurityGroupAssociation = new Azure.Network.SubnetNetworkSecurityGroupAssociation("exampleSubnetNetworkSecurityGroupAssociation", new()
        {
            SubnetId = exampleSubnet.Id,
            NetworkSecurityGroupId = exampleNetworkSecurityGroup.Id,
        });
    
        var exampleRouteTable = new Azure.Network.RouteTable("exampleRouteTable", new()
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            DisableBgpRoutePropagation = false,
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                exampleSubnet,
            },
        });
    
        var exampleSubnetRouteTableAssociation = new Azure.Network.SubnetRouteTableAssociation("exampleSubnetRouteTableAssociation", new()
        {
            SubnetId = exampleSubnet.Id,
            RouteTableId = exampleRouteTable.Id,
        });
    
        var exampleManagedInstance = new Azure.MSSql.ManagedInstance("exampleManagedInstance", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            LicenseType = "BasePrice",
            SkuName = "GP_Gen5",
            StorageSizeInGb = 32,
            SubnetId = exampleSubnet.Id,
            Vcores = 4,
            AdministratorLogin = "mradministrator",
            AdministratorLoginPassword = "thisIsDog11",
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                exampleSubnetNetworkSecurityGroupAssociation,
                exampleSubnetRouteTableAssociation,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mssql"
    	"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 {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "exampleNetworkSecurityGroup", &network.NetworkSecurityGroupArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewNetworkSecurityRule(ctx, "allowManagementInbound", &network.NetworkSecurityRuleArgs{
    			Priority:        pulumi.Int(106),
    			Direction:       pulumi.String("Inbound"),
    			Access:          pulumi.String("Allow"),
    			Protocol:        pulumi.String("Tcp"),
    			SourcePortRange: pulumi.String("*"),
    			DestinationPortRanges: pulumi.StringArray{
    				pulumi.String("9000"),
    				pulumi.String("9003"),
    				pulumi.String("1438"),
    				pulumi.String("1440"),
    				pulumi.String("1452"),
    			},
    			SourceAddressPrefix:      pulumi.String("*"),
    			DestinationAddressPrefix: pulumi.String("*"),
    			ResourceGroupName:        exampleResourceGroup.Name,
    			NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewNetworkSecurityRule(ctx, "allowMisubnetInbound", &network.NetworkSecurityRuleArgs{
    			Priority:                 pulumi.Int(200),
    			Direction:                pulumi.String("Inbound"),
    			Access:                   pulumi.String("Allow"),
    			Protocol:                 pulumi.String("*"),
    			SourcePortRange:          pulumi.String("*"),
    			DestinationPortRange:     pulumi.String("*"),
    			SourceAddressPrefix:      pulumi.String("10.0.0.0/24"),
    			DestinationAddressPrefix: pulumi.String("*"),
    			ResourceGroupName:        exampleResourceGroup.Name,
    			NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewNetworkSecurityRule(ctx, "allowHealthProbeInbound", &network.NetworkSecurityRuleArgs{
    			Priority:                 pulumi.Int(300),
    			Direction:                pulumi.String("Inbound"),
    			Access:                   pulumi.String("Allow"),
    			Protocol:                 pulumi.String("*"),
    			SourcePortRange:          pulumi.String("*"),
    			DestinationPortRange:     pulumi.String("*"),
    			SourceAddressPrefix:      pulumi.String("AzureLoadBalancer"),
    			DestinationAddressPrefix: pulumi.String("*"),
    			ResourceGroupName:        exampleResourceGroup.Name,
    			NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewNetworkSecurityRule(ctx, "allowTdsInbound", &network.NetworkSecurityRuleArgs{
    			Priority:                 pulumi.Int(1000),
    			Direction:                pulumi.String("Inbound"),
    			Access:                   pulumi.String("Allow"),
    			Protocol:                 pulumi.String("Tcp"),
    			SourcePortRange:          pulumi.String("*"),
    			DestinationPortRange:     pulumi.String("1433"),
    			SourceAddressPrefix:      pulumi.String("VirtualNetwork"),
    			DestinationAddressPrefix: pulumi.String("*"),
    			ResourceGroupName:        exampleResourceGroup.Name,
    			NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewNetworkSecurityRule(ctx, "denyAllInbound", &network.NetworkSecurityRuleArgs{
    			Priority:                 pulumi.Int(4096),
    			Direction:                pulumi.String("Inbound"),
    			Access:                   pulumi.String("Deny"),
    			Protocol:                 pulumi.String("*"),
    			SourcePortRange:          pulumi.String("*"),
    			DestinationPortRange:     pulumi.String("*"),
    			SourceAddressPrefix:      pulumi.String("*"),
    			DestinationAddressPrefix: pulumi.String("*"),
    			ResourceGroupName:        exampleResourceGroup.Name,
    			NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewNetworkSecurityRule(ctx, "allowManagementOutbound", &network.NetworkSecurityRuleArgs{
    			Priority:        pulumi.Int(102),
    			Direction:       pulumi.String("Outbound"),
    			Access:          pulumi.String("Allow"),
    			Protocol:        pulumi.String("Tcp"),
    			SourcePortRange: pulumi.String("*"),
    			DestinationPortRanges: pulumi.StringArray{
    				pulumi.String("80"),
    				pulumi.String("443"),
    				pulumi.String("12000"),
    			},
    			SourceAddressPrefix:      pulumi.String("*"),
    			DestinationAddressPrefix: pulumi.String("*"),
    			ResourceGroupName:        exampleResourceGroup.Name,
    			NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewNetworkSecurityRule(ctx, "allowMisubnetOutbound", &network.NetworkSecurityRuleArgs{
    			Priority:                 pulumi.Int(200),
    			Direction:                pulumi.String("Outbound"),
    			Access:                   pulumi.String("Allow"),
    			Protocol:                 pulumi.String("*"),
    			SourcePortRange:          pulumi.String("*"),
    			DestinationPortRange:     pulumi.String("*"),
    			SourceAddressPrefix:      pulumi.String("10.0.0.0/24"),
    			DestinationAddressPrefix: pulumi.String("*"),
    			ResourceGroupName:        exampleResourceGroup.Name,
    			NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewNetworkSecurityRule(ctx, "denyAllOutbound", &network.NetworkSecurityRuleArgs{
    			Priority:                 pulumi.Int(4096),
    			Direction:                pulumi.String("Outbound"),
    			Access:                   pulumi.String("Deny"),
    			Protocol:                 pulumi.String("*"),
    			SourcePortRange:          pulumi.String("*"),
    			DestinationPortRange:     pulumi.String("*"),
    			SourceAddressPrefix:      pulumi.String("*"),
    			DestinationAddressPrefix: pulumi.String("*"),
    			ResourceGroupName:        exampleResourceGroup.Name,
    			NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    			Location: exampleResourceGroup.Location,
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
    			ResourceGroupName:  exampleResourceGroup.Name,
    			VirtualNetworkName: exampleVirtualNetwork.Name,
    			AddressPrefixes: pulumi.StringArray{
    				pulumi.String("10.0.0.0/24"),
    			},
    			Delegations: network.SubnetDelegationArray{
    				&network.SubnetDelegationArgs{
    					Name: pulumi.String("managedinstancedelegation"),
    					ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
    						Name: pulumi.String("Microsoft.Sql/managedInstances"),
    						Actions: pulumi.StringArray{
    							pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
    							pulumi.String("Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"),
    							pulumi.String("Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnetNetworkSecurityGroupAssociation, err := network.NewSubnetNetworkSecurityGroupAssociation(ctx, "exampleSubnetNetworkSecurityGroupAssociation", &network.SubnetNetworkSecurityGroupAssociationArgs{
    			SubnetId:               exampleSubnet.ID(),
    			NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		exampleRouteTable, err := network.NewRouteTable(ctx, "exampleRouteTable", &network.RouteTableArgs{
    			Location:                   exampleResourceGroup.Location,
    			ResourceGroupName:          exampleResourceGroup.Name,
    			DisableBgpRoutePropagation: pulumi.Bool(false),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			exampleSubnet,
    		}))
    		if err != nil {
    			return err
    		}
    		exampleSubnetRouteTableAssociation, err := network.NewSubnetRouteTableAssociation(ctx, "exampleSubnetRouteTableAssociation", &network.SubnetRouteTableAssociationArgs{
    			SubnetId:     exampleSubnet.ID(),
    			RouteTableId: exampleRouteTable.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mssql.NewManagedInstance(ctx, "exampleManagedInstance", &mssql.ManagedInstanceArgs{
    			ResourceGroupName:          exampleResourceGroup.Name,
    			Location:                   exampleResourceGroup.Location,
    			LicenseType:                pulumi.String("BasePrice"),
    			SkuName:                    pulumi.String("GP_Gen5"),
    			StorageSizeInGb:            pulumi.Int(32),
    			SubnetId:                   exampleSubnet.ID(),
    			Vcores:                     pulumi.Int(4),
    			AdministratorLogin:         pulumi.String("mradministrator"),
    			AdministratorLoginPassword: pulumi.String("thisIsDog11"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			exampleSubnetNetworkSecurityGroupAssociation,
    			exampleSubnetRouteTableAssociation,
    		}))
    		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.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.network.NetworkSecurityGroup;
    import com.pulumi.azure.network.NetworkSecurityGroupArgs;
    import com.pulumi.azure.network.NetworkSecurityRule;
    import com.pulumi.azure.network.NetworkSecurityRuleArgs;
    import com.pulumi.azure.network.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.network.Subnet;
    import com.pulumi.azure.network.SubnetArgs;
    import com.pulumi.azure.network.inputs.SubnetDelegationArgs;
    import com.pulumi.azure.network.inputs.SubnetDelegationServiceDelegationArgs;
    import com.pulumi.azure.network.SubnetNetworkSecurityGroupAssociation;
    import com.pulumi.azure.network.SubnetNetworkSecurityGroupAssociationArgs;
    import com.pulumi.azure.network.RouteTable;
    import com.pulumi.azure.network.RouteTableArgs;
    import com.pulumi.azure.network.SubnetRouteTableAssociation;
    import com.pulumi.azure.network.SubnetRouteTableAssociationArgs;
    import com.pulumi.azure.mssql.ManagedInstance;
    import com.pulumi.azure.mssql.ManagedInstanceArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
                .location("West Europe")
                .build());
    
            var exampleNetworkSecurityGroup = new NetworkSecurityGroup("exampleNetworkSecurityGroup", NetworkSecurityGroupArgs.builder()        
                .location(exampleResourceGroup.location())
                .resourceGroupName(exampleResourceGroup.name())
                .build());
    
            var allowManagementInbound = new NetworkSecurityRule("allowManagementInbound", NetworkSecurityRuleArgs.builder()        
                .priority(106)
                .direction("Inbound")
                .access("Allow")
                .protocol("Tcp")
                .sourcePortRange("*")
                .destinationPortRanges(            
                    "9000",
                    "9003",
                    "1438",
                    "1440",
                    "1452")
                .sourceAddressPrefix("*")
                .destinationAddressPrefix("*")
                .resourceGroupName(exampleResourceGroup.name())
                .networkSecurityGroupName(exampleNetworkSecurityGroup.name())
                .build());
    
            var allowMisubnetInbound = new NetworkSecurityRule("allowMisubnetInbound", NetworkSecurityRuleArgs.builder()        
                .priority(200)
                .direction("Inbound")
                .access("Allow")
                .protocol("*")
                .sourcePortRange("*")
                .destinationPortRange("*")
                .sourceAddressPrefix("10.0.0.0/24")
                .destinationAddressPrefix("*")
                .resourceGroupName(exampleResourceGroup.name())
                .networkSecurityGroupName(exampleNetworkSecurityGroup.name())
                .build());
    
            var allowHealthProbeInbound = new NetworkSecurityRule("allowHealthProbeInbound", NetworkSecurityRuleArgs.builder()        
                .priority(300)
                .direction("Inbound")
                .access("Allow")
                .protocol("*")
                .sourcePortRange("*")
                .destinationPortRange("*")
                .sourceAddressPrefix("AzureLoadBalancer")
                .destinationAddressPrefix("*")
                .resourceGroupName(exampleResourceGroup.name())
                .networkSecurityGroupName(exampleNetworkSecurityGroup.name())
                .build());
    
            var allowTdsInbound = new NetworkSecurityRule("allowTdsInbound", NetworkSecurityRuleArgs.builder()        
                .priority(1000)
                .direction("Inbound")
                .access("Allow")
                .protocol("Tcp")
                .sourcePortRange("*")
                .destinationPortRange("1433")
                .sourceAddressPrefix("VirtualNetwork")
                .destinationAddressPrefix("*")
                .resourceGroupName(exampleResourceGroup.name())
                .networkSecurityGroupName(exampleNetworkSecurityGroup.name())
                .build());
    
            var denyAllInbound = new NetworkSecurityRule("denyAllInbound", NetworkSecurityRuleArgs.builder()        
                .priority(4096)
                .direction("Inbound")
                .access("Deny")
                .protocol("*")
                .sourcePortRange("*")
                .destinationPortRange("*")
                .sourceAddressPrefix("*")
                .destinationAddressPrefix("*")
                .resourceGroupName(exampleResourceGroup.name())
                .networkSecurityGroupName(exampleNetworkSecurityGroup.name())
                .build());
    
            var allowManagementOutbound = new NetworkSecurityRule("allowManagementOutbound", NetworkSecurityRuleArgs.builder()        
                .priority(102)
                .direction("Outbound")
                .access("Allow")
                .protocol("Tcp")
                .sourcePortRange("*")
                .destinationPortRanges(            
                    "80",
                    "443",
                    "12000")
                .sourceAddressPrefix("*")
                .destinationAddressPrefix("*")
                .resourceGroupName(exampleResourceGroup.name())
                .networkSecurityGroupName(exampleNetworkSecurityGroup.name())
                .build());
    
            var allowMisubnetOutbound = new NetworkSecurityRule("allowMisubnetOutbound", NetworkSecurityRuleArgs.builder()        
                .priority(200)
                .direction("Outbound")
                .access("Allow")
                .protocol("*")
                .sourcePortRange("*")
                .destinationPortRange("*")
                .sourceAddressPrefix("10.0.0.0/24")
                .destinationAddressPrefix("*")
                .resourceGroupName(exampleResourceGroup.name())
                .networkSecurityGroupName(exampleNetworkSecurityGroup.name())
                .build());
    
            var denyAllOutbound = new NetworkSecurityRule("denyAllOutbound", NetworkSecurityRuleArgs.builder()        
                .priority(4096)
                .direction("Outbound")
                .access("Deny")
                .protocol("*")
                .sourcePortRange("*")
                .destinationPortRange("*")
                .sourceAddressPrefix("*")
                .destinationAddressPrefix("*")
                .resourceGroupName(exampleResourceGroup.name())
                .networkSecurityGroupName(exampleNetworkSecurityGroup.name())
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .addressSpaces("10.0.0.0/16")
                .location(exampleResourceGroup.location())
                .build());
    
            var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .virtualNetworkName(exampleVirtualNetwork.name())
                .addressPrefixes("10.0.0.0/24")
                .delegations(SubnetDelegationArgs.builder()
                    .name("managedinstancedelegation")
                    .serviceDelegation(SubnetDelegationServiceDelegationArgs.builder()
                        .name("Microsoft.Sql/managedInstances")
                        .actions(                    
                            "Microsoft.Network/virtualNetworks/subnets/join/action",
                            "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action",
                            "Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action")
                        .build())
                    .build())
                .build());
    
            var exampleSubnetNetworkSecurityGroupAssociation = new SubnetNetworkSecurityGroupAssociation("exampleSubnetNetworkSecurityGroupAssociation", SubnetNetworkSecurityGroupAssociationArgs.builder()        
                .subnetId(exampleSubnet.id())
                .networkSecurityGroupId(exampleNetworkSecurityGroup.id())
                .build());
    
            var exampleRouteTable = new RouteTable("exampleRouteTable", RouteTableArgs.builder()        
                .location(exampleResourceGroup.location())
                .resourceGroupName(exampleResourceGroup.name())
                .disableBgpRoutePropagation(false)
                .build(), CustomResourceOptions.builder()
                    .dependsOn(exampleSubnet)
                    .build());
    
            var exampleSubnetRouteTableAssociation = new SubnetRouteTableAssociation("exampleSubnetRouteTableAssociation", SubnetRouteTableAssociationArgs.builder()        
                .subnetId(exampleSubnet.id())
                .routeTableId(exampleRouteTable.id())
                .build());
    
            var exampleManagedInstance = new ManagedInstance("exampleManagedInstance", ManagedInstanceArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .location(exampleResourceGroup.location())
                .licenseType("BasePrice")
                .skuName("GP_Gen5")
                .storageSizeInGb(32)
                .subnetId(exampleSubnet.id())
                .vcores(4)
                .administratorLogin("mradministrator")
                .administratorLoginPassword("thisIsDog11")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(                
                        exampleSubnetNetworkSecurityGroupAssociation,
                        exampleSubnetRouteTableAssociation)
                    .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_network_security_group = azure.network.NetworkSecurityGroup("exampleNetworkSecurityGroup",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name)
    allow_management_inbound = azure.network.NetworkSecurityRule("allowManagementInbound",
        priority=106,
        direction="Inbound",
        access="Allow",
        protocol="Tcp",
        source_port_range="*",
        destination_port_ranges=[
            "9000",
            "9003",
            "1438",
            "1440",
            "1452",
        ],
        source_address_prefix="*",
        destination_address_prefix="*",
        resource_group_name=example_resource_group.name,
        network_security_group_name=example_network_security_group.name)
    allow_misubnet_inbound = azure.network.NetworkSecurityRule("allowMisubnetInbound",
        priority=200,
        direction="Inbound",
        access="Allow",
        protocol="*",
        source_port_range="*",
        destination_port_range="*",
        source_address_prefix="10.0.0.0/24",
        destination_address_prefix="*",
        resource_group_name=example_resource_group.name,
        network_security_group_name=example_network_security_group.name)
    allow_health_probe_inbound = azure.network.NetworkSecurityRule("allowHealthProbeInbound",
        priority=300,
        direction="Inbound",
        access="Allow",
        protocol="*",
        source_port_range="*",
        destination_port_range="*",
        source_address_prefix="AzureLoadBalancer",
        destination_address_prefix="*",
        resource_group_name=example_resource_group.name,
        network_security_group_name=example_network_security_group.name)
    allow_tds_inbound = azure.network.NetworkSecurityRule("allowTdsInbound",
        priority=1000,
        direction="Inbound",
        access="Allow",
        protocol="Tcp",
        source_port_range="*",
        destination_port_range="1433",
        source_address_prefix="VirtualNetwork",
        destination_address_prefix="*",
        resource_group_name=example_resource_group.name,
        network_security_group_name=example_network_security_group.name)
    deny_all_inbound = azure.network.NetworkSecurityRule("denyAllInbound",
        priority=4096,
        direction="Inbound",
        access="Deny",
        protocol="*",
        source_port_range="*",
        destination_port_range="*",
        source_address_prefix="*",
        destination_address_prefix="*",
        resource_group_name=example_resource_group.name,
        network_security_group_name=example_network_security_group.name)
    allow_management_outbound = azure.network.NetworkSecurityRule("allowManagementOutbound",
        priority=102,
        direction="Outbound",
        access="Allow",
        protocol="Tcp",
        source_port_range="*",
        destination_port_ranges=[
            "80",
            "443",
            "12000",
        ],
        source_address_prefix="*",
        destination_address_prefix="*",
        resource_group_name=example_resource_group.name,
        network_security_group_name=example_network_security_group.name)
    allow_misubnet_outbound = azure.network.NetworkSecurityRule("allowMisubnetOutbound",
        priority=200,
        direction="Outbound",
        access="Allow",
        protocol="*",
        source_port_range="*",
        destination_port_range="*",
        source_address_prefix="10.0.0.0/24",
        destination_address_prefix="*",
        resource_group_name=example_resource_group.name,
        network_security_group_name=example_network_security_group.name)
    deny_all_outbound = azure.network.NetworkSecurityRule("denyAllOutbound",
        priority=4096,
        direction="Outbound",
        access="Deny",
        protocol="*",
        source_port_range="*",
        destination_port_range="*",
        source_address_prefix="*",
        destination_address_prefix="*",
        resource_group_name=example_resource_group.name,
        network_security_group_name=example_network_security_group.name)
    example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
        resource_group_name=example_resource_group.name,
        address_spaces=["10.0.0.0/16"],
        location=example_resource_group.location)
    example_subnet = azure.network.Subnet("exampleSubnet",
        resource_group_name=example_resource_group.name,
        virtual_network_name=example_virtual_network.name,
        address_prefixes=["10.0.0.0/24"],
        delegations=[azure.network.SubnetDelegationArgs(
            name="managedinstancedelegation",
            service_delegation=azure.network.SubnetDelegationServiceDelegationArgs(
                name="Microsoft.Sql/managedInstances",
                actions=[
                    "Microsoft.Network/virtualNetworks/subnets/join/action",
                    "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action",
                    "Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action",
                ],
            ),
        )])
    example_subnet_network_security_group_association = azure.network.SubnetNetworkSecurityGroupAssociation("exampleSubnetNetworkSecurityGroupAssociation",
        subnet_id=example_subnet.id,
        network_security_group_id=example_network_security_group.id)
    example_route_table = azure.network.RouteTable("exampleRouteTable",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        disable_bgp_route_propagation=False,
        opts=pulumi.ResourceOptions(depends_on=[example_subnet]))
    example_subnet_route_table_association = azure.network.SubnetRouteTableAssociation("exampleSubnetRouteTableAssociation",
        subnet_id=example_subnet.id,
        route_table_id=example_route_table.id)
    example_managed_instance = azure.mssql.ManagedInstance("exampleManagedInstance",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        license_type="BasePrice",
        sku_name="GP_Gen5",
        storage_size_in_gb=32,
        subnet_id=example_subnet.id,
        vcores=4,
        administrator_login="mradministrator",
        administrator_login_password="thisIsDog11",
        opts=pulumi.ResourceOptions(depends_on=[
                example_subnet_network_security_group_association,
                example_subnet_route_table_association,
            ]))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleNetworkSecurityGroup = new azure.network.NetworkSecurityGroup("exampleNetworkSecurityGroup", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
    });
    const allowManagementInbound = new azure.network.NetworkSecurityRule("allowManagementInbound", {
        priority: 106,
        direction: "Inbound",
        access: "Allow",
        protocol: "Tcp",
        sourcePortRange: "*",
        destinationPortRanges: [
            "9000",
            "9003",
            "1438",
            "1440",
            "1452",
        ],
        sourceAddressPrefix: "*",
        destinationAddressPrefix: "*",
        resourceGroupName: exampleResourceGroup.name,
        networkSecurityGroupName: exampleNetworkSecurityGroup.name,
    });
    const allowMisubnetInbound = new azure.network.NetworkSecurityRule("allowMisubnetInbound", {
        priority: 200,
        direction: "Inbound",
        access: "Allow",
        protocol: "*",
        sourcePortRange: "*",
        destinationPortRange: "*",
        sourceAddressPrefix: "10.0.0.0/24",
        destinationAddressPrefix: "*",
        resourceGroupName: exampleResourceGroup.name,
        networkSecurityGroupName: exampleNetworkSecurityGroup.name,
    });
    const allowHealthProbeInbound = new azure.network.NetworkSecurityRule("allowHealthProbeInbound", {
        priority: 300,
        direction: "Inbound",
        access: "Allow",
        protocol: "*",
        sourcePortRange: "*",
        destinationPortRange: "*",
        sourceAddressPrefix: "AzureLoadBalancer",
        destinationAddressPrefix: "*",
        resourceGroupName: exampleResourceGroup.name,
        networkSecurityGroupName: exampleNetworkSecurityGroup.name,
    });
    const allowTdsInbound = new azure.network.NetworkSecurityRule("allowTdsInbound", {
        priority: 1000,
        direction: "Inbound",
        access: "Allow",
        protocol: "Tcp",
        sourcePortRange: "*",
        destinationPortRange: "1433",
        sourceAddressPrefix: "VirtualNetwork",
        destinationAddressPrefix: "*",
        resourceGroupName: exampleResourceGroup.name,
        networkSecurityGroupName: exampleNetworkSecurityGroup.name,
    });
    const denyAllInbound = new azure.network.NetworkSecurityRule("denyAllInbound", {
        priority: 4096,
        direction: "Inbound",
        access: "Deny",
        protocol: "*",
        sourcePortRange: "*",
        destinationPortRange: "*",
        sourceAddressPrefix: "*",
        destinationAddressPrefix: "*",
        resourceGroupName: exampleResourceGroup.name,
        networkSecurityGroupName: exampleNetworkSecurityGroup.name,
    });
    const allowManagementOutbound = new azure.network.NetworkSecurityRule("allowManagementOutbound", {
        priority: 102,
        direction: "Outbound",
        access: "Allow",
        protocol: "Tcp",
        sourcePortRange: "*",
        destinationPortRanges: [
            "80",
            "443",
            "12000",
        ],
        sourceAddressPrefix: "*",
        destinationAddressPrefix: "*",
        resourceGroupName: exampleResourceGroup.name,
        networkSecurityGroupName: exampleNetworkSecurityGroup.name,
    });
    const allowMisubnetOutbound = new azure.network.NetworkSecurityRule("allowMisubnetOutbound", {
        priority: 200,
        direction: "Outbound",
        access: "Allow",
        protocol: "*",
        sourcePortRange: "*",
        destinationPortRange: "*",
        sourceAddressPrefix: "10.0.0.0/24",
        destinationAddressPrefix: "*",
        resourceGroupName: exampleResourceGroup.name,
        networkSecurityGroupName: exampleNetworkSecurityGroup.name,
    });
    const denyAllOutbound = new azure.network.NetworkSecurityRule("denyAllOutbound", {
        priority: 4096,
        direction: "Outbound",
        access: "Deny",
        protocol: "*",
        sourcePortRange: "*",
        destinationPortRange: "*",
        sourceAddressPrefix: "*",
        destinationAddressPrefix: "*",
        resourceGroupName: exampleResourceGroup.name,
        networkSecurityGroupName: exampleNetworkSecurityGroup.name,
    });
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
        resourceGroupName: exampleResourceGroup.name,
        addressSpaces: ["10.0.0.0/16"],
        location: exampleResourceGroup.location,
    });
    const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
        resourceGroupName: exampleResourceGroup.name,
        virtualNetworkName: exampleVirtualNetwork.name,
        addressPrefixes: ["10.0.0.0/24"],
        delegations: [{
            name: "managedinstancedelegation",
            serviceDelegation: {
                name: "Microsoft.Sql/managedInstances",
                actions: [
                    "Microsoft.Network/virtualNetworks/subnets/join/action",
                    "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action",
                    "Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action",
                ],
            },
        }],
    });
    const exampleSubnetNetworkSecurityGroupAssociation = new azure.network.SubnetNetworkSecurityGroupAssociation("exampleSubnetNetworkSecurityGroupAssociation", {
        subnetId: exampleSubnet.id,
        networkSecurityGroupId: exampleNetworkSecurityGroup.id,
    });
    const exampleRouteTable = new azure.network.RouteTable("exampleRouteTable", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        disableBgpRoutePropagation: false,
    }, {
        dependsOn: [exampleSubnet],
    });
    const exampleSubnetRouteTableAssociation = new azure.network.SubnetRouteTableAssociation("exampleSubnetRouteTableAssociation", {
        subnetId: exampleSubnet.id,
        routeTableId: exampleRouteTable.id,
    });
    const exampleManagedInstance = new azure.mssql.ManagedInstance("exampleManagedInstance", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        licenseType: "BasePrice",
        skuName: "GP_Gen5",
        storageSizeInGb: 32,
        subnetId: exampleSubnet.id,
        vcores: 4,
        administratorLogin: "mradministrator",
        administratorLoginPassword: "thisIsDog11",
    }, {
        dependsOn: [
            exampleSubnetNetworkSecurityGroupAssociation,
            exampleSubnetRouteTableAssociation,
        ],
    });
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      exampleNetworkSecurityGroup:
        type: azure:network:NetworkSecurityGroup
        properties:
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
      allowManagementInbound:
        type: azure:network:NetworkSecurityRule
        properties:
          priority: 106
          direction: Inbound
          access: Allow
          protocol: Tcp
          sourcePortRange: '*'
          destinationPortRanges:
            - '9000'
            - '9003'
            - '1438'
            - '1440'
            - '1452'
          sourceAddressPrefix: '*'
          destinationAddressPrefix: '*'
          resourceGroupName: ${exampleResourceGroup.name}
          networkSecurityGroupName: ${exampleNetworkSecurityGroup.name}
      allowMisubnetInbound:
        type: azure:network:NetworkSecurityRule
        properties:
          priority: 200
          direction: Inbound
          access: Allow
          protocol: '*'
          sourcePortRange: '*'
          destinationPortRange: '*'
          sourceAddressPrefix: 10.0.0.0/24
          destinationAddressPrefix: '*'
          resourceGroupName: ${exampleResourceGroup.name}
          networkSecurityGroupName: ${exampleNetworkSecurityGroup.name}
      allowHealthProbeInbound:
        type: azure:network:NetworkSecurityRule
        properties:
          priority: 300
          direction: Inbound
          access: Allow
          protocol: '*'
          sourcePortRange: '*'
          destinationPortRange: '*'
          sourceAddressPrefix: AzureLoadBalancer
          destinationAddressPrefix: '*'
          resourceGroupName: ${exampleResourceGroup.name}
          networkSecurityGroupName: ${exampleNetworkSecurityGroup.name}
      allowTdsInbound:
        type: azure:network:NetworkSecurityRule
        properties:
          priority: 1000
          direction: Inbound
          access: Allow
          protocol: Tcp
          sourcePortRange: '*'
          destinationPortRange: '1433'
          sourceAddressPrefix: VirtualNetwork
          destinationAddressPrefix: '*'
          resourceGroupName: ${exampleResourceGroup.name}
          networkSecurityGroupName: ${exampleNetworkSecurityGroup.name}
      denyAllInbound:
        type: azure:network:NetworkSecurityRule
        properties:
          priority: 4096
          direction: Inbound
          access: Deny
          protocol: '*'
          sourcePortRange: '*'
          destinationPortRange: '*'
          sourceAddressPrefix: '*'
          destinationAddressPrefix: '*'
          resourceGroupName: ${exampleResourceGroup.name}
          networkSecurityGroupName: ${exampleNetworkSecurityGroup.name}
      allowManagementOutbound:
        type: azure:network:NetworkSecurityRule
        properties:
          priority: 102
          direction: Outbound
          access: Allow
          protocol: Tcp
          sourcePortRange: '*'
          destinationPortRanges:
            - '80'
            - '443'
            - '12000'
          sourceAddressPrefix: '*'
          destinationAddressPrefix: '*'
          resourceGroupName: ${exampleResourceGroup.name}
          networkSecurityGroupName: ${exampleNetworkSecurityGroup.name}
      allowMisubnetOutbound:
        type: azure:network:NetworkSecurityRule
        properties:
          priority: 200
          direction: Outbound
          access: Allow
          protocol: '*'
          sourcePortRange: '*'
          destinationPortRange: '*'
          sourceAddressPrefix: 10.0.0.0/24
          destinationAddressPrefix: '*'
          resourceGroupName: ${exampleResourceGroup.name}
          networkSecurityGroupName: ${exampleNetworkSecurityGroup.name}
      denyAllOutbound:
        type: azure:network:NetworkSecurityRule
        properties:
          priority: 4096
          direction: Outbound
          access: Deny
          protocol: '*'
          sourcePortRange: '*'
          destinationPortRange: '*'
          sourceAddressPrefix: '*'
          destinationAddressPrefix: '*'
          resourceGroupName: ${exampleResourceGroup.name}
          networkSecurityGroupName: ${exampleNetworkSecurityGroup.name}
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          addressSpaces:
            - 10.0.0.0/16
          location: ${exampleResourceGroup.location}
      exampleSubnet:
        type: azure:network:Subnet
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          virtualNetworkName: ${exampleVirtualNetwork.name}
          addressPrefixes:
            - 10.0.0.0/24
          delegations:
            - name: managedinstancedelegation
              serviceDelegation:
                name: Microsoft.Sql/managedInstances
                actions:
                  - Microsoft.Network/virtualNetworks/subnets/join/action
                  - Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action
                  - Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action
      exampleSubnetNetworkSecurityGroupAssociation:
        type: azure:network:SubnetNetworkSecurityGroupAssociation
        properties:
          subnetId: ${exampleSubnet.id}
          networkSecurityGroupId: ${exampleNetworkSecurityGroup.id}
      exampleRouteTable:
        type: azure:network:RouteTable
        properties:
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
          disableBgpRoutePropagation: false
        options:
          dependson:
            - ${exampleSubnet}
      exampleSubnetRouteTableAssociation:
        type: azure:network:SubnetRouteTableAssociation
        properties:
          subnetId: ${exampleSubnet.id}
          routeTableId: ${exampleRouteTable.id}
      exampleManagedInstance:
        type: azure:mssql:ManagedInstance
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          location: ${exampleResourceGroup.location}
          licenseType: BasePrice
          skuName: GP_Gen5
          storageSizeInGb: 32
          subnetId: ${exampleSubnet.id}
          vcores: 4
          administratorLogin: mradministrator
          administratorLoginPassword: thisIsDog11
        options:
          dependson:
            - ${exampleSubnetNetworkSecurityGroupAssociation}
            - ${exampleSubnetRouteTableAssociation}
    

    Create ManagedInstance Resource

    new ManagedInstance(name: string, args: ManagedInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def ManagedInstance(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        administrator_login: Optional[str] = None,
                        administrator_login_password: Optional[str] = None,
                        collation: Optional[str] = None,
                        dns_zone_partner_id: Optional[str] = None,
                        identity: Optional[ManagedInstanceIdentityArgs] = None,
                        license_type: Optional[str] = None,
                        location: Optional[str] = None,
                        maintenance_configuration_name: Optional[str] = None,
                        minimum_tls_version: Optional[str] = None,
                        name: Optional[str] = None,
                        proxy_override: Optional[str] = None,
                        public_data_endpoint_enabled: Optional[bool] = None,
                        resource_group_name: Optional[str] = None,
                        sku_name: Optional[str] = None,
                        storage_account_type: Optional[str] = None,
                        storage_size_in_gb: Optional[int] = None,
                        subnet_id: Optional[str] = None,
                        tags: Optional[Mapping[str, str]] = None,
                        timezone_id: Optional[str] = None,
                        vcores: Optional[int] = None)
    @overload
    def ManagedInstance(resource_name: str,
                        args: ManagedInstanceArgs,
                        opts: Optional[ResourceOptions] = None)
    func NewManagedInstance(ctx *Context, name string, args ManagedInstanceArgs, opts ...ResourceOption) (*ManagedInstance, error)
    public ManagedInstance(string name, ManagedInstanceArgs args, CustomResourceOptions? opts = null)
    public ManagedInstance(String name, ManagedInstanceArgs args)
    public ManagedInstance(String name, ManagedInstanceArgs args, CustomResourceOptions options)
    
    type: azure:mssql:ManagedInstance
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ManagedInstanceArgs
    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 ManagedInstanceArgs
    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 ManagedInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ManagedInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ManagedInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ManagedInstance 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 ManagedInstance resource accepts the following input properties:

    AdministratorLogin string

    The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.

    AdministratorLoginPassword string

    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy

    LicenseType string

    What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice.

    ResourceGroupName string

    The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.

    SkuName string

    Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH.

    StorageSizeInGb int

    Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).

    SubnetId string

    The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created.

    Vcores int

    Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs.

    Collation string

    Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created.

    DnsZonePartnerId string

    The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azure.sql.ManagedInstanceFailoverGroup. Setting this after creation forces a new resource to be created.

    Identity ManagedInstanceIdentity

    An identity block as defined below.

    Location string

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    MaintenanceConfigurationName string

    The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default.

    MinimumTlsVersion string

    The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2.

    Name string

    The name of the SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.

    ProxyOverride string

    Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect.

    PublicDataEndpointEnabled bool

    Is the public data endpoint enabled? Default value is false.

    StorageAccountType string

    Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS.

    Tags Dictionary<string, string>

    A mapping of tags to assign to the resource.

    TimezoneId string

    The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created.

    AdministratorLogin string

    The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.

    AdministratorLoginPassword string

    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy

    LicenseType string

    What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice.

    ResourceGroupName string

    The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.

    SkuName string

    Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH.

    StorageSizeInGb int

    Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).

    SubnetId string

    The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created.

    Vcores int

    Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs.

    Collation string

    Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created.

    DnsZonePartnerId string

    The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azure.sql.ManagedInstanceFailoverGroup. Setting this after creation forces a new resource to be created.

    Identity ManagedInstanceIdentityArgs

    An identity block as defined below.

    Location string

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    MaintenanceConfigurationName string

    The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default.

    MinimumTlsVersion string

    The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2.

    Name string

    The name of the SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.

    ProxyOverride string

    Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect.

    PublicDataEndpointEnabled bool

    Is the public data endpoint enabled? Default value is false.

    StorageAccountType string

    Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS.

    Tags map[string]string

    A mapping of tags to assign to the resource.

    TimezoneId string

    The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created.

    administratorLogin String

    The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.

    administratorLoginPassword String

    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy

    licenseType String

    What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice.

    resourceGroupName String

    The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.

    skuName String

    Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH.

    storageSizeInGb Integer

    Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).

    subnetId String

    The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created.

    vcores Integer

    Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs.

    collation String

    Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created.

    dnsZonePartnerId String

    The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azure.sql.ManagedInstanceFailoverGroup. Setting this after creation forces a new resource to be created.

    identity ManagedInstanceIdentity

    An identity block as defined below.

    location String

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    maintenanceConfigurationName String

    The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default.

    minimumTlsVersion String

    The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2.

    name String

    The name of the SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.

    proxyOverride String

    Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect.

    publicDataEndpointEnabled Boolean

    Is the public data endpoint enabled? Default value is false.

    storageAccountType String

    Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS.

    tags Map<String,String>

    A mapping of tags to assign to the resource.

    timezoneId String

    The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created.

    administratorLogin string

    The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.

    administratorLoginPassword string

    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy

    licenseType string

    What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice.

    resourceGroupName string

    The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.

    skuName string

    Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH.

    storageSizeInGb number

    Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).

    subnetId string

    The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created.

    vcores number

    Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs.

    collation string

    Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created.

    dnsZonePartnerId string

    The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azure.sql.ManagedInstanceFailoverGroup. Setting this after creation forces a new resource to be created.

    identity ManagedInstanceIdentity

    An identity block as defined below.

    location string

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    maintenanceConfigurationName string

    The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default.

    minimumTlsVersion string

    The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2.

    name string

    The name of the SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.

    proxyOverride string

    Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect.

    publicDataEndpointEnabled boolean

    Is the public data endpoint enabled? Default value is false.

    storageAccountType string

    Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS.

    tags {[key: string]: string}

    A mapping of tags to assign to the resource.

    timezoneId string

    The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created.

    administrator_login str

    The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.

    administrator_login_password str

    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy

    license_type str

    What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice.

    resource_group_name str

    The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.

    sku_name str

    Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH.

    storage_size_in_gb int

    Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).

    subnet_id str

    The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created.

    vcores int

    Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs.

    collation str

    Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created.

    dns_zone_partner_id str

    The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azure.sql.ManagedInstanceFailoverGroup. Setting this after creation forces a new resource to be created.

    identity ManagedInstanceIdentityArgs

    An identity block as defined below.

    location str

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    maintenance_configuration_name str

    The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default.

    minimum_tls_version str

    The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2.

    name str

    The name of the SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.

    proxy_override str

    Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect.

    public_data_endpoint_enabled bool

    Is the public data endpoint enabled? Default value is false.

    storage_account_type str

    Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS.

    tags Mapping[str, str]

    A mapping of tags to assign to the resource.

    timezone_id str

    The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created.

    administratorLogin String

    The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.

    administratorLoginPassword String

    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy

    licenseType String

    What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice.

    resourceGroupName String

    The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.

    skuName String

    Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH.

    storageSizeInGb Number

    Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).

    subnetId String

    The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created.

    vcores Number

    Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs.

    collation String

    Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created.

    dnsZonePartnerId String

    The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azure.sql.ManagedInstanceFailoverGroup. Setting this after creation forces a new resource to be created.

    identity Property Map

    An identity block as defined below.

    location String

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    maintenanceConfigurationName String

    The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default.

    minimumTlsVersion String

    The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2.

    name String

    The name of the SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.

    proxyOverride String

    Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect.

    publicDataEndpointEnabled Boolean

    Is the public data endpoint enabled? Default value is false.

    storageAccountType String

    Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS.

    tags Map<String>

    A mapping of tags to assign to the resource.

    timezoneId String

    The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created.

    Outputs

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

    Fqdn string

    The fully qualified domain name of the Azure Managed SQL Instance

    Id string

    The provider-assigned unique ID for this managed resource.

    Fqdn string

    The fully qualified domain name of the Azure Managed SQL Instance

    Id string

    The provider-assigned unique ID for this managed resource.

    fqdn String

    The fully qualified domain name of the Azure Managed SQL Instance

    id String

    The provider-assigned unique ID for this managed resource.

    fqdn string

    The fully qualified domain name of the Azure Managed SQL Instance

    id string

    The provider-assigned unique ID for this managed resource.

    fqdn str

    The fully qualified domain name of the Azure Managed SQL Instance

    id str

    The provider-assigned unique ID for this managed resource.

    fqdn String

    The fully qualified domain name of the Azure Managed SQL Instance

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing ManagedInstance Resource

    Get an existing ManagedInstance 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?: ManagedInstanceState, opts?: CustomResourceOptions): ManagedInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            administrator_login: Optional[str] = None,
            administrator_login_password: Optional[str] = None,
            collation: Optional[str] = None,
            dns_zone_partner_id: Optional[str] = None,
            fqdn: Optional[str] = None,
            identity: Optional[ManagedInstanceIdentityArgs] = None,
            license_type: Optional[str] = None,
            location: Optional[str] = None,
            maintenance_configuration_name: Optional[str] = None,
            minimum_tls_version: Optional[str] = None,
            name: Optional[str] = None,
            proxy_override: Optional[str] = None,
            public_data_endpoint_enabled: Optional[bool] = None,
            resource_group_name: Optional[str] = None,
            sku_name: Optional[str] = None,
            storage_account_type: Optional[str] = None,
            storage_size_in_gb: Optional[int] = None,
            subnet_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            timezone_id: Optional[str] = None,
            vcores: Optional[int] = None) -> ManagedInstance
    func GetManagedInstance(ctx *Context, name string, id IDInput, state *ManagedInstanceState, opts ...ResourceOption) (*ManagedInstance, error)
    public static ManagedInstance Get(string name, Input<string> id, ManagedInstanceState? state, CustomResourceOptions? opts = null)
    public static ManagedInstance get(String name, Output<String> id, ManagedInstanceState 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.
    The following state arguments are supported:
    AdministratorLogin string

    The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.

    AdministratorLoginPassword string

    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy

    Collation string

    Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created.

    DnsZonePartnerId string

    The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azure.sql.ManagedInstanceFailoverGroup. Setting this after creation forces a new resource to be created.

    Fqdn string

    The fully qualified domain name of the Azure Managed SQL Instance

    Identity ManagedInstanceIdentity

    An identity block as defined below.

    LicenseType string

    What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice.

    Location string

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    MaintenanceConfigurationName string

    The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default.

    MinimumTlsVersion string

    The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2.

    Name string

    The name of the SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.

    ProxyOverride string

    Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect.

    PublicDataEndpointEnabled bool

    Is the public data endpoint enabled? Default value is false.

    ResourceGroupName string

    The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.

    SkuName string

    Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH.

    StorageAccountType string

    Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS.

    StorageSizeInGb int

    Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).

    SubnetId string

    The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created.

    Tags Dictionary<string, string>

    A mapping of tags to assign to the resource.

    TimezoneId string

    The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created.

    Vcores int

    Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs.

    AdministratorLogin string

    The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.

    AdministratorLoginPassword string

    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy

    Collation string

    Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created.

    DnsZonePartnerId string

    The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azure.sql.ManagedInstanceFailoverGroup. Setting this after creation forces a new resource to be created.

    Fqdn string

    The fully qualified domain name of the Azure Managed SQL Instance

    Identity ManagedInstanceIdentityArgs

    An identity block as defined below.

    LicenseType string

    What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice.

    Location string

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    MaintenanceConfigurationName string

    The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default.

    MinimumTlsVersion string

    The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2.

    Name string

    The name of the SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.

    ProxyOverride string

    Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect.

    PublicDataEndpointEnabled bool

    Is the public data endpoint enabled? Default value is false.

    ResourceGroupName string

    The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.

    SkuName string

    Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH.

    StorageAccountType string

    Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS.

    StorageSizeInGb int

    Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).

    SubnetId string

    The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created.

    Tags map[string]string

    A mapping of tags to assign to the resource.

    TimezoneId string

    The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created.

    Vcores int

    Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs.

    administratorLogin String

    The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.

    administratorLoginPassword String

    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy

    collation String

    Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created.

    dnsZonePartnerId String

    The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azure.sql.ManagedInstanceFailoverGroup. Setting this after creation forces a new resource to be created.

    fqdn String

    The fully qualified domain name of the Azure Managed SQL Instance

    identity ManagedInstanceIdentity

    An identity block as defined below.

    licenseType String

    What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice.

    location String

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    maintenanceConfigurationName String

    The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default.

    minimumTlsVersion String

    The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2.

    name String

    The name of the SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.

    proxyOverride String

    Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect.

    publicDataEndpointEnabled Boolean

    Is the public data endpoint enabled? Default value is false.

    resourceGroupName String

    The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.

    skuName String

    Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH.

    storageAccountType String

    Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS.

    storageSizeInGb Integer

    Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).

    subnetId String

    The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created.

    tags Map<String,String>

    A mapping of tags to assign to the resource.

    timezoneId String

    The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created.

    vcores Integer

    Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs.

    administratorLogin string

    The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.

    administratorLoginPassword string

    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy

    collation string

    Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created.

    dnsZonePartnerId string

    The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azure.sql.ManagedInstanceFailoverGroup. Setting this after creation forces a new resource to be created.

    fqdn string

    The fully qualified domain name of the Azure Managed SQL Instance

    identity ManagedInstanceIdentity

    An identity block as defined below.

    licenseType string

    What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice.

    location string

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    maintenanceConfigurationName string

    The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default.

    minimumTlsVersion string

    The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2.

    name string

    The name of the SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.

    proxyOverride string

    Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect.

    publicDataEndpointEnabled boolean

    Is the public data endpoint enabled? Default value is false.

    resourceGroupName string

    The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.

    skuName string

    Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH.

    storageAccountType string

    Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS.

    storageSizeInGb number

    Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).

    subnetId string

    The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created.

    tags {[key: string]: string}

    A mapping of tags to assign to the resource.

    timezoneId string

    The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created.

    vcores number

    Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs.

    administrator_login str

    The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.

    administrator_login_password str

    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy

    collation str

    Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created.

    dns_zone_partner_id str

    The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azure.sql.ManagedInstanceFailoverGroup. Setting this after creation forces a new resource to be created.

    fqdn str

    The fully qualified domain name of the Azure Managed SQL Instance

    identity ManagedInstanceIdentityArgs

    An identity block as defined below.

    license_type str

    What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice.

    location str

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    maintenance_configuration_name str

    The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default.

    minimum_tls_version str

    The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2.

    name str

    The name of the SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.

    proxy_override str

    Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect.

    public_data_endpoint_enabled bool

    Is the public data endpoint enabled? Default value is false.

    resource_group_name str

    The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.

    sku_name str

    Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH.

    storage_account_type str

    Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS.

    storage_size_in_gb int

    Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).

    subnet_id str

    The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created.

    tags Mapping[str, str]

    A mapping of tags to assign to the resource.

    timezone_id str

    The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created.

    vcores int

    Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs.

    administratorLogin String

    The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.

    administratorLoginPassword String

    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy

    collation String

    Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created.

    dnsZonePartnerId String

    The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azure.sql.ManagedInstanceFailoverGroup. Setting this after creation forces a new resource to be created.

    fqdn String

    The fully qualified domain name of the Azure Managed SQL Instance

    identity Property Map

    An identity block as defined below.

    licenseType String

    What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice.

    location String

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    maintenanceConfigurationName String

    The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default.

    minimumTlsVersion String

    The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2.

    name String

    The name of the SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.

    proxyOverride String

    Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect.

    publicDataEndpointEnabled Boolean

    Is the public data endpoint enabled? Default value is false.

    resourceGroupName String

    The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.

    skuName String

    Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH.

    storageAccountType String

    Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS.

    storageSizeInGb Number

    Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).

    subnetId String

    The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created.

    tags Map<String>

    A mapping of tags to assign to the resource.

    timezoneId String

    The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created.

    vcores Number

    Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs.

    Supporting Types

    ManagedInstanceIdentity, ManagedInstanceIdentityArgs

    Type string

    Specifies the type of Managed Service Identity that should be configured on this SQL Managed Instance. Possible values are SystemAssigned, UserAssigned.

    IdentityIds List<string>

    Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Managed Instance. Required when type is set to UserAssigned.

    The assigned principal_id and tenant_id can be retrieved after the identity type has been set to SystemAssigned and SQL Managed Instance has been created.

    PrincipalId string

    The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.

    TenantId string

    The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.

    Type string

    Specifies the type of Managed Service Identity that should be configured on this SQL Managed Instance. Possible values are SystemAssigned, UserAssigned.

    IdentityIds []string

    Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Managed Instance. Required when type is set to UserAssigned.

    The assigned principal_id and tenant_id can be retrieved after the identity type has been set to SystemAssigned and SQL Managed Instance has been created.

    PrincipalId string

    The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.

    TenantId string

    The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.

    type String

    Specifies the type of Managed Service Identity that should be configured on this SQL Managed Instance. Possible values are SystemAssigned, UserAssigned.

    identityIds List<String>

    Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Managed Instance. Required when type is set to UserAssigned.

    The assigned principal_id and tenant_id can be retrieved after the identity type has been set to SystemAssigned and SQL Managed Instance has been created.

    principalId String

    The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.

    tenantId String

    The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.

    type string

    Specifies the type of Managed Service Identity that should be configured on this SQL Managed Instance. Possible values are SystemAssigned, UserAssigned.

    identityIds string[]

    Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Managed Instance. Required when type is set to UserAssigned.

    The assigned principal_id and tenant_id can be retrieved after the identity type has been set to SystemAssigned and SQL Managed Instance has been created.

    principalId string

    The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.

    tenantId string

    The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.

    type str

    Specifies the type of Managed Service Identity that should be configured on this SQL Managed Instance. Possible values are SystemAssigned, UserAssigned.

    identity_ids Sequence[str]

    Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Managed Instance. Required when type is set to UserAssigned.

    The assigned principal_id and tenant_id can be retrieved after the identity type has been set to SystemAssigned and SQL Managed Instance has been created.

    principal_id str

    The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.

    tenant_id str

    The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.

    type String

    Specifies the type of Managed Service Identity that should be configured on this SQL Managed Instance. Possible values are SystemAssigned, UserAssigned.

    identityIds List<String>

    Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Managed Instance. Required when type is set to UserAssigned.

    The assigned principal_id and tenant_id can be retrieved after the identity type has been set to SystemAssigned and SQL Managed Instance has been created.

    principalId String

    The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.

    tenantId String

    The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.

    Import

    Microsoft SQL Managed Instances can be imported using the resource id, e.g.

     $ pulumi import azure:mssql/managedInstance:ManagedInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/managedInstances/myserver
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the azurerm Terraform Provider.

    azure logo

    We recommend using Azure Native.

    Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi