ActiveDirectoryAdministrator

class ActiveDirectoryAdministrator : KotlinCustomResource

Allows you to set a user or group as the AD administrator for an PostgreSQL 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.postgresql.Server;
import com.pulumi.azure.postgresql.ServerArgs;
import com.pulumi.azure.postgresql.ActiveDirectoryAdministrator;
import com.pulumi.azure.postgresql.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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleServer = new Server("exampleServer", ServerArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.version("9.6")
.administratorLogin("4dm1n157r470r")
.administratorLoginPassword("4-v3ry-53cr37-p455w0rd")
.skuName("GP_Gen5_2")
.sslEnforcementEnabled(true)
.build());
var exampleActiveDirectoryAdministrator = new ActiveDirectoryAdministrator("exampleActiveDirectoryAdministrator", ActiveDirectoryAdministratorArgs.builder()
.serverName(exampleServer.name())
.resourceGroupName(exampleResourceGroup.name())
.login("sqladmin")
.tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
.objectId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
.build());
}
}

Import

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

$ pulumi import azure:postgresql/activeDirectoryAdministrator:ActiveDirectoryAdministrator administrator /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.DBforPostgreSQL/servers/myserver

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 PostgreSQL server. Changing this forces a new resource to be created.

Link copied to clipboard
val serverName: Output<String>

The name of the PostgreSQL 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>