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

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Use this data source to access information about an existing Microsoft SQL Azure Managed Instance.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var example = Output.Create(Azure.MSSql.GetManagedInstance.InvokeAsync(new Azure.MSSql.GetManagedInstanceArgs
            {
                Name = "managedsqlinstance",
                ResourceGroupName = azurerm_resource_group.Example.Name,
            }));
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/mssql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mssql.LookupManagedInstance(ctx, &mssql.LookupManagedInstanceArgs{
    			Name:              "managedsqlinstance",
    			ResourceGroupName: azurerm_resource_group.Example.Name,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.mssql.getManagedInstance({
        name: "managedsqlinstance",
        resourceGroupName: azurerm_resource_group.example.name,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.mssql.get_managed_instance(name="managedsqlinstance",
        resource_group_name=azurerm_resource_group["example"]["name"])
    

    Example coming soon!

    Using getManagedInstance

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getManagedInstance(args: GetManagedInstanceArgs, opts?: InvokeOptions): Promise<GetManagedInstanceResult>
    function getManagedInstanceOutput(args: GetManagedInstanceOutputArgs, opts?: InvokeOptions): Output<GetManagedInstanceResult>
    def get_managed_instance(name: Optional[str] = None,
                             resource_group_name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetManagedInstanceResult
    def get_managed_instance_output(name: Optional[pulumi.Input[str]] = None,
                             resource_group_name: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetManagedInstanceResult]
    func LookupManagedInstance(ctx *Context, args *LookupManagedInstanceArgs, opts ...InvokeOption) (*LookupManagedInstanceResult, error)
    func LookupManagedInstanceOutput(ctx *Context, args *LookupManagedInstanceOutputArgs, opts ...InvokeOption) LookupManagedInstanceResultOutput

    > Note: This function is named LookupManagedInstance in the Go SDK.

    public static class GetManagedInstance 
    {
        public static Task<GetManagedInstanceResult> InvokeAsync(GetManagedInstanceArgs args, InvokeOptions? opts = null)
        public static Output<GetManagedInstanceResult> Invoke(GetManagedInstanceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetManagedInstanceResult> getManagedInstance(GetManagedInstanceArgs args, InvokeOptions options)
    public static Output<GetManagedInstanceResult> getManagedInstance(GetManagedInstanceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:mssql/getManagedInstance:getManagedInstance
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the SQL Managed Instance.
    ResourceGroupName string
    The name of the resource group where the SQL Managed Instance exists.
    Name string
    The name of the SQL Managed Instance.
    ResourceGroupName string
    The name of the resource group where the SQL Managed Instance exists.
    name String
    The name of the SQL Managed Instance.
    resourceGroupName String
    The name of the resource group where the SQL Managed Instance exists.
    name string
    The name of the SQL Managed Instance.
    resourceGroupName string
    The name of the resource group where the SQL Managed Instance exists.
    name str
    The name of the SQL Managed Instance.
    resource_group_name str
    The name of the resource group where the SQL Managed Instance exists.
    name String
    The name of the SQL Managed Instance.
    resourceGroupName String
    The name of the resource group where the SQL Managed Instance exists.

    getManagedInstance Result

    The following output properties are available:

    AdministratorLogin string
    The administrator login name for the SQL Managed Instance.
    Collation string
    Specifies how the SQL Managed Instance will be collated.
    DnsZonePartnerId string
    The ID of the SQL Managed Instance which shares the DNS zone.
    Fqdn string
    The fully qualified domain name of the Azure Managed SQL Instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities List<GetManagedInstanceIdentity>
    An identity block as defined below.
    LicenseType string
    What type of license the SQL Managed Instance uses.
    Location string
    Specifies the supported Azure location where the resource exists.
    MinimumTlsVersion string
    The Minimum TLS Version.
    Name string
    ProxyOverride string
    Specifies how the SQL Managed Instance will be accessed.
    PublicDataEndpointEnabled bool
    Whether the public data endpoint is enabled.
    ResourceGroupName string
    SkuName string
    Specifies the SKU Name of the SQL Managed Instance.
    StorageAccountType string
    Specifies the storage account type used to store backups for this database.
    StorageSizeInGb int
    Maximum storage space allocated for the SQL Managed Instance.
    SubnetId string
    The subnet resource ID that the SQL Managed Instance is associated with.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the resource.
    TimezoneId string
    The TimeZone ID that the SQL Managed Instance is running in.
    Vcores int
    Number of cores that are assigned to the SQL Managed Instance.
    AdministratorLogin string
    The administrator login name for the SQL Managed Instance.
    Collation string
    Specifies how the SQL Managed Instance will be collated.
    DnsZonePartnerId string
    The ID of the SQL Managed Instance which shares the DNS zone.
    Fqdn string
    The fully qualified domain name of the Azure Managed SQL Instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities []GetManagedInstanceIdentity
    An identity block as defined below.
    LicenseType string
    What type of license the SQL Managed Instance uses.
    Location string
    Specifies the supported Azure location where the resource exists.
    MinimumTlsVersion string
    The Minimum TLS Version.
    Name string
    ProxyOverride string
    Specifies how the SQL Managed Instance will be accessed.
    PublicDataEndpointEnabled bool
    Whether the public data endpoint is enabled.
    ResourceGroupName string
    SkuName string
    Specifies the SKU Name of the SQL Managed Instance.
    StorageAccountType string
    Specifies the storage account type used to store backups for this database.
    StorageSizeInGb int
    Maximum storage space allocated for the SQL Managed Instance.
    SubnetId string
    The subnet resource ID that the SQL Managed Instance is associated with.
    Tags map[string]string
    A mapping of tags assigned to the resource.
    TimezoneId string
    The TimeZone ID that the SQL Managed Instance is running in.
    Vcores int
    Number of cores that are assigned to the SQL Managed Instance.
    administratorLogin String
    The administrator login name for the SQL Managed Instance.
    collation String
    Specifies how the SQL Managed Instance will be collated.
    dnsZonePartnerId String
    The ID of the SQL Managed Instance which shares the DNS zone.
    fqdn String
    The fully qualified domain name of the Azure Managed SQL Instance.
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<GetManagedInstanceIdentity>
    An identity block as defined below.
    licenseType String
    What type of license the SQL Managed Instance uses.
    location String
    Specifies the supported Azure location where the resource exists.
    minimumTlsVersion String
    The Minimum TLS Version.
    name String
    proxyOverride String
    Specifies how the SQL Managed Instance will be accessed.
    publicDataEndpointEnabled Boolean
    Whether the public data endpoint is enabled.
    resourceGroupName String
    skuName String
    Specifies the SKU Name of the SQL Managed Instance.
    storageAccountType String
    Specifies the storage account type used to store backups for this database.
    storageSizeInGb Integer
    Maximum storage space allocated for the SQL Managed Instance.
    subnetId String
    The subnet resource ID that the SQL Managed Instance is associated with.
    tags Map<String,String>
    A mapping of tags assigned to the resource.
    timezoneId String
    The TimeZone ID that the SQL Managed Instance is running in.
    vcores Integer
    Number of cores that are assigned to the SQL Managed Instance.
    administratorLogin string
    The administrator login name for the SQL Managed Instance.
    collation string
    Specifies how the SQL Managed Instance will be collated.
    dnsZonePartnerId string
    The ID of the SQL Managed Instance which shares the DNS zone.
    fqdn string
    The fully qualified domain name of the Azure Managed SQL Instance.
    id string
    The provider-assigned unique ID for this managed resource.
    identities GetManagedInstanceIdentity[]
    An identity block as defined below.
    licenseType string
    What type of license the SQL Managed Instance uses.
    location string
    Specifies the supported Azure location where the resource exists.
    minimumTlsVersion string
    The Minimum TLS Version.
    name string
    proxyOverride string
    Specifies how the SQL Managed Instance will be accessed.
    publicDataEndpointEnabled boolean
    Whether the public data endpoint is enabled.
    resourceGroupName string
    skuName string
    Specifies the SKU Name of the SQL Managed Instance.
    storageAccountType string
    Specifies the storage account type used to store backups for this database.
    storageSizeInGb number
    Maximum storage space allocated for the SQL Managed Instance.
    subnetId string
    The subnet resource ID that the SQL Managed Instance is associated with.
    tags {[key: string]: string}
    A mapping of tags assigned to the resource.
    timezoneId string
    The TimeZone ID that the SQL Managed Instance is running in.
    vcores number
    Number of cores that are assigned to the SQL Managed Instance.
    administrator_login str
    The administrator login name for the SQL Managed Instance.
    collation str
    Specifies how the SQL Managed Instance will be collated.
    dns_zone_partner_id str
    The ID of the SQL Managed Instance which shares the DNS zone.
    fqdn str
    The fully qualified domain name of the Azure Managed SQL Instance.
    id str
    The provider-assigned unique ID for this managed resource.
    identities Sequence[GetManagedInstanceIdentity]
    An identity block as defined below.
    license_type str
    What type of license the SQL Managed Instance uses.
    location str
    Specifies the supported Azure location where the resource exists.
    minimum_tls_version str
    The Minimum TLS Version.
    name str
    proxy_override str
    Specifies how the SQL Managed Instance will be accessed.
    public_data_endpoint_enabled bool
    Whether the public data endpoint is enabled.
    resource_group_name str
    sku_name str
    Specifies the SKU Name of the SQL Managed Instance.
    storage_account_type str
    Specifies the storage account type used to store backups for this database.
    storage_size_in_gb int
    Maximum storage space allocated for the SQL Managed Instance.
    subnet_id str
    The subnet resource ID that the SQL Managed Instance is associated with.
    tags Mapping[str, str]
    A mapping of tags assigned to the resource.
    timezone_id str
    The TimeZone ID that the SQL Managed Instance is running in.
    vcores int
    Number of cores that are assigned to the SQL Managed Instance.
    administratorLogin String
    The administrator login name for the SQL Managed Instance.
    collation String
    Specifies how the SQL Managed Instance will be collated.
    dnsZonePartnerId String
    The ID of the SQL Managed Instance which shares the DNS zone.
    fqdn String
    The fully qualified domain name of the Azure Managed SQL Instance.
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<Property Map>
    An identity block as defined below.
    licenseType String
    What type of license the SQL Managed Instance uses.
    location String
    Specifies the supported Azure location where the resource exists.
    minimumTlsVersion String
    The Minimum TLS Version.
    name String
    proxyOverride String
    Specifies how the SQL Managed Instance will be accessed.
    publicDataEndpointEnabled Boolean
    Whether the public data endpoint is enabled.
    resourceGroupName String
    skuName String
    Specifies the SKU Name of the SQL Managed Instance.
    storageAccountType String
    Specifies the storage account type used to store backups for this database.
    storageSizeInGb Number
    Maximum storage space allocated for the SQL Managed Instance.
    subnetId String
    The subnet resource ID that the SQL Managed Instance is associated with.
    tags Map<String>
    A mapping of tags assigned to the resource.
    timezoneId String
    The TimeZone ID that the SQL Managed Instance is running in.
    vcores Number
    Number of cores that are assigned to the SQL Managed Instance.

    Supporting Types

    GetManagedInstanceIdentity

    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
    The identity type of the SQL Managed Instance.
    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
    The identity type of the SQL Managed Instance.
    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
    The identity type of the SQL Managed Instance.
    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
    The identity type of the SQL Managed Instance.
    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 str
    The identity type of the SQL Managed Instance.
    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
    The identity type of the SQL Managed Instance.

    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.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.