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

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.mssql.getManagedInstance

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

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,
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.mssql.get_managed_instance(name="managedsqlinstance",
    resource_group_name=example_azurerm_resource_group["name"])
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:mssql:getManagedInstance
      arguments:
        name: managedsqlinstance
        resourceGroupName: ${exampleAzurermResourceGroup.name}
Copy

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>
Copy
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]
Copy
func LookupManagedInstance(ctx *Context, args *LookupManagedInstanceArgs, opts ...InvokeOption) (*LookupManagedInstanceResult, error)
func LookupManagedInstanceOutput(ctx *Context, args *LookupManagedInstanceOutputArgs, opts ...InvokeOption) LookupManagedInstanceResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetManagedInstanceResult> getManagedInstance(GetManagedInstanceArgs args, InvokeOptions options)
public static Output<GetManagedInstanceResult> getManagedInstance(GetManagedInstanceArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:mssql/getManagedInstance:getManagedInstance
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the SQL Managed Instance.
ResourceGroupName This property is required. string
The name of the resource group where the SQL Managed Instance exists.
Name This property is required. string
The name of the SQL Managed Instance.
ResourceGroupName This property is required. string
The name of the resource group where the SQL Managed Instance exists.
name This property is required. String
The name of the SQL Managed Instance.
resourceGroupName This property is required. String
The name of the resource group where the SQL Managed Instance exists.
name This property is required. string
The name of the SQL Managed Instance.
resourceGroupName This property is required. string
The name of the resource group where the SQL Managed Instance exists.
name This property is required. str
The name of the SQL Managed Instance.
resource_group_name This property is required. str
The name of the resource group where the SQL Managed Instance exists.
name This property is required. String
The name of the SQL Managed Instance.
resourceGroupName This property is required. 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.
CustomerManagedKeyId string
DnsZone string
The Dns Zone where the SQL Managed Instance is located.
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.
CustomerManagedKeyId string
DnsZone string
The Dns Zone where the SQL Managed Instance is located.
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.
customerManagedKeyId String
dnsZone String
The Dns Zone where the SQL Managed Instance is located.
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.
customerManagedKeyId string
dnsZone string
The Dns Zone where the SQL Managed Instance is located.
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.
customer_managed_key_id str
dns_zone str
The Dns Zone where the SQL Managed Instance is located.
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.
customerManagedKeyId String
dnsZone String
The Dns Zone where the SQL Managed Instance is located.
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

IdentityIds This property is required. List<string>
A list of User Assigned Managed Identity IDs assigned with the Identity of this SQL Managed Instance.
PrincipalId This property is required. string
The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.
TenantId This property is required. string
The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.
Type This property is required. string
The identity type of the SQL Managed Instance.
IdentityIds This property is required. []string
A list of User Assigned Managed Identity IDs assigned with the Identity of this SQL Managed Instance.
PrincipalId This property is required. string
The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.
TenantId This property is required. string
The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.
Type This property is required. string
The identity type of the SQL Managed Instance.
identityIds This property is required. List<String>
A list of User Assigned Managed Identity IDs assigned with the Identity of this SQL Managed Instance.
principalId This property is required. String
The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.
tenantId This property is required. String
The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.
type This property is required. String
The identity type of the SQL Managed Instance.
identityIds This property is required. string[]
A list of User Assigned Managed Identity IDs assigned with the Identity of this SQL Managed Instance.
principalId This property is required. string
The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.
tenantId This property is required. string
The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.
type This property is required. string
The identity type of the SQL Managed Instance.
identity_ids This property is required. Sequence[str]
A list of User Assigned Managed Identity IDs assigned with the Identity of this SQL Managed Instance.
principal_id This property is required. str
The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.
tenant_id This property is required. str
The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.
type This property is required. str
The identity type of the SQL Managed Instance.
identityIds This property is required. List<String>
A list of User Assigned Managed Identity IDs assigned with the Identity of this SQL Managed Instance.
principalId This property is required. String
The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance.
tenantId This property is required. String
The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance.
type This property is required. 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.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi