1. Packages
  2. Gitlab Provider
  3. API Docs
  4. GroupCustomAttribute
GitLab v8.10.0 published on Friday, Mar 21, 2025 by Pulumi

gitlab.GroupCustomAttribute

Explore with Pulumi AI

The gitlab.GroupCustomAttribute resource allows to manage custom attributes for a group.

Upstream API: GitLab REST API docs

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const attr = new gitlab.GroupCustomAttribute("attr", {
    group: 42,
    key: "location",
    value: "Greenland",
});
Copy
import pulumi
import pulumi_gitlab as gitlab

attr = gitlab.GroupCustomAttribute("attr",
    group=42,
    key="location",
    value="Greenland")
Copy
package main

import (
	"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := gitlab.NewGroupCustomAttribute(ctx, "attr", &gitlab.GroupCustomAttributeArgs{
			Group: pulumi.Int(42),
			Key:   pulumi.String("location"),
			Value: pulumi.String("Greenland"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;

return await Deployment.RunAsync(() => 
{
    var attr = new GitLab.GroupCustomAttribute("attr", new()
    {
        Group = 42,
        Key = "location",
        Value = "Greenland",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.GroupCustomAttribute;
import com.pulumi.gitlab.GroupCustomAttributeArgs;
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) {
        var attr = new GroupCustomAttribute("attr", GroupCustomAttributeArgs.builder()
            .group("42")
            .key("location")
            .value("Greenland")
            .build());

    }
}
Copy
resources:
  attr:
    type: gitlab:GroupCustomAttribute
    properties:
      group: '42'
      key: location
      value: Greenland
Copy

Create GroupCustomAttribute Resource

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

Constructor syntax

new GroupCustomAttribute(name: string, args: GroupCustomAttributeArgs, opts?: CustomResourceOptions);
@overload
def GroupCustomAttribute(resource_name: str,
                         args: GroupCustomAttributeArgs,
                         opts: Optional[ResourceOptions] = None)

@overload
def GroupCustomAttribute(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         group: Optional[int] = None,
                         key: Optional[str] = None,
                         value: Optional[str] = None)
func NewGroupCustomAttribute(ctx *Context, name string, args GroupCustomAttributeArgs, opts ...ResourceOption) (*GroupCustomAttribute, error)
public GroupCustomAttribute(string name, GroupCustomAttributeArgs args, CustomResourceOptions? opts = null)
public GroupCustomAttribute(String name, GroupCustomAttributeArgs args)
public GroupCustomAttribute(String name, GroupCustomAttributeArgs args, CustomResourceOptions options)
type: gitlab:GroupCustomAttribute
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. GroupCustomAttributeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. GroupCustomAttributeArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. GroupCustomAttributeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. GroupCustomAttributeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. GroupCustomAttributeArgs
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 groupCustomAttributeResource = new GitLab.GroupCustomAttribute("groupCustomAttributeResource", new()
{
    Group = 0,
    Key = "string",
    Value = "string",
});
Copy
example, err := gitlab.NewGroupCustomAttribute(ctx, "groupCustomAttributeResource", &gitlab.GroupCustomAttributeArgs{
	Group: pulumi.Int(0),
	Key:   pulumi.String("string"),
	Value: pulumi.String("string"),
})
Copy
var groupCustomAttributeResource = new GroupCustomAttribute("groupCustomAttributeResource", GroupCustomAttributeArgs.builder()
    .group(0)
    .key("string")
    .value("string")
    .build());
Copy
group_custom_attribute_resource = gitlab.GroupCustomAttribute("groupCustomAttributeResource",
    group=0,
    key="string",
    value="string")
Copy
const groupCustomAttributeResource = new gitlab.GroupCustomAttribute("groupCustomAttributeResource", {
    group: 0,
    key: "string",
    value: "string",
});
Copy
type: gitlab:GroupCustomAttribute
properties:
    group: 0
    key: string
    value: string
Copy

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

Group This property is required. int
The id of the group.
Key This property is required. string
Key for the Custom Attribute.
Value This property is required. string
Value for the Custom Attribute.
Group This property is required. int
The id of the group.
Key This property is required. string
Key for the Custom Attribute.
Value This property is required. string
Value for the Custom Attribute.
group This property is required. Integer
The id of the group.
key This property is required. String
Key for the Custom Attribute.
value This property is required. String
Value for the Custom Attribute.
group This property is required. number
The id of the group.
key This property is required. string
Key for the Custom Attribute.
value This property is required. string
Value for the Custom Attribute.
group This property is required. int
The id of the group.
key This property is required. str
Key for the Custom Attribute.
value This property is required. str
Value for the Custom Attribute.
group This property is required. Number
The id of the group.
key This property is required. String
Key for the Custom Attribute.
value This property is required. String
Value for the Custom Attribute.

Outputs

All input properties are implicitly available as output properties. Additionally, the GroupCustomAttribute 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 GroupCustomAttribute Resource

Get an existing GroupCustomAttribute 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?: GroupCustomAttributeState, opts?: CustomResourceOptions): GroupCustomAttribute
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        group: Optional[int] = None,
        key: Optional[str] = None,
        value: Optional[str] = None) -> GroupCustomAttribute
func GetGroupCustomAttribute(ctx *Context, name string, id IDInput, state *GroupCustomAttributeState, opts ...ResourceOption) (*GroupCustomAttribute, error)
public static GroupCustomAttribute Get(string name, Input<string> id, GroupCustomAttributeState? state, CustomResourceOptions? opts = null)
public static GroupCustomAttribute get(String name, Output<String> id, GroupCustomAttributeState state, CustomResourceOptions options)
resources:  _:    type: gitlab:GroupCustomAttribute    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Group int
The id of the group.
Key string
Key for the Custom Attribute.
Value string
Value for the Custom Attribute.
Group int
The id of the group.
Key string
Key for the Custom Attribute.
Value string
Value for the Custom Attribute.
group Integer
The id of the group.
key String
Key for the Custom Attribute.
value String
Value for the Custom Attribute.
group number
The id of the group.
key string
Key for the Custom Attribute.
value string
Value for the Custom Attribute.
group int
The id of the group.
key str
Key for the Custom Attribute.
value str
Value for the Custom Attribute.
group Number
The id of the group.
key String
Key for the Custom Attribute.
value String
Value for the Custom Attribute.

Import

Starting in Terraform v1.5.0 you can use an import block to import gitlab_group_custom_attribute. For example:

terraform

import {

to = gitlab_group_custom_attribute.example

id = “see CLI command below for ID”

}

Import using the CLI is supported using the following syntax:

You can import a group custom attribute using the an id made up of {group-id}:{key}, e.g.

$ pulumi import gitlab:index/groupCustomAttribute:GroupCustomAttribute attr 42:location
Copy

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.