gitlab.InstanceServiceAccount
Explore with Pulumi AI
The gitlab.InstanceServiceAccount
resource allows creating a GitLab instance 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
Create InstanceServiceAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InstanceServiceAccount(name: string, args?: InstanceServiceAccountArgs, opts?: CustomResourceOptions);
@overload
def InstanceServiceAccount(resource_name: str,
args: Optional[InstanceServiceAccountArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def InstanceServiceAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
timeouts: Optional[InstanceServiceAccountTimeoutsArgs] = None,
username: Optional[str] = None)
func NewInstanceServiceAccount(ctx *Context, name string, args *InstanceServiceAccountArgs, opts ...ResourceOption) (*InstanceServiceAccount, error)
public InstanceServiceAccount(string name, InstanceServiceAccountArgs? args = null, CustomResourceOptions? opts = null)
public InstanceServiceAccount(String name, InstanceServiceAccountArgs args)
public InstanceServiceAccount(String name, InstanceServiceAccountArgs args, CustomResourceOptions options)
type: gitlab:InstanceServiceAccount
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 InstanceServiceAccountArgs
- 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 InstanceServiceAccountArgs
- 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 InstanceServiceAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceServiceAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceServiceAccountArgs
- 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 instanceServiceAccountResource = new GitLab.InstanceServiceAccount("instanceServiceAccountResource", new()
{
Name = "string",
Timeouts = new GitLab.Inputs.InstanceServiceAccountTimeoutsArgs
{
Delete = "string",
},
Username = "string",
});
example, err := gitlab.NewInstanceServiceAccount(ctx, "instanceServiceAccountResource", &gitlab.InstanceServiceAccountArgs{
Name: pulumi.String("string"),
Timeouts: &gitlab.InstanceServiceAccountTimeoutsArgs{
Delete: pulumi.String("string"),
},
Username: pulumi.String("string"),
})
var instanceServiceAccountResource = new InstanceServiceAccount("instanceServiceAccountResource", InstanceServiceAccountArgs.builder()
.name("string")
.timeouts(InstanceServiceAccountTimeoutsArgs.builder()
.delete("string")
.build())
.username("string")
.build());
instance_service_account_resource = gitlab.InstanceServiceAccount("instanceServiceAccountResource",
name="string",
timeouts={
"delete": "string",
},
username="string")
const instanceServiceAccountResource = new gitlab.InstanceServiceAccount("instanceServiceAccountResource", {
name: "string",
timeouts: {
"delete": "string",
},
username: "string",
});
type: gitlab:InstanceServiceAccount
properties:
name: string
timeouts:
delete: string
username: string
InstanceServiceAccount 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 InstanceServiceAccount resource accepts the following input properties:
- Name string
- The name of the user. If not specified, the default Service account user name is used.
- Timeouts
Pulumi.
Git Lab. Inputs. Instance Service Account Timeouts - Username string
- The username of the user. If not specified, it’s automatically generated.
- Name string
- The name of the user. If not specified, the default Service account user name is used.
- Timeouts
Instance
Service Account Timeouts Args - Username string
- The username of the user. If not specified, it’s automatically generated.
- name String
- The name of the user. If not specified, the default Service account user name is used.
- timeouts
Instance
Service Account Timeouts - username String
- The username of the user. If not specified, it’s automatically generated.
- name string
- The name of the user. If not specified, the default Service account user name is used.
- timeouts
Instance
Service Account Timeouts - username string
- The username of the user. If not specified, it’s automatically generated.
- name str
- The name of the user. If not specified, the default Service account user name is used.
- timeouts
Instance
Service Account Timeouts Args - username str
- The username of the user. If not specified, it’s automatically generated.
- name String
- The name of the user. If not specified, the default Service account user name is used.
- timeouts Property Map
- username String
- The username of the user. If not specified, it’s automatically generated.
Outputs
All input properties are implicitly available as output properties. Additionally, the InstanceServiceAccount resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Account stringId - The service account id.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Account stringId - The service account id.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Account StringId - The service account id.
- id string
- The provider-assigned unique ID for this managed resource.
- service
Account stringId - The service account id.
- id str
- The provider-assigned unique ID for this managed resource.
- service_
account_ strid - The service account id.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Account StringId - The service account id.
Look up Existing InstanceServiceAccount Resource
Get an existing InstanceServiceAccount 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?: InstanceServiceAccountState, opts?: CustomResourceOptions): InstanceServiceAccount
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
service_account_id: Optional[str] = None,
timeouts: Optional[InstanceServiceAccountTimeoutsArgs] = None,
username: Optional[str] = None) -> InstanceServiceAccount
func GetInstanceServiceAccount(ctx *Context, name string, id IDInput, state *InstanceServiceAccountState, opts ...ResourceOption) (*InstanceServiceAccount, error)
public static InstanceServiceAccount Get(string name, Input<string> id, InstanceServiceAccountState? state, CustomResourceOptions? opts = null)
public static InstanceServiceAccount get(String name, Output<String> id, InstanceServiceAccountState state, CustomResourceOptions options)
resources: _: type: gitlab:InstanceServiceAccount 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.
- Name string
- The name of the user. If not specified, the default Service account user name is used.
- Service
Account stringId - The service account id.
- Timeouts
Pulumi.
Git Lab. Inputs. Instance Service Account Timeouts - Username string
- The username of the user. If not specified, it’s automatically generated.
- Name string
- The name of the user. If not specified, the default Service account user name is used.
- Service
Account stringId - The service account id.
- Timeouts
Instance
Service Account Timeouts Args - Username string
- The username of the user. If not specified, it’s automatically generated.
- name String
- The name of the user. If not specified, the default Service account user name is used.
- service
Account StringId - The service account id.
- timeouts
Instance
Service Account Timeouts - username String
- The username of the user. If not specified, it’s automatically generated.
- name string
- The name of the user. If not specified, the default Service account user name is used.
- service
Account stringId - The service account id.
- timeouts
Instance
Service Account Timeouts - username string
- The username of the user. If not specified, it’s automatically generated.
- name str
- The name of the user. If not specified, the default Service account user name is used.
- service_
account_ strid - The service account id.
- timeouts
Instance
Service Account Timeouts Args - username str
- The username of the user. If not specified, it’s automatically generated.
- name String
- The name of the user. If not specified, the default Service account user name is used.
- service
Account StringId - The service account id.
- timeouts Property Map
- username String
- The username of the user. If not specified, it’s automatically generated.
Supporting Types
InstanceServiceAccountTimeouts, InstanceServiceAccountTimeoutsArgs
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- delete str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Import
Starting in Terraform v1.5.0 you can use an import block to import gitlab_instance_service_account
. For example:
terraform
import {
to = gitlab_instance_service_account.example
id = “see CLI command below for ID”
}
Import using the CLI is supported using the following syntax:
$ pulumi import gitlab:index/instanceServiceAccount:InstanceServiceAccount You can import a group service account using `<resource> <id>`. The
id
is the id of the service account
$ pulumi import gitlab:index/instanceServiceAccount:InstanceServiceAccount example example
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.