1. Packages
  2. stackit
  3. API Docs
  4. ServerServiceAccountAttach
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

    Service account attachment resource schema. Attaches a service account to a server. Must have a region specified in the provider configuration.

    Example Usage

    resource "stackit_server_service_account_attach" "attached_service_account" {
      project_id            = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      server_id             = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      service_account_email = "service-account@stackit.cloud"
    }
    
    # Only use the import statement, if you want to import an existing server service account attachment
    import {
      to = stackit_server_service_account_attach.import-example
      id = "${var.project_id},${var.region},${var.server_id},${var.service_account_email}"
    }
    

    Create ServerServiceAccountAttach Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ServerServiceAccountAttach(name: string, args: ServerServiceAccountAttachArgs, opts?: CustomResourceOptions);
    @overload
    def ServerServiceAccountAttach(resource_name: str,
                                   args: ServerServiceAccountAttachArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServerServiceAccountAttach(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   project_id: Optional[str] = None,
                                   server_id: Optional[str] = None,
                                   service_account_email: Optional[str] = None,
                                   region: Optional[str] = None)
    func NewServerServiceAccountAttach(ctx *Context, name string, args ServerServiceAccountAttachArgs, opts ...ResourceOption) (*ServerServiceAccountAttach, error)
    public ServerServiceAccountAttach(string name, ServerServiceAccountAttachArgs args, CustomResourceOptions? opts = null)
    public ServerServiceAccountAttach(String name, ServerServiceAccountAttachArgs args)
    public ServerServiceAccountAttach(String name, ServerServiceAccountAttachArgs args, CustomResourceOptions options)
    
    type: stackit:ServerServiceAccountAttach
    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 ServerServiceAccountAttachArgs
    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 ServerServiceAccountAttachArgs
    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 ServerServiceAccountAttachArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServerServiceAccountAttachArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServerServiceAccountAttachArgs
    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 serverServiceAccountAttachResource = new Stackit.ServerServiceAccountAttach("serverServiceAccountAttachResource", new()
    {
        ProjectId = "string",
        ServerId = "string",
        ServiceAccountEmail = "string",
        Region = "string",
    });
    
    example, err := stackit.NewServerServiceAccountAttach(ctx, "serverServiceAccountAttachResource", &stackit.ServerServiceAccountAttachArgs{
    	ProjectId:           pulumi.String("string"),
    	ServerId:            pulumi.String("string"),
    	ServiceAccountEmail: pulumi.String("string"),
    	Region:              pulumi.String("string"),
    })
    
    var serverServiceAccountAttachResource = new ServerServiceAccountAttach("serverServiceAccountAttachResource", ServerServiceAccountAttachArgs.builder()
        .projectId("string")
        .serverId("string")
        .serviceAccountEmail("string")
        .region("string")
        .build());
    
    server_service_account_attach_resource = stackit.ServerServiceAccountAttach("serverServiceAccountAttachResource",
        project_id="string",
        server_id="string",
        service_account_email="string",
        region="string")
    
    const serverServiceAccountAttachResource = new stackit.ServerServiceAccountAttach("serverServiceAccountAttachResource", {
        projectId: "string",
        serverId: "string",
        serviceAccountEmail: "string",
        region: "string",
    });
    
    type: stackit:ServerServiceAccountAttach
    properties:
        projectId: string
        region: string
        serverId: string
        serviceAccountEmail: string
    

    ServerServiceAccountAttach 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 ServerServiceAccountAttach resource accepts the following input properties:

    ProjectId string
    STACKIT project ID to which the service account attachment is associated.
    ServerId string
    The server ID.
    ServiceAccountEmail string
    The service account email.
    Region string
    The resource region. If not defined, the provider region is used.
    ProjectId string
    STACKIT project ID to which the service account attachment is associated.
    ServerId string
    The server ID.
    ServiceAccountEmail string
    The service account email.
    Region string
    The resource region. If not defined, the provider region is used.
    projectId String
    STACKIT project ID to which the service account attachment is associated.
    serverId String
    The server ID.
    serviceAccountEmail String
    The service account email.
    region String
    The resource region. If not defined, the provider region is used.
    projectId string
    STACKIT project ID to which the service account attachment is associated.
    serverId string
    The server ID.
    serviceAccountEmail string
    The service account email.
    region string
    The resource region. If not defined, the provider region is used.
    project_id str
    STACKIT project ID to which the service account attachment is associated.
    server_id str
    The server ID.
    service_account_email str
    The service account email.
    region str
    The resource region. If not defined, the provider region is used.
    projectId String
    STACKIT project ID to which the service account attachment is associated.
    serverId String
    The server ID.
    serviceAccountEmail String
    The service account email.
    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 ServerServiceAccountAttach resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ServerServiceAccountAttach Resource

    Get an existing ServerServiceAccountAttach 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?: ServerServiceAccountAttachState, opts?: CustomResourceOptions): ServerServiceAccountAttach
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            server_id: Optional[str] = None,
            service_account_email: Optional[str] = None) -> ServerServiceAccountAttach
    func GetServerServiceAccountAttach(ctx *Context, name string, id IDInput, state *ServerServiceAccountAttachState, opts ...ResourceOption) (*ServerServiceAccountAttach, error)
    public static ServerServiceAccountAttach Get(string name, Input<string> id, ServerServiceAccountAttachState? state, CustomResourceOptions? opts = null)
    public static ServerServiceAccountAttach get(String name, Output<String> id, ServerServiceAccountAttachState state, CustomResourceOptions options)
    resources:  _:    type: stackit:ServerServiceAccountAttach    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:
    ProjectId string
    STACKIT project ID to which the service account attachment is associated.
    Region string
    The resource region. If not defined, the provider region is used.
    ServerId string
    The server ID.
    ServiceAccountEmail string
    The service account email.
    ProjectId string
    STACKIT project ID to which the service account attachment is associated.
    Region string
    The resource region. If not defined, the provider region is used.
    ServerId string
    The server ID.
    ServiceAccountEmail string
    The service account email.
    projectId String
    STACKIT project ID to which the service account attachment is associated.
    region String
    The resource region. If not defined, the provider region is used.
    serverId String
    The server ID.
    serviceAccountEmail String
    The service account email.
    projectId string
    STACKIT project ID to which the service account attachment is associated.
    region string
    The resource region. If not defined, the provider region is used.
    serverId string
    The server ID.
    serviceAccountEmail string
    The service account email.
    project_id str
    STACKIT project ID to which the service account attachment is associated.
    region str
    The resource region. If not defined, the provider region is used.
    server_id str
    The server ID.
    service_account_email str
    The service account email.
    projectId String
    STACKIT project ID to which the service account attachment is associated.
    region String
    The resource region. If not defined, the provider region is used.
    serverId String
    The server ID.
    serviceAccountEmail String
    The service account email.

    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.