postgresql

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azurerm repo.

class pulumi_azure.postgresql.Configuration(resource_name, opts=None, name=None, resource_group_name=None, server_name=None, value=None, __props__=None, __name__=None, __opts__=None)

Sets a PostgreSQL Configuration value on a PostgreSQL Server.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.

  • value (pulumi.Input[str]) – Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values.

name = None

Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.

server_name = None

Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.

value = None

Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values.

static get(resource_name, id, opts=None, name=None, resource_group_name=None, server_name=None, value=None)

Get an existing Configuration resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) –

    Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.

  • value (pulumi.Input[str]) – Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.postgresql.Database(resource_name, opts=None, charset=None, collation=None, name=None, resource_group_name=None, server_name=None, __props__=None, __name__=None, __opts__=None)

Manages a PostgreSQL Database within a PostgreSQL Server

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • charset (pulumi.Input[str]) – Specifies the Charset for the PostgreSQL Database, which needs to be a valid PostgreSQL Charset. Changing this forces a new resource to be created.

  • collation (pulumi.Input[str]) – Specifies the Collation for the PostgreSQL Database, which needs to be a valid PostgreSQL Collation. Note that Microsoft uses different notation - en-US instead of en_US. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the PostgreSQL Database, which needs to be a valid PostgreSQL identifier. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.

charset = None

Specifies the Charset for the PostgreSQL Database, which needs to be a valid PostgreSQL Charset. Changing this forces a new resource to be created.

collation = None

Specifies the Collation for the PostgreSQL Database, which needs to be a valid PostgreSQL Collation. Note that Microsoft uses different notation - en-US instead of en_US. Changing this forces a new resource to be created.

name = None

Specifies the name of the PostgreSQL Database, which needs to be a valid PostgreSQL identifier. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.

server_name = None

Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.

static get(resource_name, id, opts=None, charset=None, collation=None, name=None, resource_group_name=None, server_name=None)

Get an existing Database resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • charset (pulumi.Input[str]) –

    Specifies the Charset for the PostgreSQL Database, which needs to be a valid PostgreSQL Charset. Changing this forces a new resource to be created.

  • collation (pulumi.Input[str]) –

    Specifies the Collation for the PostgreSQL Database, which needs to be a valid PostgreSQL Collation. Note that Microsoft uses different notation - en-US instead of en_US. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) –

    Specifies the name of the PostgreSQL Database, which needs to be a valid PostgreSQL identifier. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.postgresql.FirewallRule(resource_name, opts=None, end_ip_address=None, name=None, resource_group_name=None, server_name=None, start_ip_address=None, __props__=None, __name__=None, __opts__=None)

Manages a Firewall Rule for a PostgreSQL Server

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • end_ip_address (pulumi.Input[str]) – Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.

  • start_ip_address (pulumi.Input[str]) – Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.

end_ip_address = None

Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.

name = None

Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.

server_name = None

Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.

start_ip_address = None

Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.

static get(resource_name, id, opts=None, end_ip_address=None, name=None, resource_group_name=None, server_name=None, start_ip_address=None)

Get an existing FirewallRule resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • end_ip_address (pulumi.Input[str]) – Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.

  • start_ip_address (pulumi.Input[str]) – Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.postgresql.Server(resource_name, opts=None, administrator_login=None, administrator_login_password=None, location=None, name=None, resource_group_name=None, sku=None, ssl_enforcement=None, storage_profile=None, tags=None, version=None, __props__=None, __name__=None, __opts__=None)

Manage a PostgreSQL Server.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • administrator_login (pulumi.Input[str]) – The Administrator Login for the PostgreSQL Server. Changing this forces a new resource to be created.

  • administrator_login_password (pulumi.Input[str]) – The Password associated with the administrator_login for the PostgreSQL Server.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[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.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.

  • sku (pulumi.Input[dict]) – A sku block as defined below.

  • ssl_enforcement (pulumi.Input[str]) – Specifies if SSL should be enforced on connections. Possible values are Enabled and Disabled.

  • storage_profile (pulumi.Input[dict]) – A storage_profile block as defined below.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • version (pulumi.Input[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.

The sku object supports the following:

  • capacity (pulumi.Input[float]) - The scale up/out capacity, representing server’s compute units.

  • family (pulumi.Input[str]) - The family of hardware Gen4 or Gen5, before selecting your family check the product documentation for availability in your region.

  • name (pulumi.Input[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.

  • tier (pulumi.Input[str]) - The tier of the particular SKU. Possible values are Basic, GeneralPurpose, and MemoryOptimized. For more information see the product documentation.

The storage_profile object supports the following:

  • backupRetentionDays (pulumi.Input[float]) - Backup retention days for the server, supported values are between 7 and 35 days.

  • geoRedundantBackup (pulumi.Input[str]) - Enable/Disable Geo-redundant for server backup. Valid values for this property are Enabled or Disabled, not supported for the basic tier. 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. The Basic tier only offers locally redundant backup storage.

  • storageMb (pulumi.Input[float]) - 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 4194304 MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.

administrator_login = None

The Administrator Login for the PostgreSQL Server. Changing this forces a new resource to be created.

administrator_login_password = None

The Password associated with the administrator_login for the PostgreSQL Server.

fqdn = None

The FQDN of the PostgreSQL Server.

location = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name = None

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.

resource_group_name = None

The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.

sku = None

A sku block as defined below.

  • capacity (float) - The scale up/out capacity, representing server’s compute units.

  • family (str) - The family of hardware Gen4 or Gen5, before selecting your family check the product documentation for availability in your region.

  • 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.

  • tier (str) - The tier of the particular SKU. Possible values are Basic, GeneralPurpose, and MemoryOptimized. For more information see the product documentation.

ssl_enforcement = None

Specifies if SSL should be enforced on connections. Possible values are Enabled and Disabled.

storage_profile = None

A storage_profile block as defined below.

  • backupRetentionDays (float) - Backup retention days for the server, supported values are between 7 and 35 days.

  • geoRedundantBackup (str) - Enable/Disable Geo-redundant for server backup. Valid values for this property are Enabled or Disabled, not supported for the basic tier. 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. The Basic tier only offers locally redundant backup storage.

  • storageMb (float) - 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 4194304 MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.

tags = None

A mapping of tags to assign to the resource.

version = None

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.

static get(resource_name, id, opts=None, administrator_login=None, administrator_login_password=None, fqdn=None, location=None, name=None, resource_group_name=None, sku=None, ssl_enforcement=None, storage_profile=None, tags=None, version=None)

Get an existing Server resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • administrator_login (pulumi.Input[str]) – The Administrator Login for the PostgreSQL Server. Changing this forces a new resource to be created.

  • administrator_login_password (pulumi.Input[str]) – The Password associated with the administrator_login for the PostgreSQL Server.

  • fqdn (pulumi.Input[str]) – The FQDN of the PostgreSQL Server.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[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.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.

  • sku (pulumi.Input[dict]) – A sku block as defined below.

  • ssl_enforcement (pulumi.Input[str]) – Specifies if SSL should be enforced on connections. Possible values are Enabled and Disabled.

  • storage_profile (pulumi.Input[dict]) – A storage_profile block as defined below.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • version (pulumi.Input[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.

The sku object supports the following:

  • capacity (pulumi.Input[float]) - The scale up/out capacity, representing server’s compute units.

  • family (pulumi.Input[str]) - The family of hardware Gen4 or Gen5, before selecting your family check the product documentation for availability in your region.

  • name (pulumi.Input[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.

  • tier (pulumi.Input[str]) - The tier of the particular SKU. Possible values are Basic, GeneralPurpose, and MemoryOptimized. For more information see the product documentation.

The storage_profile object supports the following:

  • backupRetentionDays (pulumi.Input[float]) - Backup retention days for the server, supported values are between 7 and 35 days.

  • geoRedundantBackup (pulumi.Input[str]) - Enable/Disable Geo-redundant for server backup. Valid values for this property are Enabled or Disabled, not supported for the basic tier. 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. The Basic tier only offers locally redundant backup storage.

  • storageMb (pulumi.Input[float]) - 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 4194304 MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.postgresql.VirtualNetworkRule(resource_name, opts=None, ignore_missing_vnet_service_endpoint=None, name=None, resource_group_name=None, server_name=None, subnet_id=None, __props__=None, __name__=None, __opts__=None)

Manages a PostgreSQL Virtual Network Rule.

NOTE: PostgreSQL Virtual Network Rules can only be used with SKU Tiers of ``GeneralPurpose` or MemoryOptimized <https://docs.microsoft.com/en-us/azure/postgresql/concepts-data-access-and-security-vnet>`_

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • ignore_missing_vnet_service_endpoint (pulumi.Input[bool]) – Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? Defaults to false.

  • name (pulumi.Input[str]) – The name of the PostgreSQL virtual network rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created.

  • subnet_id (pulumi.Input[str]) – The ID of the subnet that the PostgreSQL server will be connected to.

ignore_missing_vnet_service_endpoint = None

Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? Defaults to false.

name = None

The name of the PostgreSQL virtual network rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created.

server_name = None

The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created.

subnet_id = None

The ID of the subnet that the PostgreSQL server will be connected to.

static get(resource_name, id, opts=None, ignore_missing_vnet_service_endpoint=None, name=None, resource_group_name=None, server_name=None, subnet_id=None)

Get an existing VirtualNetworkRule resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • ignore_missing_vnet_service_endpoint (pulumi.Input[bool]) – Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? Defaults to false.

  • name (pulumi.Input[str]) – The name of the PostgreSQL virtual network rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created.

  • subnet_id (pulumi.Input[str]) – The ID of the subnet that the PostgreSQL server will be connected to.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str