1. Packages
  2. Azure Classic
  3. API Docs
  4. cosmosdb
  5. PostgresqlNodeConfiguration

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.cosmosdb.PostgresqlNodeConfiguration

Explore with Pulumi AI

Sets a Node Configuration value on Azure Cosmos DB for PostgreSQL Cluster.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const examplePostgresqlCluster = new azure.cosmosdb.PostgresqlCluster("example", {
    name: "examplecluster",
    resourceGroupName: example.name,
    location: example.location,
    administratorLoginPassword: "H@Sh1CoR3!",
    coordinatorStorageQuotaInMb: 131072,
    coordinatorVcoreCount: 2,
    nodeCount: 2,
    nodeStorageQuotaInMb: 131072,
    nodeVcores: 2,
});
const examplePostgresqlNodeConfiguration = new azure.cosmosdb.PostgresqlNodeConfiguration("example", {
    name: "array_nulls",
    clusterId: examplePostgresqlCluster.id,
    value: "on",
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_postgresql_cluster = azure.cosmosdb.PostgresqlCluster("example",
    name="examplecluster",
    resource_group_name=example.name,
    location=example.location,
    administrator_login_password="H@Sh1CoR3!",
    coordinator_storage_quota_in_mb=131072,
    coordinator_vcore_count=2,
    node_count=2,
    node_storage_quota_in_mb=131072,
    node_vcores=2)
example_postgresql_node_configuration = azure.cosmosdb.PostgresqlNodeConfiguration("example",
    name="array_nulls",
    cluster_id=example_postgresql_cluster.id,
    value="on")
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cosmosdb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		examplePostgresqlCluster, err := cosmosdb.NewPostgresqlCluster(ctx, "example", &cosmosdb.PostgresqlClusterArgs{
			Name:                        pulumi.String("examplecluster"),
			ResourceGroupName:           example.Name,
			Location:                    example.Location,
			AdministratorLoginPassword:  pulumi.String("H@Sh1CoR3!"),
			CoordinatorStorageQuotaInMb: pulumi.Int(131072),
			CoordinatorVcoreCount:       pulumi.Int(2),
			NodeCount:                   pulumi.Int(2),
			NodeStorageQuotaInMb:        pulumi.Int(131072),
			NodeVcores:                  pulumi.Int(2),
		})
		if err != nil {
			return err
		}
		_, err = cosmosdb.NewPostgresqlNodeConfiguration(ctx, "example", &cosmosdb.PostgresqlNodeConfigurationArgs{
			Name:      pulumi.String("array_nulls"),
			ClusterId: examplePostgresqlCluster.ID(),
			Value:     pulumi.String("on"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });

    var examplePostgresqlCluster = new Azure.CosmosDB.PostgresqlCluster("example", new()
    {
        Name = "examplecluster",
        ResourceGroupName = example.Name,
        Location = example.Location,
        AdministratorLoginPassword = "H@Sh1CoR3!",
        CoordinatorStorageQuotaInMb = 131072,
        CoordinatorVcoreCount = 2,
        NodeCount = 2,
        NodeStorageQuotaInMb = 131072,
        NodeVcores = 2,
    });

    var examplePostgresqlNodeConfiguration = new Azure.CosmosDB.PostgresqlNodeConfiguration("example", new()
    {
        Name = "array_nulls",
        ClusterId = examplePostgresqlCluster.Id,
        Value = "on",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.cosmosdb.PostgresqlCluster;
import com.pulumi.azure.cosmosdb.PostgresqlClusterArgs;
import com.pulumi.azure.cosmosdb.PostgresqlNodeConfiguration;
import com.pulumi.azure.cosmosdb.PostgresqlNodeConfigurationArgs;
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) {
        var example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());

        var examplePostgresqlCluster = new PostgresqlCluster("examplePostgresqlCluster", PostgresqlClusterArgs.builder()
            .name("examplecluster")
            .resourceGroupName(example.name())
            .location(example.location())
            .administratorLoginPassword("H@Sh1CoR3!")
            .coordinatorStorageQuotaInMb(131072)
            .coordinatorVcoreCount(2)
            .nodeCount(2)
            .nodeStorageQuotaInMb(131072)
            .nodeVcores(2)
            .build());

        var examplePostgresqlNodeConfiguration = new PostgresqlNodeConfiguration("examplePostgresqlNodeConfiguration", PostgresqlNodeConfigurationArgs.builder()
            .name("array_nulls")
            .clusterId(examplePostgresqlCluster.id())
            .value("on")
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  examplePostgresqlCluster:
    type: azure:cosmosdb:PostgresqlCluster
    name: example
    properties:
      name: examplecluster
      resourceGroupName: ${example.name}
      location: ${example.location}
      administratorLoginPassword: H@Sh1CoR3!
      coordinatorStorageQuotaInMb: 131072
      coordinatorVcoreCount: 2
      nodeCount: 2
      nodeStorageQuotaInMb: 131072
      nodeVcores: 2
  examplePostgresqlNodeConfiguration:
    type: azure:cosmosdb:PostgresqlNodeConfiguration
    name: example
    properties:
      name: array_nulls
      clusterId: ${examplePostgresqlCluster.id}
      value: on
Copy

Create PostgresqlNodeConfiguration Resource

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

Constructor syntax

new PostgresqlNodeConfiguration(name: string, args: PostgresqlNodeConfigurationArgs, opts?: CustomResourceOptions);
@overload
def PostgresqlNodeConfiguration(resource_name: str,
                                args: PostgresqlNodeConfigurationArgs,
                                opts: Optional[ResourceOptions] = None)

@overload
def PostgresqlNodeConfiguration(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                cluster_id: Optional[str] = None,
                                value: Optional[str] = None,
                                name: Optional[str] = None)
func NewPostgresqlNodeConfiguration(ctx *Context, name string, args PostgresqlNodeConfigurationArgs, opts ...ResourceOption) (*PostgresqlNodeConfiguration, error)
public PostgresqlNodeConfiguration(string name, PostgresqlNodeConfigurationArgs args, CustomResourceOptions? opts = null)
public PostgresqlNodeConfiguration(String name, PostgresqlNodeConfigurationArgs args)
public PostgresqlNodeConfiguration(String name, PostgresqlNodeConfigurationArgs args, CustomResourceOptions options)
type: azure:cosmosdb:PostgresqlNodeConfiguration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PostgresqlNodeConfigurationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PostgresqlNodeConfigurationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PostgresqlNodeConfigurationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PostgresqlNodeConfigurationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PostgresqlNodeConfigurationArgs
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 postgresqlNodeConfigurationResource = new Azure.CosmosDB.PostgresqlNodeConfiguration("postgresqlNodeConfigurationResource", new()
{
    ClusterId = "string",
    Value = "string",
    Name = "string",
});
Copy
example, err := cosmosdb.NewPostgresqlNodeConfiguration(ctx, "postgresqlNodeConfigurationResource", &cosmosdb.PostgresqlNodeConfigurationArgs{
	ClusterId: pulumi.String("string"),
	Value:     pulumi.String("string"),
	Name:      pulumi.String("string"),
})
Copy
var postgresqlNodeConfigurationResource = new PostgresqlNodeConfiguration("postgresqlNodeConfigurationResource", PostgresqlNodeConfigurationArgs.builder()
    .clusterId("string")
    .value("string")
    .name("string")
    .build());
Copy
postgresql_node_configuration_resource = azure.cosmosdb.PostgresqlNodeConfiguration("postgresqlNodeConfigurationResource",
    cluster_id="string",
    value="string",
    name="string")
Copy
const postgresqlNodeConfigurationResource = new azure.cosmosdb.PostgresqlNodeConfiguration("postgresqlNodeConfigurationResource", {
    clusterId: "string",
    value: "string",
    name: "string",
});
Copy
type: azure:cosmosdb:PostgresqlNodeConfiguration
properties:
    clusterId: string
    name: string
    value: string
Copy

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

ClusterId
This property is required.
Changes to this property will trigger replacement.
string
The resource ID of the Azure Cosmos DB for PostgreSQL Cluster where we want to change configuration. Changing this forces a new resource to be created.
Value This property is required. string
The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster.
Name Changes to this property will trigger replacement. string
The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
ClusterId
This property is required.
Changes to this property will trigger replacement.
string
The resource ID of the Azure Cosmos DB for PostgreSQL Cluster where we want to change configuration. Changing this forces a new resource to be created.
Value This property is required. string
The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster.
Name Changes to this property will trigger replacement. string
The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
clusterId
This property is required.
Changes to this property will trigger replacement.
String
The resource ID of the Azure Cosmos DB for PostgreSQL Cluster where we want to change configuration. Changing this forces a new resource to be created.
value This property is required. String
The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster.
name Changes to this property will trigger replacement. String
The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
clusterId
This property is required.
Changes to this property will trigger replacement.
string
The resource ID of the Azure Cosmos DB for PostgreSQL Cluster where we want to change configuration. Changing this forces a new resource to be created.
value This property is required. string
The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster.
name Changes to this property will trigger replacement. string
The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
cluster_id
This property is required.
Changes to this property will trigger replacement.
str
The resource ID of the Azure Cosmos DB for PostgreSQL Cluster where we want to change configuration. Changing this forces a new resource to be created.
value This property is required. str
The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster.
name Changes to this property will trigger replacement. str
The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
clusterId
This property is required.
Changes to this property will trigger replacement.
String
The resource ID of the Azure Cosmos DB for PostgreSQL Cluster where we want to change configuration. Changing this forces a new resource to be created.
value This property is required. String
The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster.
name Changes to this property will trigger replacement. String
The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing PostgresqlNodeConfiguration Resource

Get an existing PostgresqlNodeConfiguration 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?: PostgresqlNodeConfigurationState, opts?: CustomResourceOptions): PostgresqlNodeConfiguration
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cluster_id: Optional[str] = None,
        name: Optional[str] = None,
        value: Optional[str] = None) -> PostgresqlNodeConfiguration
func GetPostgresqlNodeConfiguration(ctx *Context, name string, id IDInput, state *PostgresqlNodeConfigurationState, opts ...ResourceOption) (*PostgresqlNodeConfiguration, error)
public static PostgresqlNodeConfiguration Get(string name, Input<string> id, PostgresqlNodeConfigurationState? state, CustomResourceOptions? opts = null)
public static PostgresqlNodeConfiguration get(String name, Output<String> id, PostgresqlNodeConfigurationState state, CustomResourceOptions options)
resources:  _:    type: azure:cosmosdb:PostgresqlNodeConfiguration    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ClusterId Changes to this property will trigger replacement. string
The resource ID of the Azure Cosmos DB for PostgreSQL Cluster where we want to change configuration. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
Value string
The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster.
ClusterId Changes to this property will trigger replacement. string
The resource ID of the Azure Cosmos DB for PostgreSQL Cluster where we want to change configuration. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
Value string
The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster.
clusterId Changes to this property will trigger replacement. String
The resource ID of the Azure Cosmos DB for PostgreSQL Cluster where we want to change configuration. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
value String
The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster.
clusterId Changes to this property will trigger replacement. string
The resource ID of the Azure Cosmos DB for PostgreSQL Cluster where we want to change configuration. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. string
The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
value string
The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster.
cluster_id Changes to this property will trigger replacement. str
The resource ID of the Azure Cosmos DB for PostgreSQL Cluster where we want to change configuration. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. str
The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
value str
The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster.
clusterId Changes to this property will trigger replacement. String
The resource ID of the Azure Cosmos DB for PostgreSQL Cluster where we want to change configuration. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created.
value String
The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster.

Import

Node Configurations on Azure Cosmos DB for PostgreSQL Clusters can be imported using the resource id, e.g.

$ pulumi import azure:cosmosdb/postgresqlNodeConfiguration:PostgresqlNodeConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/cluster1/nodeConfigurations/array_nulls
Copy

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.