ActiveDirectoryAdministrator

class ActiveDirectoryAdministrator : KotlinCustomResource

Allows you to set a user or group as the AD administrator for an MySQL server in Azure

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.mysql.Server;
import com.pulumi.azure.mysql.ServerArgs;
import com.pulumi.azure.mysql.ActiveDirectoryAdministrator;
import com.pulumi.azure.mysql.ActiveDirectoryAdministratorArgs;
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 current = CoreFunctions.getClientConfig();
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleServer = new Server("exampleServer", ServerArgs.builder()
.name("example-mysqlserver")
.location(example.location())
.resourceGroupName(example.name())
.administratorLogin("mysqladminun")
.administratorLoginPassword("H@Sh1CoR3!")
.sslEnforcementEnabled(true)
.skuName("B_Gen5_2")
.storageMb(5120)
.version("5.7")
.build());
var exampleActiveDirectoryAdministrator = new ActiveDirectoryAdministrator("exampleActiveDirectoryAdministrator", ActiveDirectoryAdministratorArgs.builder()
.serverName(exampleServer.name())
.resourceGroupName(example.name())
.login("sqladmin")
.tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
.objectId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
.build());
}
}

Import

A MySQL Active Directory Administrator can be imported using the resource id, e.g.

$ pulumi import azure:mysql/activeDirectoryAdministrator:ActiveDirectoryAdministrator administrator /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.DBforMySQL/servers/myserver/administrators/activeDirectory

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val login: Output<String>

The login name of the principal to set as the server administrator

Link copied to clipboard
val objectId: Output<String>

The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the resource group for the MySQL server. Changing this forces a new resource to be created.

Link copied to clipboard
val serverName: Output<String>

The name of the MySQL Server on which to set the administrator. Changing this forces a new resource to be created.

Link copied to clipboard
val tenantId: Output<String>

The Azure Tenant ID

Link copied to clipboard
val urn: Output<String>