published on Monday, Aug 17, 2026 by stackitcloud
published on Monday, Aug 17, 2026 by stackitcloud
SQLServer Flex user resource schema. Must have a region specified in the provider configuration.
Example Usage
resource "stackit_sqlserverflex_user" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
username = "username"
roles = ["role"]
}
resource "time_rotating" "rotate" {
rotation_days = 80
}
resource "stackit_sqlserverflex_user" "example_rotate" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
username = "username"
roles = ["role"]
rotate_when_changed = {
rotation = time_rotating.rotate.id
}
}
Create SqlserverflexUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SqlserverflexUser(name: string, args: SqlserverflexUserArgs, opts?: CustomResourceOptions);@overload
def SqlserverflexUser(resource_name: str,
args: SqlserverflexUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SqlserverflexUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
project_id: Optional[str] = None,
roles: Optional[Sequence[str]] = None,
username: Optional[str] = None,
region: Optional[str] = None,
rotate_when_changed: Optional[Mapping[str, str]] = None)func NewSqlserverflexUser(ctx *Context, name string, args SqlserverflexUserArgs, opts ...ResourceOption) (*SqlserverflexUser, error)public SqlserverflexUser(string name, SqlserverflexUserArgs args, CustomResourceOptions? opts = null)
public SqlserverflexUser(String name, SqlserverflexUserArgs args)
public SqlserverflexUser(String name, SqlserverflexUserArgs args, CustomResourceOptions options)
type: stackit:SqlserverflexUser
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "stackit_sqlserverflex_user" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SqlserverflexUserArgs
- 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 SqlserverflexUserArgs
- 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 SqlserverflexUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SqlserverflexUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SqlserverflexUserArgs
- 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 sqlserverflexUserResource = new Stackit.SqlserverflexUser("sqlserverflexUserResource", new()
{
InstanceId = "string",
ProjectId = "string",
Roles = new[]
{
"string",
},
Username = "string",
Region = "string",
RotateWhenChanged =
{
{ "string", "string" },
},
});
example, err := stackit.NewSqlserverflexUser(ctx, "sqlserverflexUserResource", &stackit.SqlserverflexUserArgs{
InstanceId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Roles: pulumi.StringArray{
pulumi.String("string"),
},
Username: pulumi.String("string"),
Region: pulumi.String("string"),
RotateWhenChanged: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
resource "stackit_sqlserverflex_user" "sqlserverflexUserResource" {
lifecycle {
create_before_destroy = true
}
instance_id = "string"
project_id = "string"
roles = ["string"]
username = "string"
region = "string"
rotate_when_changed = {
"string" = "string"
}
}
var sqlserverflexUserResource = new SqlserverflexUser("sqlserverflexUserResource", SqlserverflexUserArgs.builder()
.instanceId("string")
.projectId("string")
.roles("string")
.username("string")
.region("string")
.rotateWhenChanged(Map.of("string", "string"))
.build());
sqlserverflex_user_resource = stackit.SqlserverflexUser("sqlserverflexUserResource",
instance_id="string",
project_id="string",
roles=["string"],
username="string",
region="string",
rotate_when_changed={
"string": "string",
})
const sqlserverflexUserResource = new stackit.SqlserverflexUser("sqlserverflexUserResource", {
instanceId: "string",
projectId: "string",
roles: ["string"],
username: "string",
region: "string",
rotateWhenChanged: {
string: "string",
},
});
type: stackit:SqlserverflexUser
properties:
instanceId: string
projectId: string
region: string
roles:
- string
rotateWhenChanged:
string: string
username: string
SqlserverflexUser 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 SqlserverflexUser resource accepts the following input properties:
- Instance
Id string - ID of the SQLServer Flex instance.
- Project
Id string - STACKIT project ID to which the instance is associated.
- Roles List<string>
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - Username string
- Username of the SQLServer Flex instance.
- Region string
- Rotate
When Dictionary<string, string>Changed - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- Instance
Id string - ID of the SQLServer Flex instance.
- Project
Id string - STACKIT project ID to which the instance is associated.
- Roles []string
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - Username string
- Username of the SQLServer Flex instance.
- Region string
- Rotate
When map[string]stringChanged - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- instance_
id string - ID of the SQLServer Flex instance.
- project_
id string - STACKIT project ID to which the instance is associated.
- roles list(string)
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - username string
- Username of the SQLServer Flex instance.
- region string
- rotate_
when_ map(string)changed - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- instance
Id String - ID of the SQLServer Flex instance.
- project
Id String - STACKIT project ID to which the instance is associated.
- roles List<String>
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - username String
- Username of the SQLServer Flex instance.
- region String
- rotate
When Map<String,String>Changed - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- instance
Id string - ID of the SQLServer Flex instance.
- project
Id string - STACKIT project ID to which the instance is associated.
- roles string[]
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - username string
- Username of the SQLServer Flex instance.
- region string
- rotate
When {[key: string]: string}Changed - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- instance_
id str - ID of the SQLServer Flex instance.
- project_
id str - STACKIT project ID to which the instance is associated.
- roles Sequence[str]
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - username str
- Username of the SQLServer Flex instance.
- region str
- rotate_
when_ Mapping[str, str]changed - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- instance
Id String - ID of the SQLServer Flex instance.
- project
Id String - STACKIT project ID to which the instance is associated.
- roles List<String>
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - username String
- Username of the SQLServer Flex instance.
- region String
- rotate
When Map<String>Changed - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the SqlserverflexUser resource produces the following output properties:
Look up Existing SqlserverflexUser Resource
Get an existing SqlserverflexUser 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?: SqlserverflexUserState, opts?: CustomResourceOptions): SqlserverflexUser@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = 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,
rotate_when_changed: Optional[Mapping[str, str]] = None,
user_id: Optional[str] = None,
username: Optional[str] = None) -> SqlserverflexUserfunc GetSqlserverflexUser(ctx *Context, name string, id IDInput, state *SqlserverflexUserState, opts ...ResourceOption) (*SqlserverflexUser, error)public static SqlserverflexUser Get(string name, Input<string> id, SqlserverflexUserState? state, CustomResourceOptions? opts = null)public static SqlserverflexUser get(String name, Output<String> id, SqlserverflexUserState state, CustomResourceOptions options)resources: _: type: stackit:SqlserverflexUser get: id: ${id}import {
to = stackit_sqlserverflex_user.example
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.
- Host string
- Instance
Id string - ID of the SQLServer Flex instance.
- Password string
- Password of the user account.
- Port int
- Project
Id string - STACKIT project ID to which the instance is associated.
- Region string
- Roles List<string>
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - Rotate
When Dictionary<string, string>Changed - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- User
Id string - User ID.
- Username string
- Username of the SQLServer Flex instance.
- Host string
- Instance
Id string - ID of the SQLServer Flex instance.
- Password string
- Password of the user account.
- Port int
- Project
Id string - STACKIT project ID to which the instance is associated.
- Region string
- Roles []string
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - Rotate
When map[string]stringChanged - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- User
Id string - User ID.
- Username string
- Username of the SQLServer Flex instance.
- host string
- instance_
id string - ID of the SQLServer Flex instance.
- password string
- Password of the user account.
- port number
- project_
id string - STACKIT project ID to which the instance is associated.
- region string
- roles list(string)
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - rotate_
when_ map(string)changed - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- user_
id string - User ID.
- username string
- Username of the SQLServer Flex instance.
- host String
- instance
Id String - ID of the SQLServer Flex instance.
- password String
- Password of the user account.
- port Integer
- project
Id String - STACKIT project ID to which the instance is associated.
- region String
- roles List<String>
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - rotate
When Map<String,String>Changed - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- user
Id String - User ID.
- username String
- Username of the SQLServer Flex instance.
- host string
- instance
Id string - ID of the SQLServer Flex instance.
- password string
- Password of the user account.
- port number
- project
Id string - STACKIT project ID to which the instance is associated.
- region string
- roles string[]
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - rotate
When {[key: string]: string}Changed - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- user
Id string - User ID.
- username string
- Username of the SQLServer Flex instance.
- host str
- instance_
id str - ID of the SQLServer Flex instance.
- password str
- Password of the user account.
- port int
- project_
id str - STACKIT project ID to which the instance is associated.
- region str
- roles Sequence[str]
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - rotate_
when_ Mapping[str, str]changed - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- user_
id str - User ID.
- username str
- Username of the SQLServer Flex instance.
- host String
- instance
Id String - ID of the SQLServer Flex instance.
- password String
- Password of the user account.
- port Number
- project
Id String - STACKIT project ID to which the instance is associated.
- region String
- roles List<String>
- Database access levels for the user. The values for the default roles are:
##STACKIT_DatabaseManager##,##STACKIT_LoginManager##,##STACKIT_ProcessManager##,##STACKIT_ServerManager##,##STACKIT_SQLAgentManager##,##STACKIT_SQLAgentUser## - rotate
When Map<String>Changed - A map of arbitrary key/value pairs that will force recreation of the resource when they change, enabling resource rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- user
Id String - User ID.
- username String
- Username of the SQLServer Flex instance.
Import
In Terraform v1.5.0 and later, the + "" + import + “" + block can be used with the + "” + id + “" + attribute, for example:
# Only use the import statement, if you want to import an existing sqlserverflex user
import {
to = stackit_sqlserverflex_user.import-example
id = "${var.project_id},${var.region},${var.sql_instance_id},${var.sql_user_id}"
}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- stackit stackitcloud/pulumi-stackit
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
stackitTerraform Provider.
published on Monday, Aug 17, 2026 by stackitcloud