1. Packages
  2. Azure Classic
  3. API Docs
  4. postgresql
  5. FlexibleServerActiveDirectoryAdministrator

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.postgresql.FlexibleServerActiveDirectoryAdministrator

Explore with Pulumi AI

Allows you to set a user or group as the AD administrator for a PostgreSQL Flexible Server.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as azuread from "@pulumi/azuread";

const current = azure.core.getClientConfig({});
const example = current.then(current => azuread.getServicePrincipal({
    objectId: current.objectId,
}));
const exampleResourceGroup = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleFlexibleServer = new azure.postgresql.FlexibleServer("example", {
    name: "example-fs",
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    administratorLogin: "adminTerraform",
    administratorPassword: "QAZwsx123",
    storageMb: 32768,
    version: "12",
    skuName: "GP_Standard_D2s_v3",
    zone: "2",
    authentication: {
        activeDirectoryAuthEnabled: true,
        tenantId: current.then(current => current.tenantId),
    },
});
const exampleFlexibleServerActiveDirectoryAdministrator = new azure.postgresql.FlexibleServerActiveDirectoryAdministrator("example", {
    serverName: exampleFlexibleServer.name,
    resourceGroupName: exampleResourceGroup.name,
    tenantId: current.then(current => current.tenantId),
    objectId: example.then(example => example.objectId),
    principalName: example.then(example => example.displayName),
    principalType: "ServicePrincipal",
});
Copy
import pulumi
import pulumi_azure as azure
import pulumi_azuread as azuread

current = azure.core.get_client_config()
example = azuread.get_service_principal(object_id=current.object_id)
example_resource_group = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_flexible_server = azure.postgresql.FlexibleServer("example",
    name="example-fs",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    administrator_login="adminTerraform",
    administrator_password="QAZwsx123",
    storage_mb=32768,
    version="12",
    sku_name="GP_Standard_D2s_v3",
    zone="2",
    authentication={
        "active_directory_auth_enabled": True,
        "tenant_id": current.tenant_id,
    })
example_flexible_server_active_directory_administrator = azure.postgresql.FlexibleServerActiveDirectoryAdministrator("example",
    server_name=example_flexible_server.name,
    resource_group_name=example_resource_group.name,
    tenant_id=current.tenant_id,
    object_id=example.object_id,
    principal_name=example.display_name,
    principal_type="ServicePrincipal")
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql"
	"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 {
		current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		example, err := azuread.LookupServicePrincipal(ctx, &azuread.LookupServicePrincipalArgs{
			ObjectId: pulumi.StringRef(current.ObjectId),
		}, nil)
		if err != nil {
			return err
		}
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleFlexibleServer, err := postgresql.NewFlexibleServer(ctx, "example", &postgresql.FlexibleServerArgs{
			Name:                  pulumi.String("example-fs"),
			ResourceGroupName:     exampleResourceGroup.Name,
			Location:              exampleResourceGroup.Location,
			AdministratorLogin:    pulumi.String("adminTerraform"),
			AdministratorPassword: pulumi.String("QAZwsx123"),
			StorageMb:             pulumi.Int(32768),
			Version:               pulumi.String("12"),
			SkuName:               pulumi.String("GP_Standard_D2s_v3"),
			Zone:                  pulumi.String("2"),
			Authentication: &postgresql.FlexibleServerAuthenticationArgs{
				ActiveDirectoryAuthEnabled: pulumi.Bool(true),
				TenantId:                   pulumi.String(current.TenantId),
			},
		})
		if err != nil {
			return err
		}
		_, err = postgresql.NewFlexibleServerActiveDirectoryAdministrator(ctx, "example", &postgresql.FlexibleServerActiveDirectoryAdministratorArgs{
			ServerName:        exampleFlexibleServer.Name,
			ResourceGroupName: exampleResourceGroup.Name,
			TenantId:          pulumi.String(current.TenantId),
			ObjectId:          pulumi.String(example.ObjectId),
			PrincipalName:     pulumi.String(example.DisplayName),
			PrincipalType:     pulumi.String("ServicePrincipal"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
using AzureAD = Pulumi.AzureAD;

return await Deployment.RunAsync(() => 
{
    var current = Azure.Core.GetClientConfig.Invoke();

    var example = AzureAD.GetServicePrincipal.Invoke(new()
    {
        ObjectId = current.Apply(getClientConfigResult => getClientConfigResult.ObjectId),
    });

    var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });

    var exampleFlexibleServer = new Azure.PostgreSql.FlexibleServer("example", new()
    {
        Name = "example-fs",
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        AdministratorLogin = "adminTerraform",
        AdministratorPassword = "QAZwsx123",
        StorageMb = 32768,
        Version = "12",
        SkuName = "GP_Standard_D2s_v3",
        Zone = "2",
        Authentication = new Azure.PostgreSql.Inputs.FlexibleServerAuthenticationArgs
        {
            ActiveDirectoryAuthEnabled = true,
            TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
        },
    });

    var exampleFlexibleServerActiveDirectoryAdministrator = new Azure.PostgreSql.FlexibleServerActiveDirectoryAdministrator("example", new()
    {
        ServerName = exampleFlexibleServer.Name,
        ResourceGroupName = exampleResourceGroup.Name,
        TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
        ObjectId = example.Apply(getServicePrincipalResult => getServicePrincipalResult.ObjectId),
        PrincipalName = example.Apply(getServicePrincipalResult => getServicePrincipalResult.DisplayName),
        PrincipalType = "ServicePrincipal",
    });

});
Copy
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.azuread.AzureadFunctions;
import com.pulumi.azuread.inputs.GetServicePrincipalArgs;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.postgresql.FlexibleServer;
import com.pulumi.azure.postgresql.FlexibleServerArgs;
import com.pulumi.azure.postgresql.inputs.FlexibleServerAuthenticationArgs;
import com.pulumi.azure.postgresql.FlexibleServerActiveDirectoryAdministrator;
import com.pulumi.azure.postgresql.FlexibleServerActiveDirectoryAdministratorArgs;
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();

        final var example = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()
            .objectId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
            .build());

        var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());

        var exampleFlexibleServer = new FlexibleServer("exampleFlexibleServer", FlexibleServerArgs.builder()
            .name("example-fs")
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .administratorLogin("adminTerraform")
            .administratorPassword("QAZwsx123")
            .storageMb(32768)
            .version("12")
            .skuName("GP_Standard_D2s_v3")
            .zone("2")
            .authentication(FlexibleServerAuthenticationArgs.builder()
                .activeDirectoryAuthEnabled(true)
                .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
                .build())
            .build());

        var exampleFlexibleServerActiveDirectoryAdministrator = new FlexibleServerActiveDirectoryAdministrator("exampleFlexibleServerActiveDirectoryAdministrator", FlexibleServerActiveDirectoryAdministratorArgs.builder()
            .serverName(exampleFlexibleServer.name())
            .resourceGroupName(exampleResourceGroup.name())
            .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
            .objectId(example.applyValue(getServicePrincipalResult -> getServicePrincipalResult.objectId()))
            .principalName(example.applyValue(getServicePrincipalResult -> getServicePrincipalResult.displayName()))
            .principalType("ServicePrincipal")
            .build());

    }
}
Copy
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    name: example
    properties:
      name: example-resources
      location: West Europe
  exampleFlexibleServer:
    type: azure:postgresql:FlexibleServer
    name: example
    properties:
      name: example-fs
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      administratorLogin: adminTerraform
      administratorPassword: QAZwsx123
      storageMb: 32768
      version: '12'
      skuName: GP_Standard_D2s_v3
      zone: '2'
      authentication:
        activeDirectoryAuthEnabled: true
        tenantId: ${current.tenantId}
  exampleFlexibleServerActiveDirectoryAdministrator:
    type: azure:postgresql:FlexibleServerActiveDirectoryAdministrator
    name: example
    properties:
      serverName: ${exampleFlexibleServer.name}
      resourceGroupName: ${exampleResourceGroup.name}
      tenantId: ${current.tenantId}
      objectId: ${example.objectId}
      principalName: ${example.displayName}
      principalType: ServicePrincipal
variables:
  current:
    fn::invoke:
      function: azure:core:getClientConfig
      arguments: {}
  example:
    fn::invoke:
      function: azuread:getServicePrincipal
      arguments:
        objectId: ${current.objectId}
Copy

Create FlexibleServerActiveDirectoryAdministrator Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new FlexibleServerActiveDirectoryAdministrator(name: string, args: FlexibleServerActiveDirectoryAdministratorArgs, opts?: CustomResourceOptions);
@overload
def FlexibleServerActiveDirectoryAdministrator(resource_name: str,
                                               args: FlexibleServerActiveDirectoryAdministratorArgs,
                                               opts: Optional[ResourceOptions] = None)

@overload
def FlexibleServerActiveDirectoryAdministrator(resource_name: str,
                                               opts: Optional[ResourceOptions] = None,
                                               object_id: Optional[str] = None,
                                               principal_name: Optional[str] = None,
                                               principal_type: Optional[str] = None,
                                               resource_group_name: Optional[str] = None,
                                               server_name: Optional[str] = None,
                                               tenant_id: Optional[str] = None)
func NewFlexibleServerActiveDirectoryAdministrator(ctx *Context, name string, args FlexibleServerActiveDirectoryAdministratorArgs, opts ...ResourceOption) (*FlexibleServerActiveDirectoryAdministrator, error)
public FlexibleServerActiveDirectoryAdministrator(string name, FlexibleServerActiveDirectoryAdministratorArgs args, CustomResourceOptions? opts = null)
public FlexibleServerActiveDirectoryAdministrator(String name, FlexibleServerActiveDirectoryAdministratorArgs args)
public FlexibleServerActiveDirectoryAdministrator(String name, FlexibleServerActiveDirectoryAdministratorArgs args, CustomResourceOptions options)
type: azure:postgresql:FlexibleServerActiveDirectoryAdministrator
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. FlexibleServerActiveDirectoryAdministratorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. FlexibleServerActiveDirectoryAdministratorArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. FlexibleServerActiveDirectoryAdministratorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. FlexibleServerActiveDirectoryAdministratorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. FlexibleServerActiveDirectoryAdministratorArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var flexibleServerActiveDirectoryAdministratorResource = new Azure.PostgreSql.FlexibleServerActiveDirectoryAdministrator("flexibleServerActiveDirectoryAdministratorResource", new()
{
    ObjectId = "string",
    PrincipalName = "string",
    PrincipalType = "string",
    ResourceGroupName = "string",
    ServerName = "string",
    TenantId = "string",
});
Copy
example, err := postgresql.NewFlexibleServerActiveDirectoryAdministrator(ctx, "flexibleServerActiveDirectoryAdministratorResource", &postgresql.FlexibleServerActiveDirectoryAdministratorArgs{
	ObjectId:          pulumi.String("string"),
	PrincipalName:     pulumi.String("string"),
	PrincipalType:     pulumi.String("string"),
	ResourceGroupName: pulumi.String("string"),
	ServerName:        pulumi.String("string"),
	TenantId:          pulumi.String("string"),
})
Copy
var flexibleServerActiveDirectoryAdministratorResource = new FlexibleServerActiveDirectoryAdministrator("flexibleServerActiveDirectoryAdministratorResource", FlexibleServerActiveDirectoryAdministratorArgs.builder()
    .objectId("string")
    .principalName("string")
    .principalType("string")
    .resourceGroupName("string")
    .serverName("string")
    .tenantId("string")
    .build());
Copy
flexible_server_active_directory_administrator_resource = azure.postgresql.FlexibleServerActiveDirectoryAdministrator("flexibleServerActiveDirectoryAdministratorResource",
    object_id="string",
    principal_name="string",
    principal_type="string",
    resource_group_name="string",
    server_name="string",
    tenant_id="string")
Copy
const flexibleServerActiveDirectoryAdministratorResource = new azure.postgresql.FlexibleServerActiveDirectoryAdministrator("flexibleServerActiveDirectoryAdministratorResource", {
    objectId: "string",
    principalName: "string",
    principalType: "string",
    resourceGroupName: "string",
    serverName: "string",
    tenantId: "string",
});
Copy
type: azure:postgresql:FlexibleServerActiveDirectoryAdministrator
properties:
    objectId: string
    principalName: string
    principalType: string
    resourceGroupName: string
    serverName: string
    tenantId: string
Copy

FlexibleServerActiveDirectoryAdministrator Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The FlexibleServerActiveDirectoryAdministrator resource accepts the following input properties:

ObjectId
This property is required.
Changes to this property will trigger replacement.
string
The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created.
PrincipalName
This property is required.
Changes to this property will trigger replacement.
string
The name of Azure Active Directory principal. Changing this forces a new resource to be created.
PrincipalType
This property is required.
Changes to this property will trigger replacement.
string
The type of Azure Active Directory principal. Possible values are Group, ServicePrincipal and User. Changing this forces a new resource to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created.
ServerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created.
TenantId
This property is required.
Changes to this property will trigger replacement.
string
The Azure Tenant ID. Changing this forces a new resource to be created.
ObjectId
This property is required.
Changes to this property will trigger replacement.
string
The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created.
PrincipalName
This property is required.
Changes to this property will trigger replacement.
string
The name of Azure Active Directory principal. Changing this forces a new resource to be created.
PrincipalType
This property is required.
Changes to this property will trigger replacement.
string
The type of Azure Active Directory principal. Possible values are Group, ServicePrincipal and User. Changing this forces a new resource to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created.
ServerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created.
TenantId
This property is required.
Changes to this property will trigger replacement.
string
The Azure Tenant ID. Changing this forces a new resource to be created.
objectId
This property is required.
Changes to this property will trigger replacement.
String
The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created.
principalName
This property is required.
Changes to this property will trigger replacement.
String
The name of Azure Active Directory principal. Changing this forces a new resource to be created.
principalType
This property is required.
Changes to this property will trigger replacement.
String
The type of Azure Active Directory principal. Possible values are Group, ServicePrincipal and User. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created.
serverName
This property is required.
Changes to this property will trigger replacement.
String
The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created.
tenantId
This property is required.
Changes to this property will trigger replacement.
String
The Azure Tenant ID. Changing this forces a new resource to be created.
objectId
This property is required.
Changes to this property will trigger replacement.
string
The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created.
principalName
This property is required.
Changes to this property will trigger replacement.
string
The name of Azure Active Directory principal. Changing this forces a new resource to be created.
principalType
This property is required.
Changes to this property will trigger replacement.
string
The type of Azure Active Directory principal. Possible values are Group, ServicePrincipal and User. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created.
serverName
This property is required.
Changes to this property will trigger replacement.
string
The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created.
tenantId
This property is required.
Changes to this property will trigger replacement.
string
The Azure Tenant ID. Changing this forces a new resource to be created.
object_id
This property is required.
Changes to this property will trigger replacement.
str
The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created.
principal_name
This property is required.
Changes to this property will trigger replacement.
str
The name of Azure Active Directory principal. Changing this forces a new resource to be created.
principal_type
This property is required.
Changes to this property will trigger replacement.
str
The type of Azure Active Directory principal. Possible values are Group, ServicePrincipal and User. Changing this forces a new resource to be created.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created.
server_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created.
tenant_id
This property is required.
Changes to this property will trigger replacement.
str
The Azure Tenant ID. Changing this forces a new resource to be created.
objectId
This property is required.
Changes to this property will trigger replacement.
String
The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created.
principalName
This property is required.
Changes to this property will trigger replacement.
String
The name of Azure Active Directory principal. Changing this forces a new resource to be created.
principalType
This property is required.
Changes to this property will trigger replacement.
String
The type of Azure Active Directory principal. Possible values are Group, ServicePrincipal and User. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created.
serverName
This property is required.
Changes to this property will trigger replacement.
String
The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created.
tenantId
This property is required.
Changes to this property will trigger replacement.
String
The Azure Tenant ID. Changing this forces a new resource to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the FlexibleServerActiveDirectoryAdministrator 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 FlexibleServerActiveDirectoryAdministrator Resource

Get an existing FlexibleServerActiveDirectoryAdministrator 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?: FlexibleServerActiveDirectoryAdministratorState, opts?: CustomResourceOptions): FlexibleServerActiveDirectoryAdministrator
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        object_id: Optional[str] = None,
        principal_name: Optional[str] = None,
        principal_type: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        server_name: Optional[str] = None,
        tenant_id: Optional[str] = None) -> FlexibleServerActiveDirectoryAdministrator
func GetFlexibleServerActiveDirectoryAdministrator(ctx *Context, name string, id IDInput, state *FlexibleServerActiveDirectoryAdministratorState, opts ...ResourceOption) (*FlexibleServerActiveDirectoryAdministrator, error)
public static FlexibleServerActiveDirectoryAdministrator Get(string name, Input<string> id, FlexibleServerActiveDirectoryAdministratorState? state, CustomResourceOptions? opts = null)
public static FlexibleServerActiveDirectoryAdministrator get(String name, Output<String> id, FlexibleServerActiveDirectoryAdministratorState state, CustomResourceOptions options)
resources:  _:    type: azure:postgresql:FlexibleServerActiveDirectoryAdministrator    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ObjectId Changes to this property will trigger replacement. string
The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created.
PrincipalName Changes to this property will trigger replacement. string
The name of Azure Active Directory principal. Changing this forces a new resource to be created.
PrincipalType Changes to this property will trigger replacement. string
The type of Azure Active Directory principal. Possible values are Group, ServicePrincipal and User. Changing this forces a new resource to be created.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created.
ServerName Changes to this property will trigger replacement. string
The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created.
TenantId Changes to this property will trigger replacement. string
The Azure Tenant ID. Changing this forces a new resource to be created.
ObjectId Changes to this property will trigger replacement. string
The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created.
PrincipalName Changes to this property will trigger replacement. string
The name of Azure Active Directory principal. Changing this forces a new resource to be created.
PrincipalType Changes to this property will trigger replacement. string
The type of Azure Active Directory principal. Possible values are Group, ServicePrincipal and User. Changing this forces a new resource to be created.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created.
ServerName Changes to this property will trigger replacement. string
The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created.
TenantId Changes to this property will trigger replacement. string
The Azure Tenant ID. Changing this forces a new resource to be created.
objectId Changes to this property will trigger replacement. String
The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created.
principalName Changes to this property will trigger replacement. String
The name of Azure Active Directory principal. Changing this forces a new resource to be created.
principalType Changes to this property will trigger replacement. String
The type of Azure Active Directory principal. Possible values are Group, ServicePrincipal and User. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created.
serverName Changes to this property will trigger replacement. String
The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created.
tenantId Changes to this property will trigger replacement. String
The Azure Tenant ID. Changing this forces a new resource to be created.
objectId Changes to this property will trigger replacement. string
The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created.
principalName Changes to this property will trigger replacement. string
The name of Azure Active Directory principal. Changing this forces a new resource to be created.
principalType Changes to this property will trigger replacement. string
The type of Azure Active Directory principal. Possible values are Group, ServicePrincipal and User. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. string
The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created.
serverName Changes to this property will trigger replacement. string
The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created.
tenantId Changes to this property will trigger replacement. string
The Azure Tenant ID. Changing this forces a new resource to be created.
object_id Changes to this property will trigger replacement. str
The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created.
principal_name Changes to this property will trigger replacement. str
The name of Azure Active Directory principal. Changing this forces a new resource to be created.
principal_type Changes to this property will trigger replacement. str
The type of Azure Active Directory principal. Possible values are Group, ServicePrincipal and User. Changing this forces a new resource to be created.
resource_group_name Changes to this property will trigger replacement. str
The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created.
server_name Changes to this property will trigger replacement. str
The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created.
tenant_id Changes to this property will trigger replacement. str
The Azure Tenant ID. Changing this forces a new resource to be created.
objectId Changes to this property will trigger replacement. String
The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created.
principalName Changes to this property will trigger replacement. String
The name of Azure Active Directory principal. Changing this forces a new resource to be created.
principalType Changes to this property will trigger replacement. String
The type of Azure Active Directory principal. Possible values are Group, ServicePrincipal and User. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created.
serverName Changes to this property will trigger replacement. String
The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created.
tenantId Changes to this property will trigger replacement. String
The Azure Tenant ID. Changing this forces a new resource to be created.

Import

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

$ pulumi import azure:postgresql/flexibleServerActiveDirectoryAdministrator:FlexibleServerActiveDirectoryAdministrator example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/myserver/administrators/objectId
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.