We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Import
SQL Servers can be imported using the resource id, e.g.
$ pulumi import azure:sql/managedInstance:ManagedInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/managedInstances/myserver
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleNetworkSecurityGroup = new Azure.Network.NetworkSecurityGroup("exampleNetworkSecurityGroup", new Azure.Network.NetworkSecurityGroupArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
});
var allowManagementInbound = new Azure.Network.NetworkSecurityRule("allowManagementInbound", new Azure.Network.NetworkSecurityRuleArgs
{
Priority = 106,
Direction = "Inbound",
Access = "Allow",
Protocol = "Tcp",
SourcePortRange = "*",
DestinationPortRanges =
{
"9000",
"9003",
"1438",
"1440",
"1452",
},
SourceAddressPrefix = "*",
DestinationAddressPrefix = "*",
ResourceGroupName = exampleResourceGroup.Name,
NetworkSecurityGroupName = exampleNetworkSecurityGroup.Name,
});
var allowMisubnetInbound = new Azure.Network.NetworkSecurityRule("allowMisubnetInbound", new Azure.Network.NetworkSecurityRuleArgs
{
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 Azure.Network.NetworkSecurityRuleArgs
{
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 Azure.Network.NetworkSecurityRuleArgs
{
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 Azure.Network.NetworkSecurityRuleArgs
{
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 Azure.Network.NetworkSecurityRuleArgs
{
Priority = 102,
Direction = "Outbound",
Access = "Allow",
Protocol = "Tcp",
SourcePortRange = "*",
DestinationPortRanges =
{
"80",
"443",
"12000",
},
SourceAddressPrefix = "*",
DestinationAddressPrefix = "*",
ResourceGroupName = exampleResourceGroup.Name,
NetworkSecurityGroupName = exampleNetworkSecurityGroup.Name,
});
var allowMisubnetOutbound = new Azure.Network.NetworkSecurityRule("allowMisubnetOutbound", new Azure.Network.NetworkSecurityRuleArgs
{
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 Azure.Network.NetworkSecurityRuleArgs
{
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 Azure.Network.VirtualNetworkArgs
{
ResourceGroupName = exampleResourceGroup.Name,
AddressSpaces =
{
"10.0.0.0/16",
},
Location = exampleResourceGroup.Location,
});
var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new Azure.Network.SubnetArgs
{
ResourceGroupName = exampleResourceGroup.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefix = "10.0.0.0/24",
Delegations =
{
new Azure.Network.Inputs.SubnetDelegationArgs
{
Name = "managedinstancedelegation",
ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs
{
Name = "Microsoft.Sql/managedInstances",
Actions =
{
"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 Azure.Network.SubnetNetworkSecurityGroupAssociationArgs
{
SubnetId = exampleSubnet.Id,
NetworkSecurityGroupId = exampleNetworkSecurityGroup.Id,
});
var exampleRouteTable = new Azure.Network.RouteTable("exampleRouteTable", new Azure.Network.RouteTableArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
DisableBgpRoutePropagation = false,
}, new CustomResourceOptions
{
DependsOn =
{
exampleSubnet,
},
});
var exampleSubnetRouteTableAssociation = new Azure.Network.SubnetRouteTableAssociation("exampleSubnetRouteTableAssociation", new Azure.Network.SubnetRouteTableAssociationArgs
{
SubnetId = exampleSubnet.Id,
RouteTableId = exampleRouteTable.Id,
});
var exampleManagedInstance = new Azure.Sql.ManagedInstance("exampleManagedInstance", new Azure.Sql.ManagedInstanceArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AdministratorLogin = "mradministrator",
AdministratorLoginPassword = "thisIsDog11",
LicenseType = "BasePrice",
SubnetId = exampleSubnet.Id,
SkuName = "GP_Gen5",
Vcores = 4,
StorageSizeInGb = 32,
}, new CustomResourceOptions
{
DependsOn =
{
exampleSubnetNetworkSecurityGroupAssociation,
exampleSubnetRouteTableAssociation,
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/network"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql"
"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,
AddressPrefix: 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 = sql.NewManagedInstance(ctx, "exampleManagedInstance", &sql.ManagedInstanceArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
AdministratorLogin: pulumi.String("mradministrator"),
AdministratorLoginPassword: pulumi.String("thisIsDog11"),
LicenseType: pulumi.String("BasePrice"),
SubnetId: exampleSubnet.ID(),
SkuName: pulumi.String("GP_Gen5"),
Vcores: pulumi.Int(4),
StorageSizeInGb: pulumi.Int(32),
}, pulumi.DependsOn([]pulumi.Resource{
exampleSubnetNetworkSecurityGroupAssociation,
exampleSubnetRouteTableAssociation,
}))
if err != nil {
return err
}
return nil
})
}
Example coming soon!
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,
addressPrefix: "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.sql.ManagedInstance("exampleManagedInstance", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
administratorLogin: "mradministrator",
administratorLoginPassword: "thisIsDog11",
licenseType: "BasePrice",
subnetId: exampleSubnet.id,
skuName: "GP_Gen5",
vcores: 4,
storageSizeInGb: 32,
}, {
dependsOn: [
exampleSubnetNetworkSecurityGroupAssociation,
exampleSubnetRouteTableAssociation,
],
});
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_prefix="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.sql.ManagedInstance("exampleManagedInstance",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
administrator_login="mradministrator",
administrator_login_password="thisIsDog11",
license_type="BasePrice",
subnet_id=example_subnet.id,
sku_name="GP_Gen5",
vcores=4,
storage_size_in_gb=32,
opts=pulumi.ResourceOptions(depends_on=[
example_subnet_network_security_group_association,
example_subnet_route_table_association,
]))
Example coming soon!
Create ManagedInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ManagedInstance(name: string, args: ManagedInstanceArgs, opts?: CustomResourceOptions);@overload
def ManagedInstance(resource_name: str,
args: ManagedInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ManagedInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
administrator_login_password: Optional[str] = None,
vcores: Optional[int] = None,
subnet_id: Optional[str] = None,
administrator_login: Optional[str] = None,
license_type: Optional[str] = None,
storage_size_in_gb: Optional[int] = None,
sku_name: Optional[str] = None,
identity: Optional[ManagedInstanceIdentityArgs] = None,
proxy_override: Optional[str] = None,
public_data_endpoint_enabled: Optional[bool] = None,
name: Optional[str] = None,
minimum_tls_version: Optional[str] = None,
storage_account_type: Optional[str] = None,
location: Optional[str] = None,
dns_zone_partner_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timezone_id: Optional[str] = None,
collation: Optional[str] = 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:sql:ManagedInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var azureManagedInstanceResource = new Azure.Sql.ManagedInstance("azureManagedInstanceResource", new()
{
ResourceGroupName = "string",
AdministratorLoginPassword = "string",
Vcores = 0,
SubnetId = "string",
AdministratorLogin = "string",
LicenseType = "string",
StorageSizeInGb = 0,
SkuName = "string",
Identity = new Azure.Sql.Inputs.ManagedInstanceIdentityArgs
{
Type = "string",
PrincipalId = "string",
TenantId = "string",
},
ProxyOverride = "string",
PublicDataEndpointEnabled = false,
Name = "string",
MinimumTlsVersion = "string",
StorageAccountType = "string",
Location = "string",
DnsZonePartnerId = "string",
Tags =
{
{ "string", "string" },
},
TimezoneId = "string",
Collation = "string",
});
example, err := sql.NewManagedInstance(ctx, "azureManagedInstanceResource", &sql.ManagedInstanceArgs{
ResourceGroupName: pulumi.String("string"),
AdministratorLoginPassword: pulumi.String("string"),
Vcores: pulumi.Int(0),
SubnetId: pulumi.String("string"),
AdministratorLogin: pulumi.String("string"),
LicenseType: pulumi.String("string"),
StorageSizeInGb: pulumi.Int(0),
SkuName: pulumi.String("string"),
Identity: &sql.ManagedInstanceIdentityArgs{
Type: pulumi.String("string"),
PrincipalId: pulumi.String("string"),
TenantId: pulumi.String("string"),
},
ProxyOverride: pulumi.String("string"),
PublicDataEndpointEnabled: pulumi.Bool(false),
Name: pulumi.String("string"),
MinimumTlsVersion: pulumi.String("string"),
StorageAccountType: pulumi.String("string"),
Location: pulumi.String("string"),
DnsZonePartnerId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TimezoneId: pulumi.String("string"),
Collation: pulumi.String("string"),
})
var azureManagedInstanceResource = new com.pulumi.azure.sql.ManagedInstance("azureManagedInstanceResource", com.pulumi.azure.sql.ManagedInstanceArgs.builder()
.resourceGroupName("string")
.administratorLoginPassword("string")
.vcores(0)
.subnetId("string")
.administratorLogin("string")
.licenseType("string")
.storageSizeInGb(0)
.skuName("string")
.identity(ManagedInstanceIdentityArgs.builder()
.type("string")
.principalId("string")
.tenantId("string")
.build())
.proxyOverride("string")
.publicDataEndpointEnabled(false)
.name("string")
.minimumTlsVersion("string")
.storageAccountType("string")
.location("string")
.dnsZonePartnerId("string")
.tags(Map.of("string", "string"))
.timezoneId("string")
.collation("string")
.build());
azure_managed_instance_resource = azure.sql.ManagedInstance("azureManagedInstanceResource",
resource_group_name="string",
administrator_login_password="string",
vcores=0,
subnet_id="string",
administrator_login="string",
license_type="string",
storage_size_in_gb=0,
sku_name="string",
identity={
"type": "string",
"principal_id": "string",
"tenant_id": "string",
},
proxy_override="string",
public_data_endpoint_enabled=False,
name="string",
minimum_tls_version="string",
storage_account_type="string",
location="string",
dns_zone_partner_id="string",
tags={
"string": "string",
},
timezone_id="string",
collation="string")
const azureManagedInstanceResource = new azure.sql.ManagedInstance("azureManagedInstanceResource", {
resourceGroupName: "string",
administratorLoginPassword: "string",
vcores: 0,
subnetId: "string",
administratorLogin: "string",
licenseType: "string",
storageSizeInGb: 0,
skuName: "string",
identity: {
type: "string",
principalId: "string",
tenantId: "string",
},
proxyOverride: "string",
publicDataEndpointEnabled: false,
name: "string",
minimumTlsVersion: "string",
storageAccountType: "string",
location: "string",
dnsZonePartnerId: "string",
tags: {
string: "string",
},
timezoneId: "string",
collation: "string",
});
type: azure:sql:ManagedInstance
properties:
administratorLogin: string
administratorLoginPassword: string
collation: string
dnsZonePartnerId: string
identity:
principalId: string
tenantId: string
type: string
licenseType: string
location: string
minimumTlsVersion: string
name: string
proxyOverride: string
publicDataEndpointEnabled: false
resourceGroupName: string
skuName: string
storageAccountType: string
storageSizeInGb: 0
subnetId: string
tags:
string: string
timezoneId: string
vcores: 0
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ManagedInstance resource accepts the following input properties:
- Administrator
Login string - The administrator login name for the new server. Changing this forces a new resource to be created.
- Administrator
Login stringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - License
Type string - What type of license the Managed Instance will use. Valid values include can be
LicenseIncludedorBasePrice. - Resource
Group stringName - The name of the resource group in which to create the SQL Server.
- Sku
Name string - Specifies the SKU Name for the SQL Managed Instance. Valid values include
GP_Gen4,GP_Gen5,BC_Gen4,BC_Gen5. Changing this forces a new resource to be created. - Storage
Size intIn Gb - Maximum storage space for your instance. It should be a multiple of 32GB.
- Subnet
Id string - The subnet resource id that the SQL Managed Instance will be associated with.
- Vcores int
- Number of cores that should be assigned to your instance. Values can be
8,16, or24ifsku_nameisGP_Gen4, or8,16,24,32, or40ifsku_nameisGP_Gen5. - 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. - Dns
Zone stringPartner Id - The ID of the Managed Instance which will share the DNS zone. This is a prerequisite for creating a
azurerm_managed_instance_failover_group. Setting this after creation forces a new resource to be created. - Identity
Managed
Instance Identity - An
identityblock as defined below. - Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Minimum
Tls stringVersion - The Minimum TLS Version. Default value is
1.2Valid values include1.0,1.1,1.2. - Name string
- The name of the SQL Managed Instance. This needs to be globally unique within Azure.
- Proxy
Override string - Specifies how the SQL Managed Instance will be accessed. Default value is
Default. Valid values includeDefault,Proxy, andRedirect. - Public
Data boolEndpoint Enabled - Is the public data endpoint enabled? Default value is
false. - Storage
Account stringType - 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,LRSandZRS. The default value isGRS. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Timezone
Id 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 string - The administrator login name for the new server. Changing this forces a new resource to be created.
- Administrator
Login stringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - License
Type string - What type of license the Managed Instance will use. Valid values include can be
LicenseIncludedorBasePrice. - Resource
Group stringName - The name of the resource group in which to create the SQL Server.
- Sku
Name string - Specifies the SKU Name for the SQL Managed Instance. Valid values include
GP_Gen4,GP_Gen5,BC_Gen4,BC_Gen5. Changing this forces a new resource to be created. - Storage
Size intIn Gb - Maximum storage space for your instance. It should be a multiple of 32GB.
- Subnet
Id string - The subnet resource id that the SQL Managed Instance will be associated with.
- Vcores int
- Number of cores that should be assigned to your instance. Values can be
8,16, or24ifsku_nameisGP_Gen4, or8,16,24,32, or40ifsku_nameisGP_Gen5. - 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. - Dns
Zone stringPartner Id - The ID of the Managed Instance which will share the DNS zone. This is a prerequisite for creating a
azurerm_managed_instance_failover_group. Setting this after creation forces a new resource to be created. - Identity
Managed
Instance Identity Args - An
identityblock as defined below. - Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Minimum
Tls stringVersion - The Minimum TLS Version. Default value is
1.2Valid values include1.0,1.1,1.2. - Name string
- The name of the SQL Managed Instance. This needs to be globally unique within Azure.
- Proxy
Override string - Specifies how the SQL Managed Instance will be accessed. Default value is
Default. Valid values includeDefault,Proxy, andRedirect. - Public
Data boolEndpoint Enabled - Is the public data endpoint enabled? Default value is
false. - Storage
Account stringType - 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,LRSandZRS. The default value isGRS. - map[string]string
- A mapping of tags to assign to the resource.
- Timezone
Id 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 String - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator
Login StringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - license
Type String - What type of license the Managed Instance will use. Valid values include can be
LicenseIncludedorBasePrice. - resource
Group StringName - The name of the resource group in which to create the SQL Server.
- sku
Name String - Specifies the SKU Name for the SQL Managed Instance. Valid values include
GP_Gen4,GP_Gen5,BC_Gen4,BC_Gen5. Changing this forces a new resource to be created. - storage
Size IntegerIn Gb - Maximum storage space for your instance. It should be a multiple of 32GB.
- subnet
Id String - The subnet resource id that the SQL Managed Instance will be associated with.
- vcores Integer
- Number of cores that should be assigned to your instance. Values can be
8,16, or24ifsku_nameisGP_Gen4, or8,16,24,32, or40ifsku_nameisGP_Gen5. - 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. - dns
Zone StringPartner Id - The ID of the Managed Instance which will share the DNS zone. This is a prerequisite for creating a
azurerm_managed_instance_failover_group. Setting this after creation forces a new resource to be created. - identity
Managed
Instance Identity - An
identityblock as defined below. - location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- minimum
Tls StringVersion - The Minimum TLS Version. Default value is
1.2Valid values include1.0,1.1,1.2. - name String
- The name of the SQL Managed Instance. This needs to be globally unique within Azure.
- proxy
Override String - Specifies how the SQL Managed Instance will be accessed. Default value is
Default. Valid values includeDefault,Proxy, andRedirect. - public
Data BooleanEndpoint Enabled - Is the public data endpoint enabled? Default value is
false. - storage
Account StringType - 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,LRSandZRS. The default value isGRS. - Map<String,String>
- A mapping of tags to assign to the resource.
- timezone
Id 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 string - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator
Login stringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - license
Type string - What type of license the Managed Instance will use. Valid values include can be
LicenseIncludedorBasePrice. - resource
Group stringName - The name of the resource group in which to create the SQL Server.
- sku
Name string - Specifies the SKU Name for the SQL Managed Instance. Valid values include
GP_Gen4,GP_Gen5,BC_Gen4,BC_Gen5. Changing this forces a new resource to be created. - storage
Size numberIn Gb - Maximum storage space for your instance. It should be a multiple of 32GB.
- subnet
Id string - The subnet resource id that the SQL Managed Instance will be associated with.
- vcores number
- Number of cores that should be assigned to your instance. Values can be
8,16, or24ifsku_nameisGP_Gen4, or8,16,24,32, or40ifsku_nameisGP_Gen5. - 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. - dns
Zone stringPartner Id - The ID of the Managed Instance which will share the DNS zone. This is a prerequisite for creating a
azurerm_managed_instance_failover_group. Setting this after creation forces a new resource to be created. - identity
Managed
Instance Identity - An
identityblock as defined below. - location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- minimum
Tls stringVersion - The Minimum TLS Version. Default value is
1.2Valid values include1.0,1.1,1.2. - name string
- The name of the SQL Managed Instance. This needs to be globally unique within Azure.
- proxy
Override string - Specifies how the SQL Managed Instance will be accessed. Default value is
Default. Valid values includeDefault,Proxy, andRedirect. - public
Data booleanEndpoint Enabled - Is the public data endpoint enabled? Default value is
false. - storage
Account stringType - 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,LRSandZRS. The default value isGRS. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- timezone
Id 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 server. Changing this forces a new resource to be created.
- administrator_
login_ strpassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - license_
type str - What type of license the Managed Instance will use. Valid values include can be
LicenseIncludedorBasePrice. - resource_
group_ strname - The name of the resource group in which to create the SQL Server.
- sku_
name str - Specifies the SKU Name for the SQL Managed Instance. Valid values include
GP_Gen4,GP_Gen5,BC_Gen4,BC_Gen5. Changing this forces a new resource to be created. - storage_
size_ intin_ gb - Maximum storage space for your instance. It should be a multiple of 32GB.
- subnet_
id str - The subnet resource id that the SQL Managed Instance will be associated with.
- vcores int
- Number of cores that should be assigned to your instance. Values can be
8,16, or24ifsku_nameisGP_Gen4, or8,16,24,32, or40ifsku_nameisGP_Gen5. - 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_ strpartner_ id - The ID of the Managed Instance which will share the DNS zone. This is a prerequisite for creating a
azurerm_managed_instance_failover_group. Setting this after creation forces a new resource to be created. - identity
Managed
Instance Identity Args - An
identityblock as defined below. - location str
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- minimum_
tls_ strversion - The Minimum TLS Version. Default value is
1.2Valid values include1.0,1.1,1.2. - name str
- The name of the SQL Managed Instance. This needs to be globally unique within Azure.
- proxy_
override str - Specifies how the SQL Managed Instance will be accessed. Default value is
Default. Valid values includeDefault,Proxy, andRedirect. - public_
data_ boolendpoint_ enabled - Is the public data endpoint enabled? Default value is
false. - storage_
account_ strtype - 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,LRSandZRS. The default value isGRS. - 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.
- administrator
Login String - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator
Login StringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - license
Type String - What type of license the Managed Instance will use. Valid values include can be
LicenseIncludedorBasePrice. - resource
Group StringName - The name of the resource group in which to create the SQL Server.
- sku
Name String - Specifies the SKU Name for the SQL Managed Instance. Valid values include
GP_Gen4,GP_Gen5,BC_Gen4,BC_Gen5. Changing this forces a new resource to be created. - storage
Size NumberIn Gb - Maximum storage space for your instance. It should be a multiple of 32GB.
- subnet
Id String - The subnet resource id that the SQL Managed Instance will be associated with.
- vcores Number
- Number of cores that should be assigned to your instance. Values can be
8,16, or24ifsku_nameisGP_Gen4, or8,16,24,32, or40ifsku_nameisGP_Gen5. - 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. - dns
Zone StringPartner Id - The ID of the Managed Instance which will share the DNS zone. This is a prerequisite for creating a
azurerm_managed_instance_failover_group. Setting this after creation forces a new resource to be created. - identity Property Map
- An
identityblock as defined below. - location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- minimum
Tls StringVersion - The Minimum TLS Version. Default value is
1.2Valid values include1.0,1.1,1.2. - name String
- The name of the SQL Managed Instance. This needs to be globally unique within Azure.
- proxy
Override String - Specifies how the SQL Managed Instance will be accessed. Default value is
Default. Valid values includeDefault,Proxy, andRedirect. - public
Data BooleanEndpoint Enabled - Is the public data endpoint enabled? Default value is
false. - storage
Account StringType - 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,LRSandZRS. The default value isGRS. - Map<String>
- A mapping of tags to assign to the resource.
- timezone
Id 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:
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,
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) -> ManagedInstancefunc 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)resources: _: type: azure:sql:ManagedInstance get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Administrator
Login string - The administrator login name for the new server. Changing this forces a new resource to be created.
- Administrator
Login stringPassword - The password associated with the
administrator_loginuser. 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. - Dns
Zone stringPartner Id - The ID of the Managed Instance which will share the DNS zone. This is a prerequisite for creating a
azurerm_managed_instance_failover_group. 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
Managed
Instance Identity - An
identityblock as defined below. - License
Type string - What type of license the Managed Instance will use. Valid values include can be
LicenseIncludedorBasePrice. - Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Minimum
Tls stringVersion - The Minimum TLS Version. Default value is
1.2Valid values include1.0,1.1,1.2. - Name string
- The name of the SQL Managed Instance. This needs to be globally unique within Azure.
- Proxy
Override string - Specifies how the SQL Managed Instance will be accessed. Default value is
Default. Valid values includeDefault,Proxy, andRedirect. - Public
Data boolEndpoint Enabled - Is the public data endpoint enabled? Default value is
false. - Resource
Group stringName - The name of the resource group in which to create the SQL Server.
- Sku
Name string - Specifies the SKU Name for the SQL Managed Instance. Valid values include
GP_Gen4,GP_Gen5,BC_Gen4,BC_Gen5. Changing this forces a new resource to be created. - Storage
Account stringType - 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,LRSandZRS. The default value isGRS. - Storage
Size intIn Gb - Maximum storage space for your instance. It should be a multiple of 32GB.
- Subnet
Id string - The subnet resource id that the SQL Managed Instance will be associated with.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Timezone
Id 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 your instance. Values can be
8,16, or24ifsku_nameisGP_Gen4, or8,16,24,32, or40ifsku_nameisGP_Gen5.
- Administrator
Login string - The administrator login name for the new server. Changing this forces a new resource to be created.
- Administrator
Login stringPassword - The password associated with the
administrator_loginuser. 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. - Dns
Zone stringPartner Id - The ID of the Managed Instance which will share the DNS zone. This is a prerequisite for creating a
azurerm_managed_instance_failover_group. 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
Managed
Instance Identity Args - An
identityblock as defined below. - License
Type string - What type of license the Managed Instance will use. Valid values include can be
LicenseIncludedorBasePrice. - Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Minimum
Tls stringVersion - The Minimum TLS Version. Default value is
1.2Valid values include1.0,1.1,1.2. - Name string
- The name of the SQL Managed Instance. This needs to be globally unique within Azure.
- Proxy
Override string - Specifies how the SQL Managed Instance will be accessed. Default value is
Default. Valid values includeDefault,Proxy, andRedirect. - Public
Data boolEndpoint Enabled - Is the public data endpoint enabled? Default value is
false. - Resource
Group stringName - The name of the resource group in which to create the SQL Server.
- Sku
Name string - Specifies the SKU Name for the SQL Managed Instance. Valid values include
GP_Gen4,GP_Gen5,BC_Gen4,BC_Gen5. Changing this forces a new resource to be created. - Storage
Account stringType - 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,LRSandZRS. The default value isGRS. - Storage
Size intIn Gb - Maximum storage space for your instance. It should be a multiple of 32GB.
- Subnet
Id string - The subnet resource id that the SQL Managed Instance will be associated with.
- map[string]string
- A mapping of tags to assign to the resource.
- Timezone
Id 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 your instance. Values can be
8,16, or24ifsku_nameisGP_Gen4, or8,16,24,32, or40ifsku_nameisGP_Gen5.
- administrator
Login String - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator
Login StringPassword - The password associated with the
administrator_loginuser. 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. - dns
Zone StringPartner Id - The ID of the Managed Instance which will share the DNS zone. This is a prerequisite for creating a
azurerm_managed_instance_failover_group. 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
Managed
Instance Identity - An
identityblock as defined below. - license
Type String - What type of license the Managed Instance will use. Valid values include can be
LicenseIncludedorBasePrice. - location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- minimum
Tls StringVersion - The Minimum TLS Version. Default value is
1.2Valid values include1.0,1.1,1.2. - name String
- The name of the SQL Managed Instance. This needs to be globally unique within Azure.
- proxy
Override String - Specifies how the SQL Managed Instance will be accessed. Default value is
Default. Valid values includeDefault,Proxy, andRedirect. - public
Data BooleanEndpoint Enabled - Is the public data endpoint enabled? Default value is
false. - resource
Group StringName - The name of the resource group in which to create the SQL Server.
- sku
Name String - Specifies the SKU Name for the SQL Managed Instance. Valid values include
GP_Gen4,GP_Gen5,BC_Gen4,BC_Gen5. Changing this forces a new resource to be created. - storage
Account StringType - 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,LRSandZRS. The default value isGRS. - storage
Size IntegerIn Gb - Maximum storage space for your instance. It should be a multiple of 32GB.
- subnet
Id String - The subnet resource id that the SQL Managed Instance will be associated with.
- Map<String,String>
- A mapping of tags to assign to the resource.
- timezone
Id 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 your instance. Values can be
8,16, or24ifsku_nameisGP_Gen4, or8,16,24,32, or40ifsku_nameisGP_Gen5.
- administrator
Login string - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator
Login stringPassword - The password associated with the
administrator_loginuser. 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. - dns
Zone stringPartner Id - The ID of the Managed Instance which will share the DNS zone. This is a prerequisite for creating a
azurerm_managed_instance_failover_group. 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
Managed
Instance Identity - An
identityblock as defined below. - license
Type string - What type of license the Managed Instance will use. Valid values include can be
LicenseIncludedorBasePrice. - location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- minimum
Tls stringVersion - The Minimum TLS Version. Default value is
1.2Valid values include1.0,1.1,1.2. - name string
- The name of the SQL Managed Instance. This needs to be globally unique within Azure.
- proxy
Override string - Specifies how the SQL Managed Instance will be accessed. Default value is
Default. Valid values includeDefault,Proxy, andRedirect. - public
Data booleanEndpoint Enabled - Is the public data endpoint enabled? Default value is
false. - resource
Group stringName - The name of the resource group in which to create the SQL Server.
- sku
Name string - Specifies the SKU Name for the SQL Managed Instance. Valid values include
GP_Gen4,GP_Gen5,BC_Gen4,BC_Gen5. Changing this forces a new resource to be created. - storage
Account stringType - 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,LRSandZRS. The default value isGRS. - storage
Size numberIn Gb - Maximum storage space for your instance. It should be a multiple of 32GB.
- subnet
Id string - The subnet resource id that the SQL Managed Instance will be associated with.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- timezone
Id 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 your instance. Values can be
8,16, or24ifsku_nameisGP_Gen4, or8,16,24,32, or40ifsku_nameisGP_Gen5.
- administrator_
login str - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator_
login_ strpassword - The password associated with the
administrator_loginuser. 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_ strpartner_ id - The ID of the Managed Instance which will share the DNS zone. This is a prerequisite for creating a
azurerm_managed_instance_failover_group. 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
Managed
Instance Identity Args - An
identityblock as defined below. - license_
type str - What type of license the Managed Instance will use. Valid values include can be
LicenseIncludedorBasePrice. - location str
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- minimum_
tls_ strversion - The Minimum TLS Version. Default value is
1.2Valid values include1.0,1.1,1.2. - name str
- The name of the SQL Managed Instance. This needs to be globally unique within Azure.
- proxy_
override str - Specifies how the SQL Managed Instance will be accessed. Default value is
Default. Valid values includeDefault,Proxy, andRedirect. - public_
data_ boolendpoint_ enabled - Is the public data endpoint enabled? Default value is
false. - resource_
group_ strname - The name of the resource group in which to create the SQL Server.
- sku_
name str - Specifies the SKU Name for the SQL Managed Instance. Valid values include
GP_Gen4,GP_Gen5,BC_Gen4,BC_Gen5. Changing this forces a new resource to be created. - storage_
account_ strtype - 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,LRSandZRS. The default value isGRS. - storage_
size_ intin_ gb - Maximum storage space for your instance. It should be a multiple of 32GB.
- subnet_
id str - The subnet resource id that the SQL Managed Instance will be associated with.
- 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 your instance. Values can be
8,16, or24ifsku_nameisGP_Gen4, or8,16,24,32, or40ifsku_nameisGP_Gen5.
- administrator
Login String - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator
Login StringPassword - The password associated with the
administrator_loginuser. 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. - dns
Zone StringPartner Id - The ID of the Managed Instance which will share the DNS zone. This is a prerequisite for creating a
azurerm_managed_instance_failover_group. 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
identityblock as defined below. - license
Type String - What type of license the Managed Instance will use. Valid values include can be
LicenseIncludedorBasePrice. - location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- minimum
Tls StringVersion - The Minimum TLS Version. Default value is
1.2Valid values include1.0,1.1,1.2. - name String
- The name of the SQL Managed Instance. This needs to be globally unique within Azure.
- proxy
Override String - Specifies how the SQL Managed Instance will be accessed. Default value is
Default. Valid values includeDefault,Proxy, andRedirect. - public
Data BooleanEndpoint Enabled - Is the public data endpoint enabled? Default value is
false. - resource
Group StringName - The name of the resource group in which to create the SQL Server.
- sku
Name String - Specifies the SKU Name for the SQL Managed Instance. Valid values include
GP_Gen4,GP_Gen5,BC_Gen4,BC_Gen5. Changing this forces a new resource to be created. - storage
Account StringType - 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,LRSandZRS. The default value isGRS. - storage
Size NumberIn Gb - Maximum storage space for your instance. It should be a multiple of 32GB.
- subnet
Id String - The subnet resource id that the SQL Managed Instance will be associated with.
- Map<String>
- A mapping of tags to assign to the resource.
- timezone
Id 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 your instance. Values can be
8,16, or24ifsku_nameisGP_Gen4, or8,16,24,32, or40ifsku_nameisGP_Gen5.
Supporting Types
ManagedInstanceIdentity, ManagedInstanceIdentityArgs
- Type string
- The identity type of the SQL Managed Instance. Only possible values is
SystemAssigned. - Principal
Id string - The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.
- Tenant
Id string - The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.
- Type string
- The identity type of the SQL Managed Instance. Only possible values is
SystemAssigned. - Principal
Id string - The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.
- Tenant
Id string - The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.
- type String
- The identity type of the SQL Managed Instance. Only possible values is
SystemAssigned. - principal
Id String - The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.
- tenant
Id String - The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.
- type string
- The identity type of the SQL Managed Instance. Only possible values is
SystemAssigned. - principal
Id string - The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.
- tenant
Id string - The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.
- type str
- The identity type of the SQL Managed Instance. Only possible values is
SystemAssigned. - 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
- The identity type of the SQL Managed Instance. Only possible values is
SystemAssigned. - principal
Id String - The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.
- tenant
Id String - The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
