published on Friday, Feb 20, 2026 by stackitcloud
published on Friday, Feb 20, 2026 by stackitcloud
Postgres Flex database resource schema. Must have a region specified in the provider configuration.
Example Usage
resource "stackit_postgresflex_database" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "mydb"
owner = "myusername"
}
# Only use the import statement, if you want to import an existing postgresflex database
import {
to = stackit_postgresflex_database.import-example
id = "${var.project_id},${var.region},${var.postgres_instance_id},${var.postgres_database_id}"
}
Create PostgresflexDatabase Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresflexDatabase(name: string, args: PostgresflexDatabaseArgs, opts?: CustomResourceOptions);@overload
def PostgresflexDatabase(resource_name: str,
args: PostgresflexDatabaseArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresflexDatabase(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
owner: Optional[str] = None,
project_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None)func NewPostgresflexDatabase(ctx *Context, name string, args PostgresflexDatabaseArgs, opts ...ResourceOption) (*PostgresflexDatabase, error)public PostgresflexDatabase(string name, PostgresflexDatabaseArgs args, CustomResourceOptions? opts = null)
public PostgresflexDatabase(String name, PostgresflexDatabaseArgs args)
public PostgresflexDatabase(String name, PostgresflexDatabaseArgs args, CustomResourceOptions options)
type: stackit:PostgresflexDatabase
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 PostgresflexDatabaseArgs
- 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 PostgresflexDatabaseArgs
- 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 PostgresflexDatabaseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresflexDatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresflexDatabaseArgs
- 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 postgresflexDatabaseResource = new Stackit.PostgresflexDatabase("postgresflexDatabaseResource", new()
{
InstanceId = "string",
Owner = "string",
ProjectId = "string",
Name = "string",
Region = "string",
});
example, err := stackit.NewPostgresflexDatabase(ctx, "postgresflexDatabaseResource", &stackit.PostgresflexDatabaseArgs{
InstanceId: pulumi.String("string"),
Owner: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
var postgresflexDatabaseResource = new PostgresflexDatabase("postgresflexDatabaseResource", PostgresflexDatabaseArgs.builder()
.instanceId("string")
.owner("string")
.projectId("string")
.name("string")
.region("string")
.build());
postgresflex_database_resource = stackit.PostgresflexDatabase("postgresflexDatabaseResource",
instance_id="string",
owner="string",
project_id="string",
name="string",
region="string")
const postgresflexDatabaseResource = new stackit.PostgresflexDatabase("postgresflexDatabaseResource", {
instanceId: "string",
owner: "string",
projectId: "string",
name: "string",
region: "string",
});
type: stackit:PostgresflexDatabase
properties:
instanceId: string
name: string
owner: string
projectId: string
region: string
PostgresflexDatabase 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 PostgresflexDatabase resource accepts the following input properties:
- Instance
Id string - ID of the Postgres Flex instance.
- Owner string
- Username of the database owner.
- Project
Id string - STACKIT project ID to which the instance is associated.
- Name string
- Database name.
- Region string
- The resource region. If not defined, the provider region is used.
- Instance
Id string - ID of the Postgres Flex instance.
- Owner string
- Username of the database owner.
- Project
Id string - STACKIT project ID to which the instance is associated.
- Name string
- Database name.
- Region string
- The resource region. If not defined, the provider region is used.
- instance
Id String - ID of the Postgres Flex instance.
- owner String
- Username of the database owner.
- project
Id String - STACKIT project ID to which the instance is associated.
- name String
- Database name.
- region String
- The resource region. If not defined, the provider region is used.
- instance
Id string - ID of the Postgres Flex instance.
- owner string
- Username of the database owner.
- project
Id string - STACKIT project ID to which the instance is associated.
- name string
- Database name.
- region string
- The resource region. If not defined, the provider region is used.
- instance_
id str - ID of the Postgres Flex instance.
- owner str
- Username of the database owner.
- project_
id str - STACKIT project ID to which the instance is associated.
- name str
- Database name.
- region str
- The resource region. If not defined, the provider region is used.
- instance
Id String - ID of the Postgres Flex instance.
- owner String
- Username of the database owner.
- project
Id String - STACKIT project ID to which the instance is associated.
- name String
- Database 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 PostgresflexDatabase resource produces the following output properties:
- Database
Id string - Database ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Database
Id string - Database ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- database
Id String - Database ID.
- id String
- The provider-assigned unique ID for this managed resource.
- database
Id string - Database ID.
- id string
- The provider-assigned unique ID for this managed resource.
- database_
id str - Database ID.
- id str
- The provider-assigned unique ID for this managed resource.
- database
Id String - Database ID.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PostgresflexDatabase Resource
Get an existing PostgresflexDatabase 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?: PostgresflexDatabaseState, opts?: CustomResourceOptions): PostgresflexDatabase@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
database_id: Optional[str] = None,
instance_id: Optional[str] = None,
name: Optional[str] = None,
owner: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None) -> PostgresflexDatabasefunc GetPostgresflexDatabase(ctx *Context, name string, id IDInput, state *PostgresflexDatabaseState, opts ...ResourceOption) (*PostgresflexDatabase, error)public static PostgresflexDatabase Get(string name, Input<string> id, PostgresflexDatabaseState? state, CustomResourceOptions? opts = null)public static PostgresflexDatabase get(String name, Output<String> id, PostgresflexDatabaseState state, CustomResourceOptions options)resources: _: type: stackit:PostgresflexDatabase 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.
- Database
Id string - Database ID.
- Instance
Id string - ID of the Postgres Flex instance.
- Name string
- Database name.
- Owner string
- Username of the database owner.
- 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.
- Database
Id string - Database ID.
- Instance
Id string - ID of the Postgres Flex instance.
- Name string
- Database name.
- Owner string
- Username of the database owner.
- 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.
- database
Id String - Database ID.
- instance
Id String - ID of the Postgres Flex instance.
- name String
- Database name.
- owner String
- Username of the database owner.
- 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.
- database
Id string - Database ID.
- instance
Id string - ID of the Postgres Flex instance.
- name string
- Database name.
- owner string
- Username of the database owner.
- 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.
- database_
id str - Database ID.
- instance_
id str - ID of the Postgres Flex instance.
- name str
- Database name.
- owner str
- Username of the database owner.
- 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.
- database
Id String - Database ID.
- instance
Id String - ID of the Postgres Flex instance.
- name String
- Database name.
- owner String
- Username of the database owner.
- 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.
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
