1. Packages
  2. stackit
  3. API Docs
  4. MongodbflexInstance
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud
stackit logo
Viewing docs for stackit v0.0.4
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.
    BackupSchedule string
    The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
    Flavor MongodbflexInstanceFlavor
    Options MongodbflexInstanceOptions
    ProjectId string
    STACKIT project ID to which the instance is associated.
    Replicas int
    Storage MongodbflexInstanceStorage
    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.
    BackupSchedule string
    The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
    Flavor MongodbflexInstanceFlavorArgs
    Options MongodbflexInstanceOptionsArgs
    ProjectId string
    STACKIT project ID to which the instance is associated.
    Replicas int
    Storage MongodbflexInstanceStorageArgs
    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.
    backupSchedule String
    The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
    flavor MongodbflexInstanceFlavor
    options MongodbflexInstanceOptions
    projectId String
    STACKIT project ID to which the instance is associated.
    replicas Integer
    storage MongodbflexInstanceStorage
    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.
    backupSchedule string
    The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
    flavor MongodbflexInstanceFlavor
    options MongodbflexInstanceOptions
    projectId string
    STACKIT project ID to which the instance is associated.
    replicas number
    storage MongodbflexInstanceStorage
    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 MongodbflexInstanceFlavorArgs
    options MongodbflexInstanceOptionsArgs
    project_id str
    STACKIT project ID to which the instance is associated.
    replicas int
    storage MongodbflexInstanceStorageArgs
    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.
    backupSchedule String
    The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
    flavor Property Map
    options Property Map
    projectId 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.
    InstanceId string
    ID of the MongoDB Flex instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId string
    ID of the MongoDB Flex instance.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId String
    ID of the MongoDB Flex instance.
    id string
    The provider-assigned unique ID for this managed resource.
    instanceId 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.
    instanceId 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) -> MongodbflexInstance
    func 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.
    The following state arguments are supported:
    Acls List<string>
    The Access Control List (ACL) for the MongoDB Flex instance.
    BackupSchedule string
    The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
    Flavor MongodbflexInstanceFlavor
    InstanceId string
    ID of the MongoDB Flex instance.
    Name string
    Instance name.
    Options MongodbflexInstanceOptions
    ProjectId 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 MongodbflexInstanceStorage
    Version string
    Acls []string
    The Access Control List (ACL) for the MongoDB Flex instance.
    BackupSchedule string
    The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
    Flavor MongodbflexInstanceFlavorArgs
    InstanceId string
    ID of the MongoDB Flex instance.
    Name string
    Instance name.
    Options MongodbflexInstanceOptionsArgs
    ProjectId 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 MongodbflexInstanceStorageArgs
    Version string
    acls List<String>
    The Access Control List (ACL) for the MongoDB Flex instance.
    backupSchedule String
    The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
    flavor MongodbflexInstanceFlavor
    instanceId String
    ID of the MongoDB Flex instance.
    name String
    Instance name.
    options MongodbflexInstanceOptions
    projectId 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 MongodbflexInstanceStorage
    version String
    acls string[]
    The Access Control List (ACL) for the MongoDB Flex instance.
    backupSchedule string
    The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
    flavor MongodbflexInstanceFlavor
    instanceId string
    ID of the MongoDB Flex instance.
    name string
    Instance name.
    options MongodbflexInstanceOptions
    projectId 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 MongodbflexInstanceStorage
    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 MongodbflexInstanceFlavorArgs
    instance_id str
    ID of the MongoDB Flex instance.
    name str
    Instance name.
    options MongodbflexInstanceOptionsArgs
    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 MongodbflexInstanceStorageArgs
    version str
    acls List<String>
    The Access Control List (ACL) for the MongoDB Flex instance.
    backupSchedule String
    The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *").
    flavor Property Map
    instanceId String
    ID of the MongoDB Flex instance.
    name String
    Instance name.
    options Property Map
    projectId 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

    PointInTimeWindowHours int
    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.
    DailySnapshotRetentionDays int
    The number of days that daily backups will be retained.
    MonthlySnapshotRetentionMonths int
    The number of months that monthly backups will be retained.
    SnapshotRetentionDays int
    The number of days that continuous backups (controlled via the backup_schedule) will be retained.
    WeeklySnapshotRetentionWeeks int
    The number of weeks that weekly backups will be retained.
    PointInTimeWindowHours int
    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.
    DailySnapshotRetentionDays int
    The number of days that daily backups will be retained.
    MonthlySnapshotRetentionMonths int
    The number of months that monthly backups will be retained.
    SnapshotRetentionDays int
    The number of days that continuous backups (controlled via the backup_schedule) will be retained.
    WeeklySnapshotRetentionWeeks int
    The number of weeks that weekly backups will be retained.
    pointInTimeWindowHours Integer
    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.
    dailySnapshotRetentionDays Integer
    The number of days that daily backups will be retained.
    monthlySnapshotRetentionMonths Integer
    The number of months that monthly backups will be retained.
    snapshotRetentionDays Integer
    The number of days that continuous backups (controlled via the backup_schedule) will be retained.
    weeklySnapshotRetentionWeeks Integer
    The number of weeks that weekly backups will be retained.
    pointInTimeWindowHours number
    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.
    dailySnapshotRetentionDays number
    The number of days that daily backups will be retained.
    monthlySnapshotRetentionMonths number
    The number of months that monthly backups will be retained.
    snapshotRetentionDays number
    The number of days that continuous backups (controlled via the backup_schedule) will be retained.
    weeklySnapshotRetentionWeeks number
    The number of weeks that weekly backups will be retained.
    point_in_time_window_hours int
    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_retention_days int
    The number of days that daily backups will be retained.
    monthly_snapshot_retention_months int
    The number of months that monthly backups will be retained.
    snapshot_retention_days int
    The number of days that continuous backups (controlled via the backup_schedule) will be retained.
    weekly_snapshot_retention_weeks int
    The number of weeks that weekly backups will be retained.
    pointInTimeWindowHours Number
    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.
    dailySnapshotRetentionDays Number
    The number of days that daily backups will be retained.
    monthlySnapshotRetentionMonths Number
    The number of months that monthly backups will be retained.
    snapshotRetentionDays Number
    The number of days that continuous backups (controlled via the backup_schedule) will be retained.
    weeklySnapshotRetentionWeeks Number
    The number of weeks that weekly backups will be retained.

    MongodbflexInstanceStorage, MongodbflexInstanceStorageArgs

    Class string
    Size int
    Class string
    Size int
    class_ String
    size Integer
    class string
    size number
    class_ str
    size int
    class String
    size Number

    Package Details

    Repository
    stackit stackitcloud/pulumi-stackit
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the stackit Terraform Provider.
    stackit logo
    Viewing docs for stackit v0.0.4
    published on Friday, Feb 20, 2026 by stackitcloud
      Try Pulumi Cloud free. Your team will thank you.