1. Packages
  2. Azure Classic
  3. API Docs
  4. sql
  5. getSqlManagedInstance

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

    Attribues Reference

    • id - The SQL Managed Instance ID.

    • fqdn - The fully qualified domain name of the Azure Managed SQL Instance.

    • location - Location where the resource exists.

    • sku_name - SKU Name for the SQL Managed Instance.

    • vcores - Number of cores assigned to your instance.

    • storage_size_in_gb - Maximum storage space for your instance.

    • license_type - Type of license the Managed Instance uses.

    • administrator_login - The administrator login name for the new server.

    • subnet_id - The subnet resource id that the SQL Managed Instance is associated with.

    • collation - Specifies how the SQL Managed Instance is collated.

    • public_data_endpoint_enabled - Is the public data endpoint enabled?

    • minimum_tls_version - The Minimum TLS Version.

    • proxy_override - How the SQL Managed Instance is accessed.

    • timezone_id - The TimeZone ID that the SQL Managed Instance is operating in.

    • dns_zone_partner_id - The ID of the Managed Instance which is sharing the DNS zone.

    • identity - An identity block as defined below.

    • storage_account_type - Storage account type used to store backups for this SQL Managed Instance.

    • tags - A mapping of tags assigned to the resource.


    The identity block exports the following:

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

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

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var example = Output.Create(Azure.Sql.GetSqlManagedInstance.InvokeAsync(new Azure.Sql.GetSqlManagedInstanceArgs
            {
                Name = "example_mi",
                ResourceGroupName = "example-resources",
            }));
            this.SqlInstanceId = example.Apply(example => example.Id);
        }
    
        [Output("sqlInstanceId")]
        public Output<string> SqlInstanceId { get; set; }
    }
    
    package main
    
    import (
    	"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 {
    		example, err := sql.GetSqlManagedInstance(ctx, &sql.GetSqlManagedInstanceArgs{
    			Name:              "example_mi",
    			ResourceGroupName: "example-resources",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("sqlInstanceId", example.Id)
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.sql.getSqlManagedInstance({
        name: "example_mi",
        resourceGroupName: "example-resources",
    });
    export const sqlInstanceId = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.sql.get_sql_managed_instance(name="example_mi",
        resource_group_name="example-resources")
    pulumi.export("sqlInstanceId", example.id)
    

    Example coming soon!

    Using getSqlManagedInstance

    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 getSqlManagedInstance(args: GetSqlManagedInstanceArgs, opts?: InvokeOptions): Promise<GetSqlManagedInstanceResult>
    function getSqlManagedInstanceOutput(args: GetSqlManagedInstanceOutputArgs, opts?: InvokeOptions): Output<GetSqlManagedInstanceResult>
    def get_sql_managed_instance(name: Optional[str] = None,
                                 resource_group_name: Optional[str] = None,
                                 tags: Optional[Mapping[str, str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetSqlManagedInstanceResult
    def get_sql_managed_instance_output(name: Optional[pulumi.Input[str]] = None,
                                 resource_group_name: Optional[pulumi.Input[str]] = None,
                                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetSqlManagedInstanceResult]
    func GetSqlManagedInstance(ctx *Context, args *GetSqlManagedInstanceArgs, opts ...InvokeOption) (*GetSqlManagedInstanceResult, error)
    func GetSqlManagedInstanceOutput(ctx *Context, args *GetSqlManagedInstanceOutputArgs, opts ...InvokeOption) GetSqlManagedInstanceResultOutput

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

    public static class GetSqlManagedInstance 
    {
        public static Task<GetSqlManagedInstanceResult> InvokeAsync(GetSqlManagedInstanceArgs args, InvokeOptions? opts = null)
        public static Output<GetSqlManagedInstanceResult> Invoke(GetSqlManagedInstanceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSqlManagedInstanceResult> getSqlManagedInstance(GetSqlManagedInstanceArgs args, InvokeOptions options)
    public static Output<GetSqlManagedInstanceResult> getSqlManagedInstance(GetSqlManagedInstanceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:sql/getSqlManagedInstance:getSqlManagedInstance
      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 in which the SQL Managed Instance exists.
    Tags Dictionary<string, string>
    Name string
    The name of the SQL Managed Instance.
    ResourceGroupName string
    The name of the Resource Group in which the SQL Managed Instance exists.
    Tags map[string]string
    name String
    The name of the SQL Managed Instance.
    resourceGroupName String
    The name of the Resource Group in which the SQL Managed Instance exists.
    tags Map<String,String>
    name string
    The name of the SQL Managed Instance.
    resourceGroupName string
    The name of the Resource Group in which the SQL Managed Instance exists.
    tags {[key: string]: string}
    name str
    The name of the SQL Managed Instance.
    resource_group_name str
    The name of the Resource Group in which the SQL Managed Instance exists.
    tags Mapping[str, str]
    name String
    The name of the SQL Managed Instance.
    resourceGroupName String
    The name of the Resource Group in which the SQL Managed Instance exists.
    tags Map<String>

    getSqlManagedInstance Result

    The following output properties are available:

    AdministratorLogin string
    Collation string
    DnsZonePartnerId string
    Fqdn string
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities List<GetSqlManagedInstanceIdentity>
    LicenseType string
    Location string
    MinimumTlsVersion string
    Name string
    ProxyOverride string
    PublicDataEndpointEnabled bool
    ResourceGroupName string
    SkuName string
    StorageAccountType string
    StorageSizeInGb int
    SubnetId string
    TimezoneId string
    Vcores int
    Tags Dictionary<string, string>
    AdministratorLogin string
    Collation string
    DnsZonePartnerId string
    Fqdn string
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities []GetSqlManagedInstanceIdentity
    LicenseType string
    Location string
    MinimumTlsVersion string
    Name string
    ProxyOverride string
    PublicDataEndpointEnabled bool
    ResourceGroupName string
    SkuName string
    StorageAccountType string
    StorageSizeInGb int
    SubnetId string
    TimezoneId string
    Vcores int
    Tags map[string]string
    administratorLogin String
    collation String
    dnsZonePartnerId String
    fqdn String
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<GetSqlManagedInstanceIdentity>
    licenseType String
    location String
    minimumTlsVersion String
    name String
    proxyOverride String
    publicDataEndpointEnabled Boolean
    resourceGroupName String
    skuName String
    storageAccountType String
    storageSizeInGb Integer
    subnetId String
    timezoneId String
    vcores Integer
    tags Map<String,String>
    administratorLogin string
    collation string
    dnsZonePartnerId string
    fqdn string
    id string
    The provider-assigned unique ID for this managed resource.
    identities GetSqlManagedInstanceIdentity[]
    licenseType string
    location string
    minimumTlsVersion string
    name string
    proxyOverride string
    publicDataEndpointEnabled boolean
    resourceGroupName string
    skuName string
    storageAccountType string
    storageSizeInGb number
    subnetId string
    timezoneId string
    vcores number
    tags {[key: string]: string}
    administratorLogin String
    collation String
    dnsZonePartnerId String
    fqdn String
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<Property Map>
    licenseType String
    location String
    minimumTlsVersion String
    name String
    proxyOverride String
    publicDataEndpointEnabled Boolean
    resourceGroupName String
    skuName String
    storageAccountType String
    storageSizeInGb Number
    subnetId String
    timezoneId String
    vcores Number
    tags Map<String>

    Supporting Types

    GetSqlManagedInstanceIdentity

    PrincipalId string
    TenantId string
    Type string
    PrincipalId string
    TenantId string
    Type string
    principalId String
    tenantId String
    type String
    principalId string
    tenantId string
    type string
    principalId String
    tenantId String
    type String

    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.