We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.mssql.getManagedInstance
Explore with Pulumi AI
Use this data source to access information about an existing Microsoft SQL Azure Managed Instance.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.mssql.getManagedInstance({
    name: "managedsqlinstance",
    resourceGroupName: exampleAzurermResourceGroup.name,
});
import pulumi
import pulumi_azure as azure
example = azure.mssql.get_managed_instance(name="managedsqlinstance",
    resource_group_name=example_azurerm_resource_group["name"])
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/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: exampleAzurermResourceGroup.Name,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.MSSql.GetManagedInstance.Invoke(new()
    {
        Name = "managedsqlinstance",
        ResourceGroupName = exampleAzurermResourceGroup.Name,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.mssql.MssqlFunctions;
import com.pulumi.azure.mssql.inputs.GetManagedInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var example = MssqlFunctions.getManagedInstance(GetManagedInstanceArgs.builder()
            .name("managedsqlinstance")
            .resourceGroupName(exampleAzurermResourceGroup.name())
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: azure:mssql:getManagedInstance
      arguments:
        name: managedsqlinstance
        resourceGroupName: ${exampleAzurermResourceGroup.name}
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 dictionaryThe following arguments are supported:
- Name string
- The name of the SQL Managed Instance.
- ResourceGroup stringName 
- The name of the resource group where the SQL Managed Instance exists.
- Name string
- The name of the SQL Managed Instance.
- ResourceGroup stringName 
- The name of the resource group where the SQL Managed Instance exists.
- name String
- The name of the SQL Managed Instance.
- resourceGroup StringName 
- The name of the resource group where the SQL Managed Instance exists.
- name string
- The name of the SQL Managed Instance.
- resourceGroup stringName 
- The name of the resource group where the SQL Managed Instance exists.
- name str
- The name of the SQL Managed Instance.
- resource_group_ strname 
- The name of the resource group where the SQL Managed Instance exists.
- name String
- The name of the SQL Managed Instance.
- resourceGroup StringName 
- 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.
- CustomerManaged stringKey Id 
- DnsZone string
- The Dns Zone where the SQL Managed Instance is located.
- DnsZone stringPartner Id 
- 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<GetManaged Instance Identity> 
- An identityblock 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.
- MinimumTls stringVersion 
- The Minimum TLS Version.
- Name string
- ProxyOverride string
- Specifies how the SQL Managed Instance will be accessed.
- PublicData boolEndpoint Enabled 
- Whether the public data endpoint is enabled.
- ResourceGroup stringName 
- SkuName string
- Specifies the SKU Name of the SQL Managed Instance.
- StorageAccount stringType 
- Specifies the storage account type used to store backups for this database.
- StorageSize intIn Gb 
- Maximum storage space allocated for the SQL Managed Instance.
- SubnetId string
- The subnet resource ID that the SQL Managed Instance is associated with.
- 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.
- CustomerManaged stringKey Id 
- DnsZone string
- The Dns Zone where the SQL Managed Instance is located.
- DnsZone stringPartner Id 
- 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
[]GetManaged Instance Identity 
- An identityblock 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.
- MinimumTls stringVersion 
- The Minimum TLS Version.
- Name string
- ProxyOverride string
- Specifies how the SQL Managed Instance will be accessed.
- PublicData boolEndpoint Enabled 
- Whether the public data endpoint is enabled.
- ResourceGroup stringName 
- SkuName string
- Specifies the SKU Name of the SQL Managed Instance.
- StorageAccount stringType 
- Specifies the storage account type used to store backups for this database.
- StorageSize intIn Gb 
- Maximum storage space allocated for the SQL Managed Instance.
- SubnetId string
- The subnet resource ID that the SQL Managed Instance is associated with.
- 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.
- customerManaged StringKey Id 
- dnsZone String
- The Dns Zone where the SQL Managed Instance is located.
- dnsZone StringPartner Id 
- 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<GetManaged Instance Identity> 
- An identityblock 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.
- minimumTls StringVersion 
- The Minimum TLS Version.
- name String
- proxyOverride String
- Specifies how the SQL Managed Instance will be accessed.
- publicData BooleanEndpoint Enabled 
- Whether the public data endpoint is enabled.
- resourceGroup StringName 
- skuName String
- Specifies the SKU Name of the SQL Managed Instance.
- storageAccount StringType 
- Specifies the storage account type used to store backups for this database.
- storageSize IntegerIn Gb 
- Maximum storage space allocated for the SQL Managed Instance.
- subnetId String
- The subnet resource ID that the SQL Managed Instance is associated with.
- 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.
- customerManaged stringKey Id 
- dnsZone string
- The Dns Zone where the SQL Managed Instance is located.
- dnsZone stringPartner Id 
- 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
GetManaged Instance Identity[] 
- An identityblock 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.
- minimumTls stringVersion 
- The Minimum TLS Version.
- name string
- proxyOverride string
- Specifies how the SQL Managed Instance will be accessed.
- publicData booleanEndpoint Enabled 
- Whether the public data endpoint is enabled.
- resourceGroup stringName 
- skuName string
- Specifies the SKU Name of the SQL Managed Instance.
- storageAccount stringType 
- Specifies the storage account type used to store backups for this database.
- storageSize numberIn Gb 
- Maximum storage space allocated for the SQL Managed Instance.
- subnetId string
- The subnet resource ID that the SQL Managed Instance is associated with.
- {[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.
- customer_managed_ strkey_ id 
- dns_zone str
- The Dns Zone where the SQL Managed Instance is located.
- dns_zone_ strpartner_ id 
- 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[GetManaged Instance Identity] 
- An identityblock 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_ strversion 
- The Minimum TLS Version.
- name str
- proxy_override str
- Specifies how the SQL Managed Instance will be accessed.
- public_data_ boolendpoint_ enabled 
- Whether the public data endpoint is enabled.
- resource_group_ strname 
- sku_name str
- Specifies the SKU Name of the SQL Managed Instance.
- storage_account_ strtype 
- Specifies the storage account type used to store backups for this database.
- storage_size_ intin_ gb 
- Maximum storage space allocated for the SQL Managed Instance.
- subnet_id str
- The subnet resource ID that the SQL Managed Instance is associated with.
- 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.
- customerManaged StringKey Id 
- dnsZone String
- The Dns Zone where the SQL Managed Instance is located.
- dnsZone StringPartner Id 
- 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 identityblock 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.
- minimumTls StringVersion 
- The Minimum TLS Version.
- name String
- proxyOverride String
- Specifies how the SQL Managed Instance will be accessed.
- publicData BooleanEndpoint Enabled 
- Whether the public data endpoint is enabled.
- resourceGroup StringName 
- skuName String
- Specifies the SKU Name of the SQL Managed Instance.
- storageAccount StringType 
- Specifies the storage account type used to store backups for this database.
- storageSize NumberIn Gb 
- Maximum storage space allocated for the SQL Managed Instance.
- subnetId String
- The subnet resource ID that the SQL Managed Instance is associated with.
- 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   
- IdentityIds List<string>
- A list of User Assigned Managed Identity IDs assigned with the Identity of this 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.
- IdentityIds []string
- A list of User Assigned Managed Identity IDs assigned with the Identity of this 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.
- identityIds List<String>
- A list of User Assigned Managed Identity IDs assigned with the Identity of this 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.
- identityIds string[]
- A list of User Assigned Managed Identity IDs assigned with the Identity of this 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.
- identity_ids Sequence[str]
- A list of User Assigned Managed Identity IDs assigned with the Identity of this 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.
- identityIds List<String>
- A list of User Assigned Managed Identity IDs assigned with the Identity of this 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 azurermTerraform Provider.