1. Packages
  2. GitLab
  3. API Docs
  4. GroupCustomAttribute
GitLab v8.1.0 published on Friday, Jun 21, 2024 by Pulumi

gitlab.GroupCustomAttribute

Explore with Pulumi AI

gitlab logo
GitLab v8.1.0 published on Friday, Jun 21, 2024 by Pulumi

    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",
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    attr = gitlab.GroupCustomAttribute("attr",
        group=42,
        key="location",
        value="Greenland")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      attr:
        type: gitlab:GroupCustomAttribute
        properties:
          group: '42'
          key: location
          value: Greenland
    

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

    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

    The GroupCustomAttribute resource accepts the following input properties:

    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.

    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)
    Resource lookup is not supported in YAML
    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:
    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

    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
    

    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.
    gitlab logo
    GitLab v8.1.0 published on Friday, Jun 21, 2024 by Pulumi