published on Friday, Feb 20, 2026 by stackitcloud
published on Friday, Feb 20, 2026 by stackitcloud
Postgres Flex instance resource schema. Must have a region specified in the provider configuration.
Example Usage
resource "stackit_postgresflex_instance" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-instance"
acl = ["XXX.XXX.XXX.X/XX", "XX.XXX.XX.X/XX"]
backup_schedule = "00 00 * * *"
flavor = {
cpu = 2
ram = 4
}
replicas = 3
storage = {
class = "class"
size = 5
}
version = 14
}
# Only use the import statement, if you want to import an existing postgresflex instance
import {
to = stackit_postgresflex_instance.import-example
id = "${var.project_id},${var.region},${var.postgres_instance_id}"
}
Create PostgresflexInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresflexInstance(name: string, args: PostgresflexInstanceArgs, opts?: CustomResourceOptions);@overload
def PostgresflexInstance(resource_name: str,
args: PostgresflexInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresflexInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
acls: Optional[Sequence[str]] = None,
backup_schedule: Optional[str] = None,
flavor: Optional[PostgresflexInstanceFlavorArgs] = None,
project_id: Optional[str] = None,
replicas: Optional[int] = None,
storage: Optional[PostgresflexInstanceStorageArgs] = None,
version: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None)func NewPostgresflexInstance(ctx *Context, name string, args PostgresflexInstanceArgs, opts ...ResourceOption) (*PostgresflexInstance, error)public PostgresflexInstance(string name, PostgresflexInstanceArgs args, CustomResourceOptions? opts = null)
public PostgresflexInstance(String name, PostgresflexInstanceArgs args)
public PostgresflexInstance(String name, PostgresflexInstanceArgs args, CustomResourceOptions options)
type: stackit:PostgresflexInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PostgresflexInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PostgresflexInstanceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PostgresflexInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresflexInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresflexInstanceArgs
- 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 postgresflexInstanceResource = new Stackit.PostgresflexInstance("postgresflexInstanceResource", new()
{
Acls = new[]
{
"string",
},
BackupSchedule = "string",
Flavor = new Stackit.Inputs.PostgresflexInstanceFlavorArgs
{
Cpu = 0,
Ram = 0,
Description = "string",
Id = "string",
},
ProjectId = "string",
Replicas = 0,
Storage = new Stackit.Inputs.PostgresflexInstanceStorageArgs
{
Class = "string",
Size = 0,
},
Version = "string",
Name = "string",
Region = "string",
});
example, err := stackit.NewPostgresflexInstance(ctx, "postgresflexInstanceResource", &stackit.PostgresflexInstanceArgs{
Acls: pulumi.StringArray{
pulumi.String("string"),
},
BackupSchedule: pulumi.String("string"),
Flavor: &stackit.PostgresflexInstanceFlavorArgs{
Cpu: pulumi.Int(0),
Ram: pulumi.Int(0),
Description: pulumi.String("string"),
Id: pulumi.String("string"),
},
ProjectId: pulumi.String("string"),
Replicas: pulumi.Int(0),
Storage: &stackit.PostgresflexInstanceStorageArgs{
Class: pulumi.String("string"),
Size: pulumi.Int(0),
},
Version: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
var postgresflexInstanceResource = new PostgresflexInstance("postgresflexInstanceResource", PostgresflexInstanceArgs.builder()
.acls("string")
.backupSchedule("string")
.flavor(PostgresflexInstanceFlavorArgs.builder()
.cpu(0)
.ram(0)
.description("string")
.id("string")
.build())
.projectId("string")
.replicas(0)
.storage(PostgresflexInstanceStorageArgs.builder()
.class_("string")
.size(0)
.build())
.version("string")
.name("string")
.region("string")
.build());
postgresflex_instance_resource = stackit.PostgresflexInstance("postgresflexInstanceResource",
acls=["string"],
backup_schedule="string",
flavor={
"cpu": 0,
"ram": 0,
"description": "string",
"id": "string",
},
project_id="string",
replicas=0,
storage={
"class_": "string",
"size": 0,
},
version="string",
name="string",
region="string")
const postgresflexInstanceResource = new stackit.PostgresflexInstance("postgresflexInstanceResource", {
acls: ["string"],
backupSchedule: "string",
flavor: {
cpu: 0,
ram: 0,
description: "string",
id: "string",
},
projectId: "string",
replicas: 0,
storage: {
"class": "string",
size: 0,
},
version: "string",
name: "string",
region: "string",
});
type: stackit:PostgresflexInstance
properties:
acls:
- string
backupSchedule: string
flavor:
cpu: 0
description: string
id: string
ram: 0
name: string
projectId: string
region: string
replicas: 0
storage:
class: string
size: 0
version: string
PostgresflexInstance 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 PostgresflexInstance resource accepts the following input properties:
- Acls List<string>
- The Access Control List (ACL) for the PostgresFlex instance.
- Backup
Schedule string - The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.
- Flavor
Postgresflex
Instance Flavor - Project
Id string - STACKIT project ID to which the instance is associated.
- Replicas int
- How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.
- Storage
Postgresflex
Instance Storage - Version string
- Name string
- Instance name.
- Region string
- The resource region. If not defined, the provider region is used.
- Acls []string
- The Access Control List (ACL) for the PostgresFlex instance.
- Backup
Schedule string - The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.
- Flavor
Postgresflex
Instance Flavor Args - Project
Id string - STACKIT project ID to which the instance is associated.
- Replicas int
- How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.
- Storage
Postgresflex
Instance Storage Args - Version string
- Name string
- Instance name.
- Region string
- The resource region. If not defined, the provider region is used.
- acls List<String>
- The Access Control List (ACL) for the PostgresFlex instance.
- backup
Schedule String - The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.
- flavor
Postgresflex
Instance Flavor - project
Id String - STACKIT project ID to which the instance is associated.
- replicas Integer
- How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.
- storage
Postgresflex
Instance Storage - version String
- name String
- Instance name.
- region String
- The resource region. If not defined, the provider region is used.
- acls string[]
- The Access Control List (ACL) for the PostgresFlex instance.
- backup
Schedule string - The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.
- flavor
Postgresflex
Instance Flavor - project
Id string - STACKIT project ID to which the instance is associated.
- replicas number
- How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.
- storage
Postgresflex
Instance Storage - version string
- name string
- Instance name.
- region string
- The resource region. If not defined, the provider region is used.
- acls Sequence[str]
- The Access Control List (ACL) for the PostgresFlex instance.
- backup_
schedule str - The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.
- flavor
Postgresflex
Instance Flavor Args - project_
id str - STACKIT project ID to which the instance is associated.
- replicas int
- How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.
- storage
Postgresflex
Instance Storage Args - version str
- name str
- Instance name.
- region str
- The resource region. If not defined, the provider region is used.
- acls List<String>
- The Access Control List (ACL) for the PostgresFlex instance.
- backup
Schedule String - The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.
- flavor Property Map
- project
Id String - STACKIT project ID to which the instance is associated.
- replicas Number
- How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.
- storage Property Map
- version String
- name String
- Instance name.
- region String
- The resource region. If not defined, the provider region is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresflexInstance resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - ID of the PostgresFlex instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - ID of the PostgresFlex instance.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - ID of the PostgresFlex instance.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - ID of the PostgresFlex instance.
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
id str - ID of the PostgresFlex instance.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - ID of the PostgresFlex instance.
Look up Existing PostgresflexInstance Resource
Get an existing PostgresflexInstance 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?: PostgresflexInstanceState, opts?: CustomResourceOptions): PostgresflexInstance@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
acls: Optional[Sequence[str]] = None,
backup_schedule: Optional[str] = None,
flavor: Optional[PostgresflexInstanceFlavorArgs] = None,
instance_id: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
replicas: Optional[int] = None,
storage: Optional[PostgresflexInstanceStorageArgs] = None,
version: Optional[str] = None) -> PostgresflexInstancefunc GetPostgresflexInstance(ctx *Context, name string, id IDInput, state *PostgresflexInstanceState, opts ...ResourceOption) (*PostgresflexInstance, error)public static PostgresflexInstance Get(string name, Input<string> id, PostgresflexInstanceState? state, CustomResourceOptions? opts = null)public static PostgresflexInstance get(String name, Output<String> id, PostgresflexInstanceState state, CustomResourceOptions options)resources: _: type: stackit:PostgresflexInstance get: id: ${id}- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Acls List<string>
- The Access Control List (ACL) for the PostgresFlex instance.
- Backup
Schedule string - The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.
- Flavor
Postgresflex
Instance Flavor - Instance
Id string - ID of the PostgresFlex instance.
- Name string
- Instance name.
- Project
Id string - STACKIT project ID to which the instance is associated.
- Region string
- The resource region. If not defined, the provider region is used.
- Replicas int
- How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.
- Storage
Postgresflex
Instance Storage - Version string
- Acls []string
- The Access Control List (ACL) for the PostgresFlex instance.
- Backup
Schedule string - The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.
- Flavor
Postgresflex
Instance Flavor Args - Instance
Id string - ID of the PostgresFlex instance.
- Name string
- Instance name.
- Project
Id string - STACKIT project ID to which the instance is associated.
- Region string
- The resource region. If not defined, the provider region is used.
- Replicas int
- How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.
- Storage
Postgresflex
Instance Storage Args - Version string
- acls List<String>
- The Access Control List (ACL) for the PostgresFlex instance.
- backup
Schedule String - The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.
- flavor
Postgresflex
Instance Flavor - instance
Id String - ID of the PostgresFlex instance.
- name String
- Instance name.
- project
Id String - STACKIT project ID to which the instance is associated.
- region String
- The resource region. If not defined, the provider region is used.
- replicas Integer
- How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.
- storage
Postgresflex
Instance Storage - version String
- acls string[]
- The Access Control List (ACL) for the PostgresFlex instance.
- backup
Schedule string - The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.
- flavor
Postgresflex
Instance Flavor - instance
Id string - ID of the PostgresFlex instance.
- name string
- Instance name.
- project
Id string - STACKIT project ID to which the instance is associated.
- region string
- The resource region. If not defined, the provider region is used.
- replicas number
- How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.
- storage
Postgresflex
Instance Storage - version string
- acls Sequence[str]
- The Access Control List (ACL) for the PostgresFlex instance.
- backup_
schedule str - The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.
- flavor
Postgresflex
Instance Flavor Args - instance_
id str - ID of the PostgresFlex instance.
- name str
- Instance name.
- project_
id str - STACKIT project ID to which the instance is associated.
- region str
- The resource region. If not defined, the provider region is used.
- replicas int
- How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.
- storage
Postgresflex
Instance Storage Args - version str
- acls List<String>
- The Access Control List (ACL) for the PostgresFlex instance.
- backup
Schedule String - The schedule for on what time and how often the database backup will be created. Must be a valid cron expression using numeric minute and hour values, e.g: '0 2 * * *'.
- flavor Property Map
- instance
Id String - ID of the PostgresFlex instance.
- name String
- Instance name.
- project
Id String - STACKIT project ID to which the instance is associated.
- region String
- The resource region. If not defined, the provider region is used.
- replicas Number
- How many replicas the instance should have. Valid values are 1 for single mode or 3 for replication.
- storage Property Map
- version String
Supporting Types
PostgresflexInstanceFlavor, PostgresflexInstanceFlavorArgs
- Cpu int
- Ram int
- Description string
- Id string
- Cpu int
- Ram int
- Description string
- Id string
- cpu Integer
- ram Integer
- description String
- id String
- cpu number
- ram number
- description string
- id string
- cpu int
- ram int
- description str
- id str
- cpu Number
- ram Number
- description String
- id String
PostgresflexInstanceStorage, PostgresflexInstanceStorageArgs
Package Details
- Repository
- stackit stackitcloud/pulumi-stackit
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
stackitTerraform Provider.
published on Friday, Feb 20, 2026 by stackitcloud
