Viewing docs for GitLab v9.10.0
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Viewing docs for GitLab v9.10.0
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
The gitlab.InstanceServiceAccount data source retrieves information about a gitlab service account.
In order for a user to create a user account, they must have admin privileges at the instance level. This makes this feature unavailable on
gitlab.com
Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = gitlab.getInstanceServiceAccount({
serviceAccountId: "123",
});
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.get_instance_service_account(service_account_id="123")
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.LookupInstanceServiceAccount(ctx, &gitlab.LookupInstanceServiceAccountArgs{
ServiceAccountId: "123",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = GitLab.GetInstanceServiceAccount.Invoke(new()
{
ServiceAccountId = "123",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.GitlabFunctions;
import com.pulumi.gitlab.inputs.GetInstanceServiceAccountArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = GitlabFunctions.getInstanceServiceAccount(GetInstanceServiceAccountArgs.builder()
.serviceAccountId("123")
.build());
}
}
variables:
example:
fn::invoke:
function: gitlab:getInstanceServiceAccount
arguments:
serviceAccountId: '123'
Using getInstanceServiceAccount
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getInstanceServiceAccount(args: GetInstanceServiceAccountArgs, opts?: InvokeOptions): Promise<GetInstanceServiceAccountResult>
function getInstanceServiceAccountOutput(args: GetInstanceServiceAccountOutputArgs, opts?: InvokeOptions): Output<GetInstanceServiceAccountResult>def get_instance_service_account(service_account_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstanceServiceAccountResult
def get_instance_service_account_output(service_account_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstanceServiceAccountResult]func LookupInstanceServiceAccount(ctx *Context, args *LookupInstanceServiceAccountArgs, opts ...InvokeOption) (*LookupInstanceServiceAccountResult, error)
func LookupInstanceServiceAccountOutput(ctx *Context, args *LookupInstanceServiceAccountOutputArgs, opts ...InvokeOption) LookupInstanceServiceAccountResultOutput> Note: This function is named LookupInstanceServiceAccount in the Go SDK.
public static class GetInstanceServiceAccount
{
public static Task<GetInstanceServiceAccountResult> InvokeAsync(GetInstanceServiceAccountArgs args, InvokeOptions? opts = null)
public static Output<GetInstanceServiceAccountResult> Invoke(GetInstanceServiceAccountInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetInstanceServiceAccountResult> getInstanceServiceAccount(GetInstanceServiceAccountArgs args, InvokeOptions options)
public static Output<GetInstanceServiceAccountResult> getInstanceServiceAccount(GetInstanceServiceAccountArgs args, InvokeOptions options)
fn::invoke:
function: gitlab:index/getInstanceServiceAccount:getInstanceServiceAccount
arguments:
# arguments dictionaryThe following arguments are supported:
- Service
Account stringId - The service account id.
- Service
Account stringId - The service account id.
- service
Account StringId - The service account id.
- service
Account stringId - The service account id.
- service_
account_ strid - The service account id.
- service
Account StringId - The service account id.
getInstanceServiceAccount Result
The following output properties are available:
- Email string
- The email of the user.
- Id string
- Name string
- The name of the user.
- Service
Account stringId - The service account id.
- Username string
- The username of the user.
- Email string
- The email of the user.
- Id string
- Name string
- The name of the user.
- Service
Account stringId - The service account id.
- Username string
- The username of the user.
- email String
- The email of the user.
- id String
- name String
- The name of the user.
- service
Account StringId - The service account id.
- username String
- The username of the user.
- email string
- The email of the user.
- id string
- name string
- The name of the user.
- service
Account stringId - The service account id.
- username string
- The username of the user.
- email str
- The email of the user.
- id str
- name str
- The name of the user.
- service_
account_ strid - The service account id.
- username str
- The username of the user.
- email String
- The email of the user.
- id String
- name String
- The name of the user.
- service
Account StringId - The service account id.
- username String
- The username of the user.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlabTerraform Provider.
Viewing docs for GitLab v9.10.0
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
