published on Friday, Feb 20, 2026 by stackitcloud
published on Friday, Feb 20, 2026 by stackitcloud
MongoDB Flex user resource schema. Must have a region specified in the provider configuration.
Example Usage
resource "stackit_mongodbflex_user" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
username = "username"
roles = ["role"]
database = "database"
}
# Only use the import statement, if you want to import an existing mongodbflex user
import {
to = stackit_mongodbflex_user.import-example
id = "${var.project_id},${var.region},${var.instance_id},${user_id}"
}
Create MongodbflexUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MongodbflexUser(name: string, args: MongodbflexUserArgs, opts?: CustomResourceOptions);@overload
def MongodbflexUser(resource_name: str,
args: MongodbflexUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MongodbflexUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
database: Optional[str] = None,
instance_id: Optional[str] = None,
project_id: Optional[str] = None,
roles: Optional[Sequence[str]] = None,
region: Optional[str] = None,
username: Optional[str] = None)func NewMongodbflexUser(ctx *Context, name string, args MongodbflexUserArgs, opts ...ResourceOption) (*MongodbflexUser, error)public MongodbflexUser(string name, MongodbflexUserArgs args, CustomResourceOptions? opts = null)
public MongodbflexUser(String name, MongodbflexUserArgs args)
public MongodbflexUser(String name, MongodbflexUserArgs args, CustomResourceOptions options)
type: stackit:MongodbflexUser
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 MongodbflexUserArgs
- 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 MongodbflexUserArgs
- 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 MongodbflexUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MongodbflexUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MongodbflexUserArgs
- 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 mongodbflexUserResource = new Stackit.MongodbflexUser("mongodbflexUserResource", new()
{
Database = "string",
InstanceId = "string",
ProjectId = "string",
Roles = new[]
{
"string",
},
Region = "string",
Username = "string",
});
example, err := stackit.NewMongodbflexUser(ctx, "mongodbflexUserResource", &stackit.MongodbflexUserArgs{
Database: pulumi.String("string"),
InstanceId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Roles: pulumi.StringArray{
pulumi.String("string"),
},
Region: pulumi.String("string"),
Username: pulumi.String("string"),
})
var mongodbflexUserResource = new MongodbflexUser("mongodbflexUserResource", MongodbflexUserArgs.builder()
.database("string")
.instanceId("string")
.projectId("string")
.roles("string")
.region("string")
.username("string")
.build());
mongodbflex_user_resource = stackit.MongodbflexUser("mongodbflexUserResource",
database="string",
instance_id="string",
project_id="string",
roles=["string"],
region="string",
username="string")
const mongodbflexUserResource = new stackit.MongodbflexUser("mongodbflexUserResource", {
database: "string",
instanceId: "string",
projectId: "string",
roles: ["string"],
region: "string",
username: "string",
});
type: stackit:MongodbflexUser
properties:
database: string
instanceId: string
projectId: string
region: string
roles:
- string
username: string
MongodbflexUser 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 MongodbflexUser resource accepts the following input properties:
- Database string
- Instance
Id string - ID of the MongoDB Flex instance.
- Project
Id string - STACKIT project ID to which the instance is associated.
- Roles List<string>
- Database access levels for the user. Some of the possible values are: [
read,readWrite,readWriteAnyDatabase] - Region string
- The resource region. If not defined, the provider region is used.
- Username string
- Database string
- Instance
Id string - ID of the MongoDB Flex instance.
- Project
Id string - STACKIT project ID to which the instance is associated.
- Roles []string
- Database access levels for the user. Some of the possible values are: [
read,readWrite,readWriteAnyDatabase] - Region string
- The resource region. If not defined, the provider region is used.
- Username string
- database String
- instance
Id String - ID of the MongoDB Flex instance.
- project
Id String - STACKIT project ID to which the instance is associated.
- roles List<String>
- Database access levels for the user. Some of the possible values are: [
read,readWrite,readWriteAnyDatabase] - region String
- The resource region. If not defined, the provider region is used.
- username String
- database string
- instance
Id string - ID of the MongoDB Flex instance.
- project
Id string - STACKIT project ID to which the instance is associated.
- roles string[]
- Database access levels for the user. Some of the possible values are: [
read,readWrite,readWriteAnyDatabase] - region string
- The resource region. If not defined, the provider region is used.
- username string
- database str
- instance_
id str - ID of the MongoDB Flex instance.
- project_
id str - STACKIT project ID to which the instance is associated.
- roles Sequence[str]
- Database access levels for the user. Some of the possible values are: [
read,readWrite,readWriteAnyDatabase] - region str
- The resource region. If not defined, the provider region is used.
- username str
- database String
- instance
Id String - ID of the MongoDB Flex instance.
- project
Id String - STACKIT project ID to which the instance is associated.
- roles List<String>
- Database access levels for the user. Some of the possible values are: [
read,readWrite,readWriteAnyDatabase] - region String
- The resource region. If not defined, the provider region is used.
- username String
Outputs
All input properties are implicitly available as output properties. Additionally, the MongodbflexUser resource produces the following output properties:
Look up Existing MongodbflexUser Resource
Get an existing MongodbflexUser 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?: MongodbflexUserState, opts?: CustomResourceOptions): MongodbflexUser@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
database: Optional[str] = None,
host: Optional[str] = None,
instance_id: Optional[str] = None,
password: Optional[str] = None,
port: Optional[int] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
roles: Optional[Sequence[str]] = None,
uri: Optional[str] = None,
user_id: Optional[str] = None,
username: Optional[str] = None) -> MongodbflexUserfunc GetMongodbflexUser(ctx *Context, name string, id IDInput, state *MongodbflexUserState, opts ...ResourceOption) (*MongodbflexUser, error)public static MongodbflexUser Get(string name, Input<string> id, MongodbflexUserState? state, CustomResourceOptions? opts = null)public static MongodbflexUser get(String name, Output<String> id, MongodbflexUserState state, CustomResourceOptions options)resources: _: type: stackit:MongodbflexUser 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 string
- Host string
- Instance
Id string - ID of the MongoDB Flex instance.
- Password string
- Port int
- 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.
- Roles List<string>
- Database access levels for the user. Some of the possible values are: [
read,readWrite,readWriteAnyDatabase] - Uri string
- User
Id string - User ID.
- Username string
- Database string
- Host string
- Instance
Id string - ID of the MongoDB Flex instance.
- Password string
- Port int
- 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.
- Roles []string
- Database access levels for the user. Some of the possible values are: [
read,readWrite,readWriteAnyDatabase] - Uri string
- User
Id string - User ID.
- Username string
- database String
- host String
- instance
Id String - ID of the MongoDB Flex instance.
- password String
- port Integer
- 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.
- roles List<String>
- Database access levels for the user. Some of the possible values are: [
read,readWrite,readWriteAnyDatabase] - uri String
- user
Id String - User ID.
- username String
- database string
- host string
- instance
Id string - ID of the MongoDB Flex instance.
- password string
- port number
- 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.
- roles string[]
- Database access levels for the user. Some of the possible values are: [
read,readWrite,readWriteAnyDatabase] - uri string
- user
Id string - User ID.
- username string
- database str
- host str
- instance_
id str - ID of the MongoDB Flex instance.
- password str
- port int
- 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.
- roles Sequence[str]
- Database access levels for the user. Some of the possible values are: [
read,readWrite,readWriteAnyDatabase] - uri str
- user_
id str - User ID.
- username str
- database String
- host String
- instance
Id String - ID of the MongoDB Flex instance.
- password String
- port Number
- 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.
- roles List<String>
- Database access levels for the user. Some of the possible values are: [
read,readWrite,readWriteAnyDatabase] - uri String
- user
Id String - User ID.
- username String
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
