Class ActiveDirectoryAdministrator
Allows you to set a user or group as the AD administrator for an Azure SQL server
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var current = Output.Create(Azure.Core.GetClientConfig.InvokeAsync());
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West US",
});
var exampleSqlServer = new Azure.Sql.SqlServer("exampleSqlServer", new Azure.Sql.SqlServerArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
Version = "12.0",
AdministratorLogin = "4dm1n157r470r",
AdministratorLoginPassword = "4-v3ry-53cr37-p455w0rd",
});
var exampleActiveDirectoryAdministrator = new Azure.Sql.ActiveDirectoryAdministrator("exampleActiveDirectoryAdministrator", new Azure.Sql.ActiveDirectoryAdministratorArgs
{
ServerName = exampleSqlServer.Name,
ResourceGroupName = exampleResourceGroup.Name,
Login = "sqladmin",
TenantId = current.Apply(current => current.TenantId),
ObjectId = current.Apply(current => current.ObjectId),
});
}
}
Inherited Members
Namespace: Pulumi.Azure.Sql
Assembly: Pulumi.Azure.dll
Syntax
public class ActiveDirectoryAdministrator : CustomResource
Constructors
View SourceActiveDirectoryAdministrator(String, ActiveDirectoryAdministratorArgs, CustomResourceOptions)
Create a ActiveDirectoryAdministrator resource with the given unique name, arguments, and options.
Declaration
public ActiveDirectoryAdministrator(string name, ActiveDirectoryAdministratorArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ActiveDirectoryAdministratorArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceLogin
The login name of the principal to set as the server administrator
Declaration
public Output<string> Login { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ObjectId
The ID of the principal to set as the server administrator
Declaration
public Output<string> ObjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupName
The name of the resource group for the SQL server. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ServerName
The name of the SQL Server on which to set the administrator. Changing this forces a new resource to be created.
Declaration
public Output<string> ServerName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TenantId
The Azure Tenant ID
Declaration
public Output<string> TenantId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ActiveDirectoryAdministratorState, CustomResourceOptions)
Get an existing ActiveDirectoryAdministrator resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ActiveDirectoryAdministrator Get(string name, Input<string> id, ActiveDirectoryAdministratorState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ActiveDirectoryAdministratorState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ActiveDirectoryAdministrator |