We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this data source to access information about an existing PostgreSQL Flexible Server.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.PostgreSql.GetFlexibleServer.InvokeAsync(new Azure.PostgreSql.GetFlexibleServerArgs
{
Name = "existing-postgresql-fs",
ResourceGroupName = "existing-postgresql-resgroup",
}));
this.Id = example.Apply(example => example.Id);
}
[Output("id")]
public Output<string> Id { get; set; }
}
package main
import (
"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 {
example, err := postgresql.LookupFlexibleServer(ctx, &postgresql.LookupFlexibleServerArgs{
Name: "existing-postgresql-fs",
ResourceGroupName: "existing-postgresql-resgroup",
}, nil)
if err != nil {
return err
}
ctx.Export("id", example.Id)
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.postgresql.getFlexibleServer({
name: "existing-postgresql-fs",
resourceGroupName: "existing-postgresql-resgroup",
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.postgresql.get_flexible_server(name="existing-postgresql-fs",
resource_group_name="existing-postgresql-resgroup")
pulumi.export("id", example.id)
Example coming soon!
Using getFlexibleServer
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFlexibleServer(args: GetFlexibleServerArgs, opts?: InvokeOptions): Promise<GetFlexibleServerResult>
function getFlexibleServerOutput(args: GetFlexibleServerOutputArgs, opts?: InvokeOptions): Output<GetFlexibleServerResult>def get_flexible_server(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFlexibleServerResult
def get_flexible_server_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetFlexibleServerResult]func LookupFlexibleServer(ctx *Context, args *LookupFlexibleServerArgs, opts ...InvokeOption) (*LookupFlexibleServerResult, error)
func LookupFlexibleServerOutput(ctx *Context, args *LookupFlexibleServerOutputArgs, opts ...InvokeOption) LookupFlexibleServerResultOutput> Note: This function is named LookupFlexibleServer in the Go SDK.
public static class GetFlexibleServer
{
public static Task<GetFlexibleServerResult> InvokeAsync(GetFlexibleServerArgs args, InvokeOptions? opts = null)
public static Output<GetFlexibleServerResult> Invoke(GetFlexibleServerInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFlexibleServerResult> getFlexibleServer(GetFlexibleServerArgs args, InvokeOptions options)
public static Output<GetFlexibleServerResult> getFlexibleServer(GetFlexibleServerArgs args, InvokeOptions options)
fn::invoke:
function: azure:postgresql/getFlexibleServer:getFlexibleServer
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of this PostgreSQL Flexible Server.
- Resource
Group stringName - The name of the Resource Group where the PostgreSQL Flexible Server exists.
- Name string
- The name of this PostgreSQL Flexible Server.
- Resource
Group stringName - The name of the Resource Group where the PostgreSQL Flexible Server exists.
- name String
- The name of this PostgreSQL Flexible Server.
- resource
Group StringName - The name of the Resource Group where the PostgreSQL Flexible Server exists.
- name string
- The name of this PostgreSQL Flexible Server.
- resource
Group stringName - The name of the Resource Group where the PostgreSQL Flexible Server exists.
- name str
- The name of this PostgreSQL Flexible Server.
- resource_
group_ strname - The name of the Resource Group where the PostgreSQL Flexible Server exists.
- name String
- The name of this PostgreSQL Flexible Server.
- resource
Group StringName - The name of the Resource Group where the PostgreSQL Flexible Server exists.
getFlexibleServer Result
The following output properties are available:
- Administrator
Login string - The Administrator Login for the PostgreSQL Flexible Server.
- Backup
Retention intDays - The backup retention days for the PostgreSQL Flexible Server.
- Cmk
Enabled string - The status showing whether the data encryption is enabled with a customer-managed key.
- Delegated
Subnet stringId - The ID of the virtual network subnet to create the PostgreSQL Flexible Server.
- Fqdn string
- The FQDN of the PostgreSQL Flexible Server.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The Azure Region where the PostgreSQL Flexible Server exists.
- Name string
- Public
Network boolAccess Enabled - Is public network access enabled?
- Resource
Group stringName - Sku
Name string - The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the
tier+namepattern (e.g.B_Standard_B1ms,GP_Standard_D2s_v3,MO_Standard_E4s_v3). - Storage
Mb int - The max storage allowed for the PostgreSQL Flexible Server.
- Dictionary<string, string>
- A mapping of tags assigned to the PostgreSQL Flexible Server.
- Version string
- The version of PostgreSQL Flexible Server to use.
- Administrator
Login string - The Administrator Login for the PostgreSQL Flexible Server.
- Backup
Retention intDays - The backup retention days for the PostgreSQL Flexible Server.
- Cmk
Enabled string - The status showing whether the data encryption is enabled with a customer-managed key.
- Delegated
Subnet stringId - The ID of the virtual network subnet to create the PostgreSQL Flexible Server.
- Fqdn string
- The FQDN of the PostgreSQL Flexible Server.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The Azure Region where the PostgreSQL Flexible Server exists.
- Name string
- Public
Network boolAccess Enabled - Is public network access enabled?
- Resource
Group stringName - Sku
Name string - The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the
tier+namepattern (e.g.B_Standard_B1ms,GP_Standard_D2s_v3,MO_Standard_E4s_v3). - Storage
Mb int - The max storage allowed for the PostgreSQL Flexible Server.
- map[string]string
- A mapping of tags assigned to the PostgreSQL Flexible Server.
- Version string
- The version of PostgreSQL Flexible Server to use.
- administrator
Login String - The Administrator Login for the PostgreSQL Flexible Server.
- backup
Retention IntegerDays - The backup retention days for the PostgreSQL Flexible Server.
- cmk
Enabled String - The status showing whether the data encryption is enabled with a customer-managed key.
- delegated
Subnet StringId - The ID of the virtual network subnet to create the PostgreSQL Flexible Server.
- fqdn String
- The FQDN of the PostgreSQL Flexible Server.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The Azure Region where the PostgreSQL Flexible Server exists.
- name String
- public
Network BooleanAccess Enabled - Is public network access enabled?
- resource
Group StringName - sku
Name String - The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the
tier+namepattern (e.g.B_Standard_B1ms,GP_Standard_D2s_v3,MO_Standard_E4s_v3). - storage
Mb Integer - The max storage allowed for the PostgreSQL Flexible Server.
- Map<String,String>
- A mapping of tags assigned to the PostgreSQL Flexible Server.
- version String
- The version of PostgreSQL Flexible Server to use.
- administrator
Login string - The Administrator Login for the PostgreSQL Flexible Server.
- backup
Retention numberDays - The backup retention days for the PostgreSQL Flexible Server.
- cmk
Enabled string - The status showing whether the data encryption is enabled with a customer-managed key.
- delegated
Subnet stringId - The ID of the virtual network subnet to create the PostgreSQL Flexible Server.
- fqdn string
- The FQDN of the PostgreSQL Flexible Server.
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- The Azure Region where the PostgreSQL Flexible Server exists.
- name string
- public
Network booleanAccess Enabled - Is public network access enabled?
- resource
Group stringName - sku
Name string - The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the
tier+namepattern (e.g.B_Standard_B1ms,GP_Standard_D2s_v3,MO_Standard_E4s_v3). - storage
Mb number - The max storage allowed for the PostgreSQL Flexible Server.
- {[key: string]: string}
- A mapping of tags assigned to the PostgreSQL Flexible Server.
- version string
- The version of PostgreSQL Flexible Server to use.
- administrator_
login str - The Administrator Login for the PostgreSQL Flexible Server.
- backup_
retention_ intdays - The backup retention days for the PostgreSQL Flexible Server.
- cmk_
enabled str - The status showing whether the data encryption is enabled with a customer-managed key.
- delegated_
subnet_ strid - The ID of the virtual network subnet to create the PostgreSQL Flexible Server.
- fqdn str
- The FQDN of the PostgreSQL Flexible Server.
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- The Azure Region where the PostgreSQL Flexible Server exists.
- name str
- public_
network_ boolaccess_ enabled - Is public network access enabled?
- resource_
group_ strname - sku_
name str - The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the
tier+namepattern (e.g.B_Standard_B1ms,GP_Standard_D2s_v3,MO_Standard_E4s_v3). - storage_
mb int - The max storage allowed for the PostgreSQL Flexible Server.
- Mapping[str, str]
- A mapping of tags assigned to the PostgreSQL Flexible Server.
- version str
- The version of PostgreSQL Flexible Server to use.
- administrator
Login String - The Administrator Login for the PostgreSQL Flexible Server.
- backup
Retention NumberDays - The backup retention days for the PostgreSQL Flexible Server.
- cmk
Enabled String - The status showing whether the data encryption is enabled with a customer-managed key.
- delegated
Subnet StringId - The ID of the virtual network subnet to create the PostgreSQL Flexible Server.
- fqdn String
- The FQDN of the PostgreSQL Flexible Server.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The Azure Region where the PostgreSQL Flexible Server exists.
- name String
- public
Network BooleanAccess Enabled - Is public network access enabled?
- resource
Group StringName - sku
Name String - The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the
tier+namepattern (e.g.B_Standard_B1ms,GP_Standard_D2s_v3,MO_Standard_E4s_v3). - storage
Mb Number - The max storage allowed for the PostgreSQL Flexible Server.
- Map<String>
- A mapping of tags assigned to the PostgreSQL Flexible Server.
- version String
- The version of PostgreSQL Flexible Server to use.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
