We recommend using Azure Native.
Azure v6.28.0 published on Friday, Oct 3, 2025 by Pulumi
azure.mssql.getManagedInstance
Start a Neo task
Explain and create an azure.mssql.getManagedInstance resource
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}
API Providers
This data source uses the following Azure API Providers:
Microsoft.Sql- 2023-08-01-preview
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.
- Resource
Group stringName - The name of the resource group where the SQL Managed Instance exists.
- Name string
- The name of the SQL Managed Instance.
- Resource
Group stringName - The name of the resource group where the SQL Managed Instance exists.
- name String
- The name of the SQL Managed Instance.
- resource
Group StringName - The name of the resource group where the SQL Managed Instance exists.
- name string
- The name of the SQL Managed Instance.
- resource
Group 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.
- resource
Group StringName - The name of the resource group where the SQL Managed Instance exists.
getManagedInstance Result
The following output properties are available:
- Administrator
Login string - The administrator login name for the SQL Managed Instance.
- Collation string
- Specifies how the SQL Managed Instance will be collated.
- Customer
Managed stringKey Id - Dns
Zone string - The Dns Zone where the SQL Managed Instance is located.
- Dns
Zone 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<Get
Managed Instance Identity> - An
identityblock as defined below. - License
Type string - What type of license the SQL Managed Instance uses.
- Location string
- Specifies the supported Azure location where the resource exists.
- Minimum
Tls stringVersion - The Minimum TLS Version.
- Name string
- Proxy
Override string - Specifies how the SQL Managed Instance will be accessed.
- Public
Data boolEndpoint Enabled - Whether the public data endpoint is enabled.
- Resource
Group stringName - Sku
Name string - Specifies the SKU Name of the SQL Managed Instance.
- Storage
Account stringType - 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 string - The subnet resource ID that the SQL Managed Instance is associated with.
- Dictionary<string, string>
- A mapping of tags assigned to the resource.
- Timezone
Id 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.
- Administrator
Login string - The administrator login name for the SQL Managed Instance.
- Collation string
- Specifies how the SQL Managed Instance will be collated.
- Customer
Managed stringKey Id - Dns
Zone string - The Dns Zone where the SQL Managed Instance is located.
- Dns
Zone 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
[]Get
Managed Instance Identity - An
identityblock as defined below. - License
Type string - What type of license the SQL Managed Instance uses.
- Location string
- Specifies the supported Azure location where the resource exists.
- Minimum
Tls stringVersion - The Minimum TLS Version.
- Name string
- Proxy
Override string - Specifies how the SQL Managed Instance will be accessed.
- Public
Data boolEndpoint Enabled - Whether the public data endpoint is enabled.
- Resource
Group stringName - Sku
Name string - Specifies the SKU Name of the SQL Managed Instance.
- Storage
Account stringType - 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 string - The subnet resource ID that the SQL Managed Instance is associated with.
- map[string]string
- A mapping of tags assigned to the resource.
- Timezone
Id 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.
- administrator
Login String - The administrator login name for the SQL Managed Instance.
- collation String
- Specifies how the SQL Managed Instance will be collated.
- customer
Managed StringKey Id - dns
Zone String - The Dns Zone where the SQL Managed Instance is located.
- dns
Zone 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<Get
Managed Instance Identity> - An
identityblock as defined below. - license
Type String - What type of license the SQL Managed Instance uses.
- location String
- Specifies the supported Azure location where the resource exists.
- minimum
Tls StringVersion - The Minimum TLS Version.
- name String
- proxy
Override String - Specifies how the SQL Managed Instance will be accessed.
- public
Data BooleanEndpoint Enabled - Whether the public data endpoint is enabled.
- resource
Group StringName - sku
Name String - Specifies the SKU Name of the SQL Managed Instance.
- storage
Account StringType - Specifies the storage account type used to store backups for this database.
- storage
Size IntegerIn Gb - Maximum storage space allocated for the SQL Managed Instance.
- subnet
Id String - The subnet resource ID that the SQL Managed Instance is associated with.
- Map<String,String>
- A mapping of tags assigned to the resource.
- timezone
Id 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.
- administrator
Login string - The administrator login name for the SQL Managed Instance.
- collation string
- Specifies how the SQL Managed Instance will be collated.
- customer
Managed stringKey Id - dns
Zone string - The Dns Zone where the SQL Managed Instance is located.
- dns
Zone 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
Get
Managed Instance Identity[] - An
identityblock as defined below. - license
Type string - What type of license the SQL Managed Instance uses.
- location string
- Specifies the supported Azure location where the resource exists.
- minimum
Tls stringVersion - The Minimum TLS Version.
- name string
- proxy
Override string - Specifies how the SQL Managed Instance will be accessed.
- public
Data booleanEndpoint Enabled - Whether the public data endpoint is enabled.
- resource
Group stringName - sku
Name string - Specifies the SKU Name of the SQL Managed Instance.
- storage
Account stringType - Specifies the storage account type used to store backups for this database.
- storage
Size numberIn Gb - Maximum storage space allocated for the SQL Managed Instance.
- subnet
Id string - The subnet resource ID that the SQL Managed Instance is associated with.
- {[key: string]: string}
- A mapping of tags assigned to the resource.
- timezone
Id 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[Get
Managed 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.
- administrator
Login String - The administrator login name for the SQL Managed Instance.
- collation String
- Specifies how the SQL Managed Instance will be collated.
- customer
Managed StringKey Id - dns
Zone String - The Dns Zone where the SQL Managed Instance is located.
- dns
Zone 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. - license
Type String - What type of license the SQL Managed Instance uses.
- location String
- Specifies the supported Azure location where the resource exists.
- minimum
Tls StringVersion - The Minimum TLS Version.
- name String
- proxy
Override String - Specifies how the SQL Managed Instance will be accessed.
- public
Data BooleanEndpoint Enabled - Whether the public data endpoint is enabled.
- resource
Group StringName - sku
Name String - Specifies the SKU Name of the SQL Managed Instance.
- storage
Account StringType - Specifies the storage account type used to store backups for this database.
- storage
Size NumberIn Gb - Maximum storage space allocated for the SQL Managed Instance.
- subnet
Id String - The subnet resource ID that the SQL Managed Instance is associated with.
- Map<String>
- A mapping of tags assigned to the resource.
- timezone
Id 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
- Identity
Ids List<string> - A list of User Assigned Managed Identity IDs assigned with the Identity of this SQL Managed Instance.
- 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.
- Identity
Ids []string - A list of User Assigned Managed Identity IDs assigned with the Identity of this SQL Managed Instance.
- 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.
- identity
Ids List<String> - A list of User Assigned Managed Identity IDs assigned with the Identity of this SQL Managed Instance.
- 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.
- identity
Ids string[] - A list of User Assigned Managed Identity IDs assigned with the Identity of this SQL Managed Instance.
- 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.
- 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.
- identity
Ids List<String> - A list of User Assigned Managed Identity IDs assigned with the Identity of this SQL Managed Instance.
- 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.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
