published on Friday, Feb 20, 2026 by stackitcloud
published on Friday, Feb 20, 2026 by stackitcloud
MongoDB Flex instance resource schema. Must have a region specified in the provider configuration.
Example Usage
resource "stackit_mongodbflex_instance" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-instance"
acl = ["XXX.XXX.XXX.X/XX", "XX.XXX.XX.X/XX"]
flavor = {
cpu = 1
ram = 4
}
replicas = 1
storage = {
class = "class"
size = 10
}
version = "7.0"
options = {
type = "Single"
snapshot_retention_days = 3
point_in_time_window_hours = 30
}
backup_schedule = "0 0 * * *"
}
# Only use the import statement, if you want to import an existing mongodbflex instance
import {
to = stackit_mongodbflex_instance.import-example
id = "${var.project_id},${var.region},${var.instance_id}"
}
Create MongodbflexInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MongodbflexInstance(name: string, args: MongodbflexInstanceArgs, opts?: CustomResourceOptions);@overload
def MongodbflexInstance(resource_name: str,
args: MongodbflexInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MongodbflexInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
acls: Optional[Sequence[str]] = None,
backup_schedule: Optional[str] = None,
flavor: Optional[MongodbflexInstanceFlavorArgs] = None,
options: Optional[MongodbflexInstanceOptionsArgs] = None,
project_id: Optional[str] = None,
replicas: Optional[int] = None,
storage: Optional[MongodbflexInstanceStorageArgs] = None,
version: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None)func NewMongodbflexInstance(ctx *Context, name string, args MongodbflexInstanceArgs, opts ...ResourceOption) (*MongodbflexInstance, error)public MongodbflexInstance(string name, MongodbflexInstanceArgs args, CustomResourceOptions? opts = null)
public MongodbflexInstance(String name, MongodbflexInstanceArgs args)
public MongodbflexInstance(String name, MongodbflexInstanceArgs args, CustomResourceOptions options)
type: stackit:MongodbflexInstance
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 MongodbflexInstanceArgs
- 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 MongodbflexInstanceArgs
- 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 MongodbflexInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MongodbflexInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MongodbflexInstanceArgs
- 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 mongodbflexInstanceResource = new Stackit.MongodbflexInstance("mongodbflexInstanceResource", new()
{
Acls = new[]
{
"string",
},
BackupSchedule = "string",
Flavor = new Stackit.Inputs.MongodbflexInstanceFlavorArgs
{
Cpu = 0,
Ram = 0,
Description = "string",
Id = "string",
},
Options = new Stackit.Inputs.MongodbflexInstanceOptionsArgs
{
PointInTimeWindowHours = 0,
Type = "string",
DailySnapshotRetentionDays = 0,
MonthlySnapshotRetentionMonths = 0,
SnapshotRetentionDays = 0,
WeeklySnapshotRetentionWeeks = 0,
},
ProjectId = "string",
Replicas = 0,
Storage = new Stackit.Inputs.MongodbflexInstanceStorageArgs
{
Class = "string",
Size = 0,
},
Version = "string",
Name = "string",
Region = "string",
});
example, err := stackit.NewMongodbflexInstance(ctx, "mongodbflexInstanceResource", &stackit.MongodbflexInstanceArgs{
Acls: pulumi.StringArray{
pulumi.String("string"),
},
BackupSchedule: pulumi.String("string"),
Flavor: &stackit.MongodbflexInstanceFlavorArgs{
Cpu: pulumi.Int(0),
Ram: pulumi.Int(0),
Description: pulumi.String("string"),
Id: pulumi.String("string"),
},
Options: &stackit.MongodbflexInstanceOptionsArgs{
PointInTimeWindowHours: pulumi.Int(0),
Type: pulumi.String("string"),
DailySnapshotRetentionDays: pulumi.Int(0),
MonthlySnapshotRetentionMonths: pulumi.Int(0),
SnapshotRetentionDays: pulumi.Int(0),
WeeklySnapshotRetentionWeeks: pulumi.Int(0),
},
ProjectId: pulumi.String("string"),
Replicas: pulumi.Int(0),
Storage: &stackit.MongodbflexInstanceStorageArgs{
Class: pulumi.String("string"),
Size: pulumi.Int(0),
},
Version: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
var mongodbflexInstanceResource = new MongodbflexInstance("mongodbflexInstanceResource", MongodbflexInstanceArgs.builder()
.acls("string")
.backupSchedule("string")
.flavor(MongodbflexInstanceFlavorArgs.builder()
.cpu(0)
.ram(0)
.description("string")
.id("string")
.build())
.options(MongodbflexInstanceOptionsArgs.builder()
.pointInTimeWindowHours(0)
.type("string")
.dailySnapshotRetentionDays(0)
.monthlySnapshotRetentionMonths(0)
.snapshotRetentionDays(0)
.weeklySnapshotRetentionWeeks(0)
.build())
.projectId("string")
.replicas(0)
.storage(MongodbflexInstanceStorageArgs.builder()
.class_("string")
.size(0)
.build())
.version("string")
.name("string")
.region("string")
.build());
mongodbflex_instance_resource = stackit.MongodbflexInstance("mongodbflexInstanceResource",
acls=["string"],
backup_schedule="string",
flavor={
"cpu": 0,
"ram": 0,
"description": "string",
"id": "string",
},
options={
"point_in_time_window_hours": 0,
"type": "string",
"daily_snapshot_retention_days": 0,
"monthly_snapshot_retention_months": 0,
"snapshot_retention_days": 0,
"weekly_snapshot_retention_weeks": 0,
},
project_id="string",
replicas=0,
storage={
"class_": "string",
"size": 0,
},
version="string",
name="string",
region="string")
const mongodbflexInstanceResource = new stackit.MongodbflexInstance("mongodbflexInstanceResource", {
acls: ["string"],
backupSchedule: "string",
flavor: {
cpu: 0,
ram: 0,
description: "string",
id: "string",
},
options: {
pointInTimeWindowHours: 0,
type: "string",
dailySnapshotRetentionDays: 0,
monthlySnapshotRetentionMonths: 0,
snapshotRetentionDays: 0,
weeklySnapshotRetentionWeeks: 0,
},
projectId: "string",
replicas: 0,
storage: {
"class": "string",
size: 0,
},
version: "string",
name: "string",
region: "string",
});
type: stackit:MongodbflexInstance
properties:
acls:
- string
backupSchedule: string
flavor:
cpu: 0
description: string
id: string
ram: 0
name: string
options:
dailySnapshotRetentionDays: 0
monthlySnapshotRetentionMonths: 0
pointInTimeWindowHours: 0
snapshotRetentionDays: 0
type: string
weeklySnapshotRetentionWeeks: 0
projectId: string
region: string
replicas: 0
storage:
class: string
size: 0
version: string
MongodbflexInstance 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 MongodbflexInstance resource accepts the following input properties:
- Acls List<string>
- The Access Control List (ACL) for the MongoDB Flex instance.
- Backup
Schedule string - The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
- Flavor
Mongodbflex
Instance Flavor - Options
Mongodbflex
Instance Options - Project
Id string - STACKIT project ID to which the instance is associated.
- Replicas int
- Storage
Mongodbflex
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 MongoDB Flex instance.
- Backup
Schedule string - The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
- Flavor
Mongodbflex
Instance Flavor Args - Options
Mongodbflex
Instance Options Args - Project
Id string - STACKIT project ID to which the instance is associated.
- Replicas int
- Storage
Mongodbflex
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 MongoDB Flex instance.
- backup
Schedule String - The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
- flavor
Mongodbflex
Instance Flavor - options
Mongodbflex
Instance Options - project
Id String - STACKIT project ID to which the instance is associated.
- replicas Integer
- storage
Mongodbflex
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 MongoDB Flex instance.
- backup
Schedule string - The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
- flavor
Mongodbflex
Instance Flavor - options
Mongodbflex
Instance Options - project
Id string - STACKIT project ID to which the instance is associated.
- replicas number
- storage
Mongodbflex
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 MongoDB Flex instance.
- backup_
schedule str - The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
- flavor
Mongodbflex
Instance Flavor Args - options
Mongodbflex
Instance Options Args - project_
id str - STACKIT project ID to which the instance is associated.
- replicas int
- storage
Mongodbflex
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 MongoDB Flex instance.
- backup
Schedule String - The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
- flavor Property Map
- options Property Map
- project
Id String - STACKIT project ID to which the instance is associated.
- replicas Number
- 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 MongodbflexInstance resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - ID of the MongoDB Flex instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - ID of the MongoDB Flex instance.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - ID of the MongoDB Flex instance.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - ID of the MongoDB Flex instance.
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
id str - ID of the MongoDB Flex instance.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - ID of the MongoDB Flex instance.
Look up Existing MongodbflexInstance Resource
Get an existing MongodbflexInstance 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?: MongodbflexInstanceState, opts?: CustomResourceOptions): MongodbflexInstance@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
acls: Optional[Sequence[str]] = None,
backup_schedule: Optional[str] = None,
flavor: Optional[MongodbflexInstanceFlavorArgs] = None,
instance_id: Optional[str] = None,
name: Optional[str] = None,
options: Optional[MongodbflexInstanceOptionsArgs] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
replicas: Optional[int] = None,
storage: Optional[MongodbflexInstanceStorageArgs] = None,
version: Optional[str] = None) -> MongodbflexInstancefunc GetMongodbflexInstance(ctx *Context, name string, id IDInput, state *MongodbflexInstanceState, opts ...ResourceOption) (*MongodbflexInstance, error)public static MongodbflexInstance Get(string name, Input<string> id, MongodbflexInstanceState? state, CustomResourceOptions? opts = null)public static MongodbflexInstance get(String name, Output<String> id, MongodbflexInstanceState state, CustomResourceOptions options)resources: _: type: stackit:MongodbflexInstance 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 MongoDB Flex instance.
- Backup
Schedule string - The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
- Flavor
Mongodbflex
Instance Flavor - Instance
Id string - ID of the MongoDB Flex instance.
- Name string
- Instance name.
- Options
Mongodbflex
Instance Options - 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
- Storage
Mongodbflex
Instance Storage - Version string
- Acls []string
- The Access Control List (ACL) for the MongoDB Flex instance.
- Backup
Schedule string - The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
- Flavor
Mongodbflex
Instance Flavor Args - Instance
Id string - ID of the MongoDB Flex instance.
- Name string
- Instance name.
- Options
Mongodbflex
Instance Options Args - 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
- Storage
Mongodbflex
Instance Storage Args - Version string
- acls List<String>
- The Access Control List (ACL) for the MongoDB Flex instance.
- backup
Schedule String - The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
- flavor
Mongodbflex
Instance Flavor - instance
Id String - ID of the MongoDB Flex instance.
- name String
- Instance name.
- options
Mongodbflex
Instance Options - 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
- storage
Mongodbflex
Instance Storage - version String
- acls string[]
- The Access Control List (ACL) for the MongoDB Flex instance.
- backup
Schedule string - The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
- flavor
Mongodbflex
Instance Flavor - instance
Id string - ID of the MongoDB Flex instance.
- name string
- Instance name.
- options
Mongodbflex
Instance Options - 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
- storage
Mongodbflex
Instance Storage - version string
- acls Sequence[str]
- The Access Control List (ACL) for the MongoDB Flex instance.
- backup_
schedule str - The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
- flavor
Mongodbflex
Instance Flavor Args - instance_
id str - ID of the MongoDB Flex instance.
- name str
- Instance name.
- options
Mongodbflex
Instance Options Args - 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
- storage
Mongodbflex
Instance Storage Args - version str
- acls List<String>
- The Access Control List (ACL) for the MongoDB Flex instance.
- backup
Schedule String - The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
- flavor Property Map
- instance
Id String - ID of the MongoDB Flex instance.
- name String
- Instance name.
- options Property Map
- 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
- storage Property Map
- version String
Supporting Types
MongodbflexInstanceFlavor, MongodbflexInstanceFlavorArgs
- 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
MongodbflexInstanceOptions, MongodbflexInstanceOptionsArgs
- Point
In intTime Window Hours - The number of hours back in time the point-in-time recovery feature will be able to recover.
- Type string
- Type of the MongoDB Flex instance. Possible values are:
Replica,Sharded,Single. - Daily
Snapshot intRetention Days - The number of days that daily backups will be retained.
- Monthly
Snapshot intRetention Months - The number of months that monthly backups will be retained.
- Snapshot
Retention intDays - The number of days that continuous backups (controlled via the
backup_schedule) will be retained. - Weekly
Snapshot intRetention Weeks - The number of weeks that weekly backups will be retained.
- Point
In intTime Window Hours - The number of hours back in time the point-in-time recovery feature will be able to recover.
- Type string
- Type of the MongoDB Flex instance. Possible values are:
Replica,Sharded,Single. - Daily
Snapshot intRetention Days - The number of days that daily backups will be retained.
- Monthly
Snapshot intRetention Months - The number of months that monthly backups will be retained.
- Snapshot
Retention intDays - The number of days that continuous backups (controlled via the
backup_schedule) will be retained. - Weekly
Snapshot intRetention Weeks - The number of weeks that weekly backups will be retained.
- point
In IntegerTime Window Hours - The number of hours back in time the point-in-time recovery feature will be able to recover.
- type String
- Type of the MongoDB Flex instance. Possible values are:
Replica,Sharded,Single. - daily
Snapshot IntegerRetention Days - The number of days that daily backups will be retained.
- monthly
Snapshot IntegerRetention Months - The number of months that monthly backups will be retained.
- snapshot
Retention IntegerDays - The number of days that continuous backups (controlled via the
backup_schedule) will be retained. - weekly
Snapshot IntegerRetention Weeks - The number of weeks that weekly backups will be retained.
- point
In numberTime Window Hours - The number of hours back in time the point-in-time recovery feature will be able to recover.
- type string
- Type of the MongoDB Flex instance. Possible values are:
Replica,Sharded,Single. - daily
Snapshot numberRetention Days - The number of days that daily backups will be retained.
- monthly
Snapshot numberRetention Months - The number of months that monthly backups will be retained.
- snapshot
Retention numberDays - The number of days that continuous backups (controlled via the
backup_schedule) will be retained. - weekly
Snapshot numberRetention Weeks - The number of weeks that weekly backups will be retained.
- point_
in_ inttime_ window_ hours - The number of hours back in time the point-in-time recovery feature will be able to recover.
- type str
- Type of the MongoDB Flex instance. Possible values are:
Replica,Sharded,Single. - daily_
snapshot_ intretention_ days - The number of days that daily backups will be retained.
- monthly_
snapshot_ intretention_ months - The number of months that monthly backups will be retained.
- snapshot_
retention_ intdays - The number of days that continuous backups (controlled via the
backup_schedule) will be retained. - weekly_
snapshot_ intretention_ weeks - The number of weeks that weekly backups will be retained.
- point
In NumberTime Window Hours - The number of hours back in time the point-in-time recovery feature will be able to recover.
- type String
- Type of the MongoDB Flex instance. Possible values are:
Replica,Sharded,Single. - daily
Snapshot NumberRetention Days - The number of days that daily backups will be retained.
- monthly
Snapshot NumberRetention Months - The number of months that monthly backups will be retained.
- snapshot
Retention NumberDays - The number of days that continuous backups (controlled via the
backup_schedule) will be retained. - weekly
Snapshot NumberRetention Weeks - The number of weeks that weekly backups will be retained.
MongodbflexInstanceStorage, MongodbflexInstanceStorageArgs
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
