Skip to content

Data Source: azurermPostgresqlFlexibleServer

Use this data source to access information about an existing PostgreSQL Flexible Server.

Example Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermPostgresqlFlexibleServerExample =
  new azurerm.dataAzurermPostgresqlFlexibleServer.DataAzurermPostgresqlFlexibleServer(
    this,
    "example",
    {
      name: "existing-postgresql-fs",
      resource_group_name: "existing-postgresql-resgroup",
    }
  );
new cdktf.TerraformOutput(this, "id", {
  value: dataAzurermPostgresqlFlexibleServerExample.id,
});

Arguments Reference

The following arguments are supported:

  • name - (Required) The name of this PostgreSQL Flexible Server.

  • resourceGroupName - (Required) The name of the Resource Group where the PostgreSQL Flexible Server exists.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the PostgreSQL Flexible Server.

  • location - The Azure Region where the PostgreSQL Flexible Server exists.

  • administratorLogin - The Administrator login for the PostgreSQL Flexible Server.

  • backupRetentionDays - The backup retention days for the PostgreSQL Flexible Server.

  • delegatedSubnetId - The ID of the virtual network subnet to create the PostgreSQL Flexible Server.

  • fqdn - The FQDN of the PostgreSQL Flexible Server.

  • publicNetworkAccessEnabled - Is public network access enabled?

  • skuName - The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. bStandardB1Ms, gpStandardD2SV3, moStandardE4SV3).

  • storageMb - The max storage allowed for the PostgreSQL Flexible Server.

  • version - The version of PostgreSQL Flexible Server to use.

  • tags - A mapping of tags assigned to the PostgreSQL Flexible Server.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the PostgreSQL Flexible Server.