We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.postgresql.getFlexibleServer
Explore with Pulumi AI
Use this data source to access information about an existing PostgreSQL Flexible Server.
Example Usage
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)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.PostgreSql.GetFlexibleServer.Invoke(new()
{
Name = "existing-postgresql-fs",
ResourceGroupName = "existing-postgresql-resgroup",
});
return new Dictionary<string, object?>
{
["id"] = example.Apply(getFlexibleServerResult => getFlexibleServerResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.postgresql.PostgresqlFunctions;
import com.pulumi.azure.postgresql.inputs.GetFlexibleServerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = PostgresqlFunctions.getFlexibleServer(GetFlexibleServerArgs.builder()
.name("existing-postgresql-fs")
.resourceGroupName("existing-postgresql-resgroup")
.build());
ctx.export("id", example.applyValue(getFlexibleServerResult -> getFlexibleServerResult.id()));
}
}
variables:
example:
fn::invoke:
Function: azure:postgresql:getFlexibleServer
Arguments:
name: existing-postgresql-fs
resourceGroupName: existing-postgresql-resgroup
outputs:
id: ${example.id}
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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:postgresql/getFlexibleServer:getFlexibleServer
arguments:
# arguments dictionary
The 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.
- Auto
Grow boolEnabled - Is the storage auto grow for PostgreSQL Flexible Server enabled?
- Backup
Retention intDays - The backup retention days for the PostgreSQL Flexible Server.
- 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
+name
pattern (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.
- Auto
Grow boolEnabled - Is the storage auto grow for PostgreSQL Flexible Server enabled?
- Backup
Retention intDays - The backup retention days for the PostgreSQL Flexible Server.
- 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
+name
pattern (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.
- auto
Grow BooleanEnabled - Is the storage auto grow for PostgreSQL Flexible Server enabled?
- backup
Retention IntegerDays - The backup retention days for the PostgreSQL Flexible Server.
- 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
+name
pattern (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.
- auto
Grow booleanEnabled - Is the storage auto grow for PostgreSQL Flexible Server enabled?
- backup
Retention numberDays - The backup retention days for the PostgreSQL Flexible Server.
- 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
+name
pattern (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.
- auto_
grow_ boolenabled - Is the storage auto grow for PostgreSQL Flexible Server enabled?
- backup_
retention_ intdays - The backup retention days for the PostgreSQL Flexible Server.
- 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
+name
pattern (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.
- auto
Grow BooleanEnabled - Is the storage auto grow for PostgreSQL Flexible Server enabled?
- backup
Retention NumberDays - The backup retention days for the PostgreSQL Flexible Server.
- 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
+name
pattern (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
azurerm
Terraform Provider.