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

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

azure.mssql.ManagedInstanceActiveDirectoryAdministrator

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

    Allows you to set a user, group or service principal as the AAD Administrator for an Azure SQL Managed Instance.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    using AzureAD = Pulumi.AzureAD;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
        {
            Location = "West Europe",
        });
    
        var current = Azure.Core.GetClientConfig.Invoke();
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new()
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
        });
    
        var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            VirtualNetworkName = exampleVirtualNetwork.Name,
            AddressPrefixes = new[]
            {
                "10.0.2.0/24",
            },
        });
    
        var exampleManagedInstance = new Azure.MSSql.ManagedInstance("exampleManagedInstance", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            LicenseType = "BasePrice",
            SkuName = "GP_Gen5",
            StorageSizeInGb = 32,
            SubnetId = exampleSubnet.Id,
            Vcores = 4,
            AdministratorLogin = "msadministrator",
            AdministratorLoginPassword = "thisIsDog11",
            Identity = new Azure.MSSql.Inputs.ManagedInstanceIdentityArgs
            {
                Type = "SystemAssigned",
            },
        });
    
        var reader = new AzureAD.DirectoryRole("reader", new()
        {
            DisplayName = "Directory Readers",
        });
    
        var exampleDirectoryRoleMember = new AzureAD.DirectoryRoleMember("exampleDirectoryRoleMember", new()
        {
            RoleObjectId = reader.ObjectId,
            MemberObjectId = exampleManagedInstance.Identity.Apply(identity => identity?.PrincipalId),
        });
    
        var admin = new AzureAD.User("admin", new()
        {
            UserPrincipalName = "ms.admin@hashicorp.com",
            DisplayName = "Ms Admin",
            MailNickname = "ms.admin",
            Password = "SecretP@sswd99!",
        });
    
        var exampleManagedInstanceActiveDirectoryAdministrator = new Azure.MSSql.ManagedInstanceActiveDirectoryAdministrator("exampleManagedInstanceActiveDirectoryAdministrator", new()
        {
            ManagedInstanceId = exampleManagedInstance.Id,
            LoginUsername = "msadmin",
            ObjectId = admin.ObjectId,
            TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mssql"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		current, err := core.GetClientConfig(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
    			ResourceGroupName:  exampleResourceGroup.Name,
    			VirtualNetworkName: exampleVirtualNetwork.Name,
    			AddressPrefixes: pulumi.StringArray{
    				pulumi.String("10.0.2.0/24"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleManagedInstance, err := mssql.NewManagedInstance(ctx, "exampleManagedInstance", &mssql.ManagedInstanceArgs{
    			ResourceGroupName:          exampleResourceGroup.Name,
    			Location:                   exampleResourceGroup.Location,
    			LicenseType:                pulumi.String("BasePrice"),
    			SkuName:                    pulumi.String("GP_Gen5"),
    			StorageSizeInGb:            pulumi.Int(32),
    			SubnetId:                   exampleSubnet.ID(),
    			Vcores:                     pulumi.Int(4),
    			AdministratorLogin:         pulumi.String("msadministrator"),
    			AdministratorLoginPassword: pulumi.String("thisIsDog11"),
    			Identity: &mssql.ManagedInstanceIdentityArgs{
    				Type: pulumi.String("SystemAssigned"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		reader, err := azuread.NewDirectoryRole(ctx, "reader", &azuread.DirectoryRoleArgs{
    			DisplayName: pulumi.String("Directory Readers"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuread.NewDirectoryRoleMember(ctx, "exampleDirectoryRoleMember", &azuread.DirectoryRoleMemberArgs{
    			RoleObjectId: reader.ObjectId,
    			MemberObjectId: exampleManagedInstance.Identity.ApplyT(func(identity mssql.ManagedInstanceIdentity) (*string, error) {
    				return &identity.PrincipalId, nil
    			}).(pulumi.StringPtrOutput),
    		})
    		if err != nil {
    			return err
    		}
    		admin, err := azuread.NewUser(ctx, "admin", &azuread.UserArgs{
    			UserPrincipalName: pulumi.String("ms.admin@hashicorp.com"),
    			DisplayName:       pulumi.String("Ms Admin"),
    			MailNickname:      pulumi.String("ms.admin"),
    			Password:          pulumi.String("SecretP@sswd99!"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mssql.NewManagedInstanceActiveDirectoryAdministrator(ctx, "exampleManagedInstanceActiveDirectoryAdministrator", &mssql.ManagedInstanceActiveDirectoryAdministratorArgs{
    			ManagedInstanceId: exampleManagedInstance.ID(),
    			LoginUsername:     pulumi.String("msadmin"),
    			ObjectId:          admin.ObjectId,
    			TenantId:          *pulumi.String(current.TenantId),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.core.CoreFunctions;
    import com.pulumi.azure.network.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.network.Subnet;
    import com.pulumi.azure.network.SubnetArgs;
    import com.pulumi.azure.mssql.ManagedInstance;
    import com.pulumi.azure.mssql.ManagedInstanceArgs;
    import com.pulumi.azure.mssql.inputs.ManagedInstanceIdentityArgs;
    import com.pulumi.azuread.DirectoryRole;
    import com.pulumi.azuread.DirectoryRoleArgs;
    import com.pulumi.azuread.DirectoryRoleMember;
    import com.pulumi.azuread.DirectoryRoleMemberArgs;
    import com.pulumi.azuread.User;
    import com.pulumi.azuread.UserArgs;
    import com.pulumi.azure.mssql.ManagedInstanceActiveDirectoryAdministrator;
    import com.pulumi.azure.mssql.ManagedInstanceActiveDirectoryAdministratorArgs;
    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) {
            var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
                .location("West Europe")
                .build());
    
            final var current = CoreFunctions.getClientConfig();
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()        
                .location(exampleResourceGroup.location())
                .resourceGroupName(exampleResourceGroup.name())
                .addressSpaces("10.0.0.0/16")
                .build());
    
            var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .virtualNetworkName(exampleVirtualNetwork.name())
                .addressPrefixes("10.0.2.0/24")
                .build());
    
            var exampleManagedInstance = new ManagedInstance("exampleManagedInstance", ManagedInstanceArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .location(exampleResourceGroup.location())
                .licenseType("BasePrice")
                .skuName("GP_Gen5")
                .storageSizeInGb(32)
                .subnetId(exampleSubnet.id())
                .vcores(4)
                .administratorLogin("msadministrator")
                .administratorLoginPassword("thisIsDog11")
                .identity(ManagedInstanceIdentityArgs.builder()
                    .type("SystemAssigned")
                    .build())
                .build());
    
            var reader = new DirectoryRole("reader", DirectoryRoleArgs.builder()        
                .displayName("Directory Readers")
                .build());
    
            var exampleDirectoryRoleMember = new DirectoryRoleMember("exampleDirectoryRoleMember", DirectoryRoleMemberArgs.builder()        
                .roleObjectId(reader.objectId())
                .memberObjectId(exampleManagedInstance.identity().applyValue(identity -> identity.principalId()))
                .build());
    
            var admin = new User("admin", UserArgs.builder()        
                .userPrincipalName("ms.admin@hashicorp.com")
                .displayName("Ms Admin")
                .mailNickname("ms.admin")
                .password("SecretP@sswd99!")
                .build());
    
            var exampleManagedInstanceActiveDirectoryAdministrator = new ManagedInstanceActiveDirectoryAdministrator("exampleManagedInstanceActiveDirectoryAdministrator", ManagedInstanceActiveDirectoryAdministratorArgs.builder()        
                .managedInstanceId(exampleManagedInstance.id())
                .loginUsername("msadmin")
                .objectId(admin.objectId())
                .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    import pulumi_azuread as azuread
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    current = azure.core.get_client_config()
    example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        address_spaces=["10.0.0.0/16"])
    example_subnet = azure.network.Subnet("exampleSubnet",
        resource_group_name=example_resource_group.name,
        virtual_network_name=example_virtual_network.name,
        address_prefixes=["10.0.2.0/24"])
    example_managed_instance = azure.mssql.ManagedInstance("exampleManagedInstance",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        license_type="BasePrice",
        sku_name="GP_Gen5",
        storage_size_in_gb=32,
        subnet_id=example_subnet.id,
        vcores=4,
        administrator_login="msadministrator",
        administrator_login_password="thisIsDog11",
        identity=azure.mssql.ManagedInstanceIdentityArgs(
            type="SystemAssigned",
        ))
    reader = azuread.DirectoryRole("reader", display_name="Directory Readers")
    example_directory_role_member = azuread.DirectoryRoleMember("exampleDirectoryRoleMember",
        role_object_id=reader.object_id,
        member_object_id=example_managed_instance.identity.principal_id)
    admin = azuread.User("admin",
        user_principal_name="ms.admin@hashicorp.com",
        display_name="Ms Admin",
        mail_nickname="ms.admin",
        password="SecretP@sswd99!")
    example_managed_instance_active_directory_administrator = azure.mssql.ManagedInstanceActiveDirectoryAdministrator("exampleManagedInstanceActiveDirectoryAdministrator",
        managed_instance_id=example_managed_instance.id,
        login_username="msadmin",
        object_id=admin.object_id,
        tenant_id=current.tenant_id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * as azuread from "@pulumi/azuread";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const current = azure.core.getClientConfig({});
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        addressSpaces: ["10.0.0.0/16"],
    });
    const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
        resourceGroupName: exampleResourceGroup.name,
        virtualNetworkName: exampleVirtualNetwork.name,
        addressPrefixes: ["10.0.2.0/24"],
    });
    const exampleManagedInstance = new azure.mssql.ManagedInstance("exampleManagedInstance", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        licenseType: "BasePrice",
        skuName: "GP_Gen5",
        storageSizeInGb: 32,
        subnetId: exampleSubnet.id,
        vcores: 4,
        administratorLogin: "msadministrator",
        administratorLoginPassword: "thisIsDog11",
        identity: {
            type: "SystemAssigned",
        },
    });
    const reader = new azuread.DirectoryRole("reader", {displayName: "Directory Readers"});
    const exampleDirectoryRoleMember = new azuread.DirectoryRoleMember("exampleDirectoryRoleMember", {
        roleObjectId: reader.objectId,
        memberObjectId: exampleManagedInstance.identity.apply(identity => identity?.principalId),
    });
    const admin = new azuread.User("admin", {
        userPrincipalName: "ms.admin@hashicorp.com",
        displayName: "Ms Admin",
        mailNickname: "ms.admin",
        password: "SecretP@sswd99!",
    });
    const exampleManagedInstanceActiveDirectoryAdministrator = new azure.mssql.ManagedInstanceActiveDirectoryAdministrator("exampleManagedInstanceActiveDirectoryAdministrator", {
        managedInstanceId: exampleManagedInstance.id,
        loginUsername: "msadmin",
        objectId: admin.objectId,
        tenantId: current.then(current => current.tenantId),
    });
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        properties:
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
          addressSpaces:
            - 10.0.0.0/16
      exampleSubnet:
        type: azure:network:Subnet
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          virtualNetworkName: ${exampleVirtualNetwork.name}
          addressPrefixes:
            - 10.0.2.0/24
      exampleManagedInstance:
        type: azure:mssql:ManagedInstance
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          location: ${exampleResourceGroup.location}
          licenseType: BasePrice
          skuName: GP_Gen5
          storageSizeInGb: 32
          subnetId: ${exampleSubnet.id}
          vcores: 4
          administratorLogin: msadministrator
          administratorLoginPassword: thisIsDog11
          identity:
            type: SystemAssigned
      reader:
        type: azuread:DirectoryRole
        properties:
          displayName: Directory Readers
      exampleDirectoryRoleMember:
        type: azuread:DirectoryRoleMember
        properties:
          roleObjectId: ${reader.objectId}
          memberObjectId: ${exampleManagedInstance.identity.principalId}
      admin:
        type: azuread:User
        properties:
          userPrincipalName: ms.admin@hashicorp.com
          displayName: Ms Admin
          mailNickname: ms.admin
          password: SecretP@sswd99!
      exampleManagedInstanceActiveDirectoryAdministrator:
        type: azure:mssql:ManagedInstanceActiveDirectoryAdministrator
        properties:
          managedInstanceId: ${exampleManagedInstance.id}
          loginUsername: msadmin
          objectId: ${admin.objectId}
          tenantId: ${current.tenantId}
    variables:
      current:
        fn::invoke:
          Function: azure:core:getClientConfig
          Arguments: {}
    

    Create ManagedInstanceActiveDirectoryAdministrator Resource

    new ManagedInstanceActiveDirectoryAdministrator(name: string, args: ManagedInstanceActiveDirectoryAdministratorArgs, opts?: CustomResourceOptions);
    @overload
    def ManagedInstanceActiveDirectoryAdministrator(resource_name: str,
                                                    opts: Optional[ResourceOptions] = None,
                                                    azuread_authentication_only: Optional[bool] = None,
                                                    login_username: Optional[str] = None,
                                                    managed_instance_id: Optional[str] = None,
                                                    object_id: Optional[str] = None,
                                                    tenant_id: Optional[str] = None)
    @overload
    def ManagedInstanceActiveDirectoryAdministrator(resource_name: str,
                                                    args: ManagedInstanceActiveDirectoryAdministratorArgs,
                                                    opts: Optional[ResourceOptions] = None)
    func NewManagedInstanceActiveDirectoryAdministrator(ctx *Context, name string, args ManagedInstanceActiveDirectoryAdministratorArgs, opts ...ResourceOption) (*ManagedInstanceActiveDirectoryAdministrator, error)
    public ManagedInstanceActiveDirectoryAdministrator(string name, ManagedInstanceActiveDirectoryAdministratorArgs args, CustomResourceOptions? opts = null)
    public ManagedInstanceActiveDirectoryAdministrator(String name, ManagedInstanceActiveDirectoryAdministratorArgs args)
    public ManagedInstanceActiveDirectoryAdministrator(String name, ManagedInstanceActiveDirectoryAdministratorArgs args, CustomResourceOptions options)
    
    type: azure:mssql:ManagedInstanceActiveDirectoryAdministrator
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ManagedInstanceActiveDirectoryAdministratorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ManagedInstanceActiveDirectoryAdministratorArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ManagedInstanceActiveDirectoryAdministratorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ManagedInstanceActiveDirectoryAdministratorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ManagedInstanceActiveDirectoryAdministratorArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ManagedInstanceActiveDirectoryAdministrator Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ManagedInstanceActiveDirectoryAdministrator resource accepts the following input properties:

    LoginUsername string

    The login name of the principal to set as the Managed Instance Administrator.

    ManagedInstanceId string

    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.

    ObjectId string

    The Object ID of the principal to set as the Managed Instance Administrator.

    TenantId string

    The Azure Active Directory Tenant ID.

    AzureadAuthenticationOnly bool

    When true, only permit logins from AAD users and administrators. When false, also allow local database users.

    LoginUsername string

    The login name of the principal to set as the Managed Instance Administrator.

    ManagedInstanceId string

    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.

    ObjectId string

    The Object ID of the principal to set as the Managed Instance Administrator.

    TenantId string

    The Azure Active Directory Tenant ID.

    AzureadAuthenticationOnly bool

    When true, only permit logins from AAD users and administrators. When false, also allow local database users.

    loginUsername String

    The login name of the principal to set as the Managed Instance Administrator.

    managedInstanceId String

    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.

    objectId String

    The Object ID of the principal to set as the Managed Instance Administrator.

    tenantId String

    The Azure Active Directory Tenant ID.

    azureadAuthenticationOnly Boolean

    When true, only permit logins from AAD users and administrators. When false, also allow local database users.

    loginUsername string

    The login name of the principal to set as the Managed Instance Administrator.

    managedInstanceId string

    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.

    objectId string

    The Object ID of the principal to set as the Managed Instance Administrator.

    tenantId string

    The Azure Active Directory Tenant ID.

    azureadAuthenticationOnly boolean

    When true, only permit logins from AAD users and administrators. When false, also allow local database users.

    login_username str

    The login name of the principal to set as the Managed Instance Administrator.

    managed_instance_id str

    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.

    object_id str

    The Object ID of the principal to set as the Managed Instance Administrator.

    tenant_id str

    The Azure Active Directory Tenant ID.

    azuread_authentication_only bool

    When true, only permit logins from AAD users and administrators. When false, also allow local database users.

    loginUsername String

    The login name of the principal to set as the Managed Instance Administrator.

    managedInstanceId String

    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.

    objectId String

    The Object ID of the principal to set as the Managed Instance Administrator.

    tenantId String

    The Azure Active Directory Tenant ID.

    azureadAuthenticationOnly Boolean

    When true, only permit logins from AAD users and administrators. When false, also allow local database users.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ManagedInstanceActiveDirectoryAdministrator resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing ManagedInstanceActiveDirectoryAdministrator Resource

    Get an existing ManagedInstanceActiveDirectoryAdministrator resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ManagedInstanceActiveDirectoryAdministratorState, opts?: CustomResourceOptions): ManagedInstanceActiveDirectoryAdministrator
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            azuread_authentication_only: Optional[bool] = None,
            login_username: Optional[str] = None,
            managed_instance_id: Optional[str] = None,
            object_id: Optional[str] = None,
            tenant_id: Optional[str] = None) -> ManagedInstanceActiveDirectoryAdministrator
    func GetManagedInstanceActiveDirectoryAdministrator(ctx *Context, name string, id IDInput, state *ManagedInstanceActiveDirectoryAdministratorState, opts ...ResourceOption) (*ManagedInstanceActiveDirectoryAdministrator, error)
    public static ManagedInstanceActiveDirectoryAdministrator Get(string name, Input<string> id, ManagedInstanceActiveDirectoryAdministratorState? state, CustomResourceOptions? opts = null)
    public static ManagedInstanceActiveDirectoryAdministrator get(String name, Output<String> id, ManagedInstanceActiveDirectoryAdministratorState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AzureadAuthenticationOnly bool

    When true, only permit logins from AAD users and administrators. When false, also allow local database users.

    LoginUsername string

    The login name of the principal to set as the Managed Instance Administrator.

    ManagedInstanceId string

    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.

    ObjectId string

    The Object ID of the principal to set as the Managed Instance Administrator.

    TenantId string

    The Azure Active Directory Tenant ID.

    AzureadAuthenticationOnly bool

    When true, only permit logins from AAD users and administrators. When false, also allow local database users.

    LoginUsername string

    The login name of the principal to set as the Managed Instance Administrator.

    ManagedInstanceId string

    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.

    ObjectId string

    The Object ID of the principal to set as the Managed Instance Administrator.

    TenantId string

    The Azure Active Directory Tenant ID.

    azureadAuthenticationOnly Boolean

    When true, only permit logins from AAD users and administrators. When false, also allow local database users.

    loginUsername String

    The login name of the principal to set as the Managed Instance Administrator.

    managedInstanceId String

    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.

    objectId String

    The Object ID of the principal to set as the Managed Instance Administrator.

    tenantId String

    The Azure Active Directory Tenant ID.

    azureadAuthenticationOnly boolean

    When true, only permit logins from AAD users and administrators. When false, also allow local database users.

    loginUsername string

    The login name of the principal to set as the Managed Instance Administrator.

    managedInstanceId string

    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.

    objectId string

    The Object ID of the principal to set as the Managed Instance Administrator.

    tenantId string

    The Azure Active Directory Tenant ID.

    azuread_authentication_only bool

    When true, only permit logins from AAD users and administrators. When false, also allow local database users.

    login_username str

    The login name of the principal to set as the Managed Instance Administrator.

    managed_instance_id str

    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.

    object_id str

    The Object ID of the principal to set as the Managed Instance Administrator.

    tenant_id str

    The Azure Active Directory Tenant ID.

    azureadAuthenticationOnly Boolean

    When true, only permit logins from AAD users and administrators. When false, also allow local database users.

    loginUsername String

    The login name of the principal to set as the Managed Instance Administrator.

    managedInstanceId String

    The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.

    objectId String

    The Object ID of the principal to set as the Managed Instance Administrator.

    tenantId String

    The Azure Active Directory Tenant ID.

    Import

    An Azure SQL Active Directory Administrator can be imported using the resource id, e.g.

     $ pulumi import azure:mssql/managedInstanceActiveDirectoryAdministrator:ManagedInstanceActiveDirectoryAdministrator administrator /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/managedInstances/mymanagedinstance/administrators/activeDirectory
    

    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.

    Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi