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

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages a PostgreSQL Server.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleServer = new Azure.PostgreSql.Server("exampleServer", new Azure.PostgreSql.ServerArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                AdministratorLogin = "psqladmin",
                AdministratorLoginPassword = "H@Sh1CoR3!",
                SkuName = "GP_Gen5_4",
                Version = "9.6",
                StorageMb = 640000,
                BackupRetentionDays = 7,
                GeoRedundantBackupEnabled = true,
                AutoGrowEnabled = true,
                PublicNetworkAccessEnabled = false,
                SslEnforcementEnabled = true,
                SslMinimalTlsVersionEnforced = "TLS1_2",
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/postgresql"
    	"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
    		}
    		_, err = postgresql.NewServer(ctx, "exampleServer", &postgresql.ServerArgs{
    			Location:                     exampleResourceGroup.Location,
    			ResourceGroupName:            exampleResourceGroup.Name,
    			AdministratorLogin:           pulumi.String("psqladmin"),
    			AdministratorLoginPassword:   pulumi.String("H@Sh1CoR3!"),
    			SkuName:                      pulumi.String("GP_Gen5_4"),
    			Version:                      pulumi.String("9.6"),
    			StorageMb:                    pulumi.Int(640000),
    			BackupRetentionDays:          pulumi.Int(7),
    			GeoRedundantBackupEnabled:    pulumi.Bool(true),
    			AutoGrowEnabled:              pulumi.Bool(true),
    			PublicNetworkAccessEnabled:   pulumi.Bool(false),
    			SslEnforcementEnabled:        pulumi.Bool(true),
    			SslMinimalTlsVersionEnforced: pulumi.String("TLS1_2"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleServer = new azure.postgresql.Server("exampleServer", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        administratorLogin: "psqladmin",
        administratorLoginPassword: "H@Sh1CoR3!",
        skuName: "GP_Gen5_4",
        version: "9.6",
        storageMb: 640000,
        backupRetentionDays: 7,
        geoRedundantBackupEnabled: true,
        autoGrowEnabled: true,
        publicNetworkAccessEnabled: false,
        sslEnforcementEnabled: true,
        sslMinimalTlsVersionEnforced: "TLS1_2",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_server = azure.postgresql.Server("exampleServer",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        administrator_login="psqladmin",
        administrator_login_password="H@Sh1CoR3!",
        sku_name="GP_Gen5_4",
        version="9.6",
        storage_mb=640000,
        backup_retention_days=7,
        geo_redundant_backup_enabled=True,
        auto_grow_enabled=True,
        public_network_access_enabled=False,
        ssl_enforcement_enabled=True,
        ssl_minimal_tls_version_enforced="TLS1_2")
    

    Example coming soon!

    Create Server Resource

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

    Constructor syntax

    new Server(name: string, args: ServerArgs, opts?: CustomResourceOptions);
    @overload
    def Server(resource_name: str,
               args: ServerArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Server(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               resource_group_name: Optional[str] = None,
               version: Optional[str] = None,
               sku_name: Optional[str] = None,
               name: Optional[str] = None,
               backup_retention_days: Optional[int] = None,
               creation_source_server_id: Optional[str] = None,
               geo_redundant_backup_enabled: Optional[bool] = None,
               identity: Optional[ServerIdentityArgs] = None,
               infrastructure_encryption_enabled: Optional[bool] = None,
               location: Optional[str] = None,
               administrator_login: Optional[str] = None,
               public_network_access_enabled: Optional[bool] = None,
               create_mode: Optional[str] = None,
               restore_point_in_time: Optional[str] = None,
               auto_grow_enabled: Optional[bool] = None,
               ssl_enforcement: Optional[str] = None,
               ssl_enforcement_enabled: Optional[bool] = None,
               ssl_minimal_tls_version_enforced: Optional[str] = None,
               storage_mb: Optional[int] = None,
               storage_profile: Optional[ServerStorageProfileArgs] = None,
               tags: Optional[Mapping[str, str]] = None,
               threat_detection_policy: Optional[ServerThreatDetectionPolicyArgs] = None,
               administrator_login_password: Optional[str] = None)
    func NewServer(ctx *Context, name string, args ServerArgs, opts ...ResourceOption) (*Server, error)
    public Server(string name, ServerArgs args, CustomResourceOptions? opts = null)
    public Server(String name, ServerArgs args)
    public Server(String name, ServerArgs args, CustomResourceOptions options)
    
    type: azure:postgresql:Server
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ServerArgs
    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 ServerArgs
    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 ServerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServerArgs
    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 exampleserverResourceResourceFromPostgresqlserver = new Azure.PostgreSql.Server("exampleserverResourceResourceFromPostgresqlserver", new()
    {
        ResourceGroupName = "string",
        Version = "string",
        SkuName = "string",
        Name = "string",
        BackupRetentionDays = 0,
        CreationSourceServerId = "string",
        GeoRedundantBackupEnabled = false,
        Identity = new Azure.PostgreSql.Inputs.ServerIdentityArgs
        {
            Type = "string",
            PrincipalId = "string",
            TenantId = "string",
        },
        InfrastructureEncryptionEnabled = false,
        Location = "string",
        AdministratorLogin = "string",
        PublicNetworkAccessEnabled = false,
        CreateMode = "string",
        RestorePointInTime = "string",
        AutoGrowEnabled = false,
        SslEnforcementEnabled = false,
        SslMinimalTlsVersionEnforced = "string",
        StorageMb = 0,
        Tags = 
        {
            { "string", "string" },
        },
        ThreatDetectionPolicy = new Azure.PostgreSql.Inputs.ServerThreatDetectionPolicyArgs
        {
            DisabledAlerts = new[]
            {
                "string",
            },
            EmailAccountAdmins = false,
            EmailAddresses = new[]
            {
                "string",
            },
            Enabled = false,
            RetentionDays = 0,
            StorageAccountAccessKey = "string",
            StorageEndpoint = "string",
        },
        AdministratorLoginPassword = "string",
    });
    
    example, err := postgresql.NewServer(ctx, "exampleserverResourceResourceFromPostgresqlserver", &postgresql.ServerArgs{
    	ResourceGroupName:         pulumi.String("string"),
    	Version:                   pulumi.String("string"),
    	SkuName:                   pulumi.String("string"),
    	Name:                      pulumi.String("string"),
    	BackupRetentionDays:       pulumi.Int(0),
    	CreationSourceServerId:    pulumi.String("string"),
    	GeoRedundantBackupEnabled: pulumi.Bool(false),
    	Identity: &postgresql.ServerIdentityArgs{
    		Type:        pulumi.String("string"),
    		PrincipalId: pulumi.String("string"),
    		TenantId:    pulumi.String("string"),
    	},
    	InfrastructureEncryptionEnabled: pulumi.Bool(false),
    	Location:                        pulumi.String("string"),
    	AdministratorLogin:              pulumi.String("string"),
    	PublicNetworkAccessEnabled:      pulumi.Bool(false),
    	CreateMode:                      pulumi.String("string"),
    	RestorePointInTime:              pulumi.String("string"),
    	AutoGrowEnabled:                 pulumi.Bool(false),
    	SslEnforcementEnabled:           pulumi.Bool(false),
    	SslMinimalTlsVersionEnforced:    pulumi.String("string"),
    	StorageMb:                       pulumi.Int(0),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ThreatDetectionPolicy: &postgresql.ServerThreatDetectionPolicyArgs{
    		DisabledAlerts: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		EmailAccountAdmins: pulumi.Bool(false),
    		EmailAddresses: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Enabled:                 pulumi.Bool(false),
    		RetentionDays:           pulumi.Int(0),
    		StorageAccountAccessKey: pulumi.String("string"),
    		StorageEndpoint:         pulumi.String("string"),
    	},
    	AdministratorLoginPassword: pulumi.String("string"),
    })
    
    var exampleserverResourceResourceFromPostgresqlserver = new com.pulumi.azure.postgresql.Server("exampleserverResourceResourceFromPostgresqlserver", com.pulumi.azure.postgresql.ServerArgs.builder()
        .resourceGroupName("string")
        .version("string")
        .skuName("string")
        .name("string")
        .backupRetentionDays(0)
        .creationSourceServerId("string")
        .geoRedundantBackupEnabled(false)
        .identity(ServerIdentityArgs.builder()
            .type("string")
            .principalId("string")
            .tenantId("string")
            .build())
        .infrastructureEncryptionEnabled(false)
        .location("string")
        .administratorLogin("string")
        .publicNetworkAccessEnabled(false)
        .createMode("string")
        .restorePointInTime("string")
        .autoGrowEnabled(false)
        .sslEnforcementEnabled(false)
        .sslMinimalTlsVersionEnforced("string")
        .storageMb(0)
        .tags(Map.of("string", "string"))
        .threatDetectionPolicy(ServerThreatDetectionPolicyArgs.builder()
            .disabledAlerts("string")
            .emailAccountAdmins(false)
            .emailAddresses("string")
            .enabled(false)
            .retentionDays(0)
            .storageAccountAccessKey("string")
            .storageEndpoint("string")
            .build())
        .administratorLoginPassword("string")
        .build());
    
    exampleserver_resource_resource_from_postgresqlserver = azure.postgresql.Server("exampleserverResourceResourceFromPostgresqlserver",
        resource_group_name="string",
        version="string",
        sku_name="string",
        name="string",
        backup_retention_days=0,
        creation_source_server_id="string",
        geo_redundant_backup_enabled=False,
        identity={
            "type": "string",
            "principal_id": "string",
            "tenant_id": "string",
        },
        infrastructure_encryption_enabled=False,
        location="string",
        administrator_login="string",
        public_network_access_enabled=False,
        create_mode="string",
        restore_point_in_time="string",
        auto_grow_enabled=False,
        ssl_enforcement_enabled=False,
        ssl_minimal_tls_version_enforced="string",
        storage_mb=0,
        tags={
            "string": "string",
        },
        threat_detection_policy={
            "disabled_alerts": ["string"],
            "email_account_admins": False,
            "email_addresses": ["string"],
            "enabled": False,
            "retention_days": 0,
            "storage_account_access_key": "string",
            "storage_endpoint": "string",
        },
        administrator_login_password="string")
    
    const exampleserverResourceResourceFromPostgresqlserver = new azure.postgresql.Server("exampleserverResourceResourceFromPostgresqlserver", {
        resourceGroupName: "string",
        version: "string",
        skuName: "string",
        name: "string",
        backupRetentionDays: 0,
        creationSourceServerId: "string",
        geoRedundantBackupEnabled: false,
        identity: {
            type: "string",
            principalId: "string",
            tenantId: "string",
        },
        infrastructureEncryptionEnabled: false,
        location: "string",
        administratorLogin: "string",
        publicNetworkAccessEnabled: false,
        createMode: "string",
        restorePointInTime: "string",
        autoGrowEnabled: false,
        sslEnforcementEnabled: false,
        sslMinimalTlsVersionEnforced: "string",
        storageMb: 0,
        tags: {
            string: "string",
        },
        threatDetectionPolicy: {
            disabledAlerts: ["string"],
            emailAccountAdmins: false,
            emailAddresses: ["string"],
            enabled: false,
            retentionDays: 0,
            storageAccountAccessKey: "string",
            storageEndpoint: "string",
        },
        administratorLoginPassword: "string",
    });
    
    type: azure:postgresql:Server
    properties:
        administratorLogin: string
        administratorLoginPassword: string
        autoGrowEnabled: false
        backupRetentionDays: 0
        createMode: string
        creationSourceServerId: string
        geoRedundantBackupEnabled: false
        identity:
            principalId: string
            tenantId: string
            type: string
        infrastructureEncryptionEnabled: false
        location: string
        name: string
        publicNetworkAccessEnabled: false
        resourceGroupName: string
        restorePointInTime: string
        skuName: string
        sslEnforcementEnabled: false
        sslMinimalTlsVersionEnforced: string
        storageMb: 0
        tags:
            string: string
        threatDetectionPolicy:
            disabledAlerts:
                - string
            emailAccountAdmins: false
            emailAddresses:
                - string
            enabled: false
            retentionDays: 0
            storageAccountAccessKey: string
            storageEndpoint: string
        version: string
    

    Server 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 Server resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
    SkuName string
    Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.
    Version string
    Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, and 11. Changing this forces a new resource to be created.
    AdministratorLogin string
    The Administrator Login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    AdministratorLoginPassword string
    The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default.
    AutoGrowEnabled bool
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true.
    BackupRetentionDays int
    Backup retention days for the server, supported values are between 7 and 35 days.
    CreateMode string
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    CreationSourceServerId string
    For creation modes other then default the source server ID to use.
    GeoRedundantBackupEnabled bool
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
    Identity ServerIdentity
    An identity block as defined below.
    InfrastructureEncryptionEnabled bool
    Whether or not infrastructure is encrypted for this server. Defaults to false. Changing this forces a new resource to be created.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is allowed for this server. Defaults to true.
    RestorePointInTime string
    When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id.
    SslEnforcement string

    Deprecated: this has been renamed to the boolean ssl_enforcement_enabled and will be removed in version 3.0 of the provider.

    SslEnforcementEnabled bool
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    SslMinimalTlsVersionEnforced string
    The mimimun TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLSEnforcementDisabled.
    StorageMb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    StorageProfile ServerStorageProfile

    Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.

    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    ThreatDetectionPolicy ServerThreatDetectionPolicy
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    ResourceGroupName string
    The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
    SkuName string
    Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.
    Version string
    Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, and 11. Changing this forces a new resource to be created.
    AdministratorLogin string
    The Administrator Login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    AdministratorLoginPassword string
    The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default.
    AutoGrowEnabled bool
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true.
    BackupRetentionDays int
    Backup retention days for the server, supported values are between 7 and 35 days.
    CreateMode string
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    CreationSourceServerId string
    For creation modes other then default the source server ID to use.
    GeoRedundantBackupEnabled bool
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
    Identity ServerIdentityArgs
    An identity block as defined below.
    InfrastructureEncryptionEnabled bool
    Whether or not infrastructure is encrypted for this server. Defaults to false. Changing this forces a new resource to be created.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is allowed for this server. Defaults to true.
    RestorePointInTime string
    When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id.
    SslEnforcement string

    Deprecated: this has been renamed to the boolean ssl_enforcement_enabled and will be removed in version 3.0 of the provider.

    SslEnforcementEnabled bool
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    SslMinimalTlsVersionEnforced string
    The mimimun TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLSEnforcementDisabled.
    StorageMb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    StorageProfile ServerStorageProfileArgs

    Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.

    Tags map[string]string
    A mapping of tags to assign to the resource.
    ThreatDetectionPolicy ServerThreatDetectionPolicyArgs
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    resourceGroupName String
    The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
    skuName String
    Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.
    version String
    Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, and 11. Changing this forces a new resource to be created.
    administratorLogin String
    The Administrator Login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administratorLoginPassword String
    The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default.
    autoGrowEnabled Boolean
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true.
    backupRetentionDays Integer
    Backup retention days for the server, supported values are between 7 and 35 days.
    createMode String
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creationSourceServerId String
    For creation modes other then default the source server ID to use.
    geoRedundantBackupEnabled Boolean
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
    identity ServerIdentity
    An identity block as defined below.
    infrastructureEncryptionEnabled Boolean
    Whether or not infrastructure is encrypted for this server. Defaults to false. Changing this forces a new resource to be created.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is allowed for this server. Defaults to true.
    restorePointInTime String
    When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id.
    sslEnforcement String

    Deprecated: this has been renamed to the boolean ssl_enforcement_enabled and will be removed in version 3.0 of the provider.

    sslEnforcementEnabled Boolean
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    sslMinimalTlsVersionEnforced String
    The mimimun TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLSEnforcementDisabled.
    storageMb Integer
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    storageProfile ServerStorageProfile

    Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.

    tags Map<String,String>
    A mapping of tags to assign to the resource.
    threatDetectionPolicy ServerThreatDetectionPolicy
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    resourceGroupName string
    The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
    skuName string
    Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.
    version string
    Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, and 11. Changing this forces a new resource to be created.
    administratorLogin string
    The Administrator Login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administratorLoginPassword string
    The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default.
    autoGrowEnabled boolean
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true.
    backupRetentionDays number
    Backup retention days for the server, supported values are between 7 and 35 days.
    createMode string
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creationSourceServerId string
    For creation modes other then default the source server ID to use.
    geoRedundantBackupEnabled boolean
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
    identity ServerIdentity
    An identity block as defined below.
    infrastructureEncryptionEnabled boolean
    Whether or not infrastructure is encrypted for this server. Defaults to false. Changing this forces a new resource to be created.
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name string
    Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
    publicNetworkAccessEnabled boolean
    Whether or not public network access is allowed for this server. Defaults to true.
    restorePointInTime string
    When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id.
    sslEnforcement string

    Deprecated: this has been renamed to the boolean ssl_enforcement_enabled and will be removed in version 3.0 of the provider.

    sslEnforcementEnabled boolean
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    sslMinimalTlsVersionEnforced string
    The mimimun TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLSEnforcementDisabled.
    storageMb number
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    storageProfile ServerStorageProfile

    Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.

    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    threatDetectionPolicy ServerThreatDetectionPolicy
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    resource_group_name str
    The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
    sku_name str
    Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.
    version str
    Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, and 11. Changing this forces a new resource to be created.
    administrator_login str
    The Administrator Login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administrator_login_password str
    The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default.
    auto_grow_enabled bool
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true.
    backup_retention_days int
    Backup retention days for the server, supported values are between 7 and 35 days.
    create_mode str
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creation_source_server_id str
    For creation modes other then default the source server ID to use.
    geo_redundant_backup_enabled bool
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
    identity ServerIdentityArgs
    An identity block as defined below.
    infrastructure_encryption_enabled bool
    Whether or not infrastructure is encrypted for this server. Defaults to false. Changing this forces a new resource to be created.
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name str
    Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
    public_network_access_enabled bool
    Whether or not public network access is allowed for this server. Defaults to true.
    restore_point_in_time str
    When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id.
    ssl_enforcement str

    Deprecated: this has been renamed to the boolean ssl_enforcement_enabled and will be removed in version 3.0 of the provider.

    ssl_enforcement_enabled bool
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    ssl_minimal_tls_version_enforced str
    The mimimun TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLSEnforcementDisabled.
    storage_mb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    storage_profile ServerStorageProfileArgs

    Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.

    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    threat_detection_policy ServerThreatDetectionPolicyArgs
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    resourceGroupName String
    The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
    skuName String
    Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.
    version String
    Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, and 11. Changing this forces a new resource to be created.
    administratorLogin String
    The Administrator Login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administratorLoginPassword String
    The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default.
    autoGrowEnabled Boolean
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true.
    backupRetentionDays Number
    Backup retention days for the server, supported values are between 7 and 35 days.
    createMode String
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creationSourceServerId String
    For creation modes other then default the source server ID to use.
    geoRedundantBackupEnabled Boolean
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
    identity Property Map
    An identity block as defined below.
    infrastructureEncryptionEnabled Boolean
    Whether or not infrastructure is encrypted for this server. Defaults to false. Changing this forces a new resource to be created.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is allowed for this server. Defaults to true.
    restorePointInTime String
    When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id.
    sslEnforcement String

    Deprecated: this has been renamed to the boolean ssl_enforcement_enabled and will be removed in version 3.0 of the provider.

    sslEnforcementEnabled Boolean
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    sslMinimalTlsVersionEnforced String
    The mimimun TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLSEnforcementDisabled.
    storageMb Number
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    storageProfile Property Map

    Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.

    tags Map<String>
    A mapping of tags to assign to the resource.
    threatDetectionPolicy Property Map
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.

    Outputs

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

    Fqdn string
    The FQDN of the PostgreSQL Server.
    Id string
    The provider-assigned unique ID for this managed resource.
    Fqdn string
    The FQDN of the PostgreSQL Server.
    Id string
    The provider-assigned unique ID for this managed resource.
    fqdn String
    The FQDN of the PostgreSQL Server.
    id String
    The provider-assigned unique ID for this managed resource.
    fqdn string
    The FQDN of the PostgreSQL Server.
    id string
    The provider-assigned unique ID for this managed resource.
    fqdn str
    The FQDN of the PostgreSQL Server.
    id str
    The provider-assigned unique ID for this managed resource.
    fqdn String
    The FQDN of the PostgreSQL Server.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Server Resource

    Get an existing Server 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?: ServerState, opts?: CustomResourceOptions): Server
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            administrator_login: Optional[str] = None,
            administrator_login_password: Optional[str] = None,
            auto_grow_enabled: Optional[bool] = None,
            backup_retention_days: Optional[int] = None,
            create_mode: Optional[str] = None,
            creation_source_server_id: Optional[str] = None,
            fqdn: Optional[str] = None,
            geo_redundant_backup_enabled: Optional[bool] = None,
            identity: Optional[ServerIdentityArgs] = None,
            infrastructure_encryption_enabled: Optional[bool] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            public_network_access_enabled: Optional[bool] = None,
            resource_group_name: Optional[str] = None,
            restore_point_in_time: Optional[str] = None,
            sku_name: Optional[str] = None,
            ssl_enforcement: Optional[str] = None,
            ssl_enforcement_enabled: Optional[bool] = None,
            ssl_minimal_tls_version_enforced: Optional[str] = None,
            storage_mb: Optional[int] = None,
            storage_profile: Optional[ServerStorageProfileArgs] = None,
            tags: Optional[Mapping[str, str]] = None,
            threat_detection_policy: Optional[ServerThreatDetectionPolicyArgs] = None,
            version: Optional[str] = None) -> Server
    func GetServer(ctx *Context, name string, id IDInput, state *ServerState, opts ...ResourceOption) (*Server, error)
    public static Server Get(string name, Input<string> id, ServerState? state, CustomResourceOptions? opts = null)
    public static Server get(String name, Output<String> id, ServerState state, CustomResourceOptions options)
    resources:  _:    type: azure:postgresql:Server    get:      id: ${id}
    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:
    AdministratorLogin string
    The Administrator Login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    AdministratorLoginPassword string
    The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default.
    AutoGrowEnabled bool
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true.
    BackupRetentionDays int
    Backup retention days for the server, supported values are between 7 and 35 days.
    CreateMode string
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    CreationSourceServerId string
    For creation modes other then default the source server ID to use.
    Fqdn string
    The FQDN of the PostgreSQL Server.
    GeoRedundantBackupEnabled bool
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
    Identity ServerIdentity
    An identity block as defined below.
    InfrastructureEncryptionEnabled bool
    Whether or not infrastructure is encrypted for this server. Defaults to false. Changing this forces a new resource to be created.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is allowed for this server. Defaults to true.
    ResourceGroupName string
    The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
    RestorePointInTime string
    When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id.
    SkuName string
    Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.
    SslEnforcement string

    Deprecated: this has been renamed to the boolean ssl_enforcement_enabled and will be removed in version 3.0 of the provider.

    SslEnforcementEnabled bool
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    SslMinimalTlsVersionEnforced string
    The mimimun TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLSEnforcementDisabled.
    StorageMb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    StorageProfile ServerStorageProfile

    Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.

    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    ThreatDetectionPolicy ServerThreatDetectionPolicy
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    Version string
    Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, and 11. Changing this forces a new resource to be created.
    AdministratorLogin string
    The Administrator Login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    AdministratorLoginPassword string
    The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default.
    AutoGrowEnabled bool
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true.
    BackupRetentionDays int
    Backup retention days for the server, supported values are between 7 and 35 days.
    CreateMode string
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    CreationSourceServerId string
    For creation modes other then default the source server ID to use.
    Fqdn string
    The FQDN of the PostgreSQL Server.
    GeoRedundantBackupEnabled bool
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
    Identity ServerIdentityArgs
    An identity block as defined below.
    InfrastructureEncryptionEnabled bool
    Whether or not infrastructure is encrypted for this server. Defaults to false. Changing this forces a new resource to be created.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is allowed for this server. Defaults to true.
    ResourceGroupName string
    The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
    RestorePointInTime string
    When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id.
    SkuName string
    Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.
    SslEnforcement string

    Deprecated: this has been renamed to the boolean ssl_enforcement_enabled and will be removed in version 3.0 of the provider.

    SslEnforcementEnabled bool
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    SslMinimalTlsVersionEnforced string
    The mimimun TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLSEnforcementDisabled.
    StorageMb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    StorageProfile ServerStorageProfileArgs

    Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.

    Tags map[string]string
    A mapping of tags to assign to the resource.
    ThreatDetectionPolicy ServerThreatDetectionPolicyArgs
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    Version string
    Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, and 11. Changing this forces a new resource to be created.
    administratorLogin String
    The Administrator Login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administratorLoginPassword String
    The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default.
    autoGrowEnabled Boolean
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true.
    backupRetentionDays Integer
    Backup retention days for the server, supported values are between 7 and 35 days.
    createMode String
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creationSourceServerId String
    For creation modes other then default the source server ID to use.
    fqdn String
    The FQDN of the PostgreSQL Server.
    geoRedundantBackupEnabled Boolean
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
    identity ServerIdentity
    An identity block as defined below.
    infrastructureEncryptionEnabled Boolean
    Whether or not infrastructure is encrypted for this server. Defaults to false. Changing this forces a new resource to be created.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is allowed for this server. Defaults to true.
    resourceGroupName String
    The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
    restorePointInTime String
    When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id.
    skuName String
    Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.
    sslEnforcement String

    Deprecated: this has been renamed to the boolean ssl_enforcement_enabled and will be removed in version 3.0 of the provider.

    sslEnforcementEnabled Boolean
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    sslMinimalTlsVersionEnforced String
    The mimimun TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLSEnforcementDisabled.
    storageMb Integer
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    storageProfile ServerStorageProfile

    Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.

    tags Map<String,String>
    A mapping of tags to assign to the resource.
    threatDetectionPolicy ServerThreatDetectionPolicy
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    version String
    Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, and 11. Changing this forces a new resource to be created.
    administratorLogin string
    The Administrator Login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administratorLoginPassword string
    The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default.
    autoGrowEnabled boolean
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true.
    backupRetentionDays number
    Backup retention days for the server, supported values are between 7 and 35 days.
    createMode string
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creationSourceServerId string
    For creation modes other then default the source server ID to use.
    fqdn string
    The FQDN of the PostgreSQL Server.
    geoRedundantBackupEnabled boolean
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
    identity ServerIdentity
    An identity block as defined below.
    infrastructureEncryptionEnabled boolean
    Whether or not infrastructure is encrypted for this server. Defaults to false. Changing this forces a new resource to be created.
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name string
    Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
    publicNetworkAccessEnabled boolean
    Whether or not public network access is allowed for this server. Defaults to true.
    resourceGroupName string
    The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
    restorePointInTime string
    When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id.
    skuName string
    Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.
    sslEnforcement string

    Deprecated: this has been renamed to the boolean ssl_enforcement_enabled and will be removed in version 3.0 of the provider.

    sslEnforcementEnabled boolean
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    sslMinimalTlsVersionEnforced string
    The mimimun TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLSEnforcementDisabled.
    storageMb number
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    storageProfile ServerStorageProfile

    Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.

    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    threatDetectionPolicy ServerThreatDetectionPolicy
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    version string
    Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, and 11. Changing this forces a new resource to be created.
    administrator_login str
    The Administrator Login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administrator_login_password str
    The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default.
    auto_grow_enabled bool
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true.
    backup_retention_days int
    Backup retention days for the server, supported values are between 7 and 35 days.
    create_mode str
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creation_source_server_id str
    For creation modes other then default the source server ID to use.
    fqdn str
    The FQDN of the PostgreSQL Server.
    geo_redundant_backup_enabled bool
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
    identity ServerIdentityArgs
    An identity block as defined below.
    infrastructure_encryption_enabled bool
    Whether or not infrastructure is encrypted for this server. Defaults to false. Changing this forces a new resource to be created.
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name str
    Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
    public_network_access_enabled bool
    Whether or not public network access is allowed for this server. Defaults to true.
    resource_group_name str
    The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
    restore_point_in_time str
    When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id.
    sku_name str
    Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.
    ssl_enforcement str

    Deprecated: this has been renamed to the boolean ssl_enforcement_enabled and will be removed in version 3.0 of the provider.

    ssl_enforcement_enabled bool
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    ssl_minimal_tls_version_enforced str
    The mimimun TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLSEnforcementDisabled.
    storage_mb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    storage_profile ServerStorageProfileArgs

    Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.

    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    threat_detection_policy ServerThreatDetectionPolicyArgs
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    version str
    Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, and 11. Changing this forces a new resource to be created.
    administratorLogin String
    The Administrator Login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administratorLoginPassword String
    The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default.
    autoGrowEnabled Boolean
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true.
    backupRetentionDays Number
    Backup retention days for the server, supported values are between 7 and 35 days.
    createMode String
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creationSourceServerId String
    For creation modes other then default the source server ID to use.
    fqdn String
    The FQDN of the PostgreSQL Server.
    geoRedundantBackupEnabled Boolean
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created.
    identity Property Map
    An identity block as defined below.
    infrastructureEncryptionEnabled Boolean
    Whether or not infrastructure is encrypted for this server. Defaults to false. Changing this forces a new resource to be created.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is allowed for this server. Defaults to true.
    resourceGroupName String
    The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
    restorePointInTime String
    When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id.
    skuName String
    Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.
    sslEnforcement String

    Deprecated: this has been renamed to the boolean ssl_enforcement_enabled and will be removed in version 3.0 of the provider.

    sslEnforcementEnabled Boolean
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    sslMinimalTlsVersionEnforced String
    The mimimun TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLSEnforcementDisabled.
    storageMb Number
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    storageProfile Property Map

    Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.

    tags Map<String>
    A mapping of tags to assign to the resource.
    threatDetectionPolicy Property Map
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    version String
    Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, and 11. Changing this forces a new resource to be created.

    Supporting Types

    ServerIdentity, ServerIdentityArgs

    Type string
    The Type of Identity which should be used for this PostgreSQL Server. At this time the only possible value is SystemAssigned.
    PrincipalId string
    The Client ID of the Service Principal assigned to this PostgreSQL Server.
    TenantId string
    The ID of the Tenant the Service Principal is assigned in.
    Type string
    The Type of Identity which should be used for this PostgreSQL Server. At this time the only possible value is SystemAssigned.
    PrincipalId string
    The Client ID of the Service Principal assigned to this PostgreSQL Server.
    TenantId string
    The ID of the Tenant the Service Principal is assigned in.
    type String
    The Type of Identity which should be used for this PostgreSQL Server. At this time the only possible value is SystemAssigned.
    principalId String
    The Client ID of the Service Principal assigned to this PostgreSQL Server.
    tenantId String
    The ID of the Tenant the Service Principal is assigned in.
    type string
    The Type of Identity which should be used for this PostgreSQL Server. At this time the only possible value is SystemAssigned.
    principalId string
    The Client ID of the Service Principal assigned to this PostgreSQL Server.
    tenantId string
    The ID of the Tenant the Service Principal is assigned in.
    type str
    The Type of Identity which should be used for this PostgreSQL Server. At this time the only possible value is SystemAssigned.
    principal_id str
    The Client ID of the Service Principal assigned to this PostgreSQL Server.
    tenant_id str
    The ID of the Tenant the Service Principal is assigned in.
    type String
    The Type of Identity which should be used for this PostgreSQL Server. At this time the only possible value is SystemAssigned.
    principalId String
    The Client ID of the Service Principal assigned to this PostgreSQL Server.
    tenantId String
    The ID of the Tenant the Service Principal is assigned in.

    ServerStorageProfile, ServerStorageProfileArgs

    AutoGrow string

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    BackupRetentionDays int
    Backup retention days for the server, supported values are between 7 and 35 days.

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    GeoRedundantBackup string

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    StorageMb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    AutoGrow string

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    BackupRetentionDays int
    Backup retention days for the server, supported values are between 7 and 35 days.

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    GeoRedundantBackup string

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    StorageMb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    autoGrow String

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    backupRetentionDays Integer
    Backup retention days for the server, supported values are between 7 and 35 days.

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    geoRedundantBackup String

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    storageMb Integer
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    autoGrow string

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    backupRetentionDays number
    Backup retention days for the server, supported values are between 7 and 35 days.

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    geoRedundantBackup string

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    storageMb number
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    auto_grow str

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    backup_retention_days int
    Backup retention days for the server, supported values are between 7 and 35 days.

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    geo_redundant_backup str

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    storage_mb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    autoGrow String

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    backupRetentionDays Number
    Backup retention days for the server, supported values are between 7 and 35 days.

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    geoRedundantBackup String

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    storageMb Number
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.

    Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

    ServerThreatDetectionPolicy, ServerThreatDetectionPolicyArgs

    DisabledAlerts List<string>
    Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.
    EmailAccountAdmins bool
    Should the account administrators be emailed when this alert is triggered?
    EmailAddresses List<string>
    A list of email addresses which alerts should be sent to.
    Enabled bool
    Is the policy enabled?
    RetentionDays int
    Specifies the number of days to keep in the Threat Detection audit logs.
    StorageAccountAccessKey string
    Specifies the identifier key of the Threat Detection audit storage account.
    StorageEndpoint string
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
    DisabledAlerts []string
    Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.
    EmailAccountAdmins bool
    Should the account administrators be emailed when this alert is triggered?
    EmailAddresses []string
    A list of email addresses which alerts should be sent to.
    Enabled bool
    Is the policy enabled?
    RetentionDays int
    Specifies the number of days to keep in the Threat Detection audit logs.
    StorageAccountAccessKey string
    Specifies the identifier key of the Threat Detection audit storage account.
    StorageEndpoint string
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
    disabledAlerts List<String>
    Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.
    emailAccountAdmins Boolean
    Should the account administrators be emailed when this alert is triggered?
    emailAddresses List<String>
    A list of email addresses which alerts should be sent to.
    enabled Boolean
    Is the policy enabled?
    retentionDays Integer
    Specifies the number of days to keep in the Threat Detection audit logs.
    storageAccountAccessKey String
    Specifies the identifier key of the Threat Detection audit storage account.
    storageEndpoint String
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
    disabledAlerts string[]
    Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.
    emailAccountAdmins boolean
    Should the account administrators be emailed when this alert is triggered?
    emailAddresses string[]
    A list of email addresses which alerts should be sent to.
    enabled boolean
    Is the policy enabled?
    retentionDays number
    Specifies the number of days to keep in the Threat Detection audit logs.
    storageAccountAccessKey string
    Specifies the identifier key of the Threat Detection audit storage account.
    storageEndpoint string
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
    disabled_alerts Sequence[str]
    Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.
    email_account_admins bool
    Should the account administrators be emailed when this alert is triggered?
    email_addresses Sequence[str]
    A list of email addresses which alerts should be sent to.
    enabled bool
    Is the policy enabled?
    retention_days int
    Specifies the number of days to keep in the Threat Detection audit logs.
    storage_account_access_key str
    Specifies the identifier key of the Threat Detection audit storage account.
    storage_endpoint str
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
    disabledAlerts List<String>
    Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.
    emailAccountAdmins Boolean
    Should the account administrators be emailed when this alert is triggered?
    emailAddresses List<String>
    A list of email addresses which alerts should be sent to.
    enabled Boolean
    Is the policy enabled?
    retentionDays Number
    Specifies the number of days to keep in the Threat Detection audit logs.
    storageAccountAccessKey String
    Specifies the identifier key of the Threat Detection audit storage account.
    storageEndpoint String
    Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.

    Import

    PostgreSQL Server’s can be imported using the resource id, e.g.

     $ pulumi import azure:postgresql/server:Server server1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforPostgreSQL/servers/server1
    

    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.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.