1. Packages
  2. GitLab
  3. API Docs
  4. ClusterAgent
GitLab v6.11.0 published on Friday, Apr 19, 2024 by Pulumi

gitlab.ClusterAgent

Explore with Pulumi AI

gitlab logo
GitLab v6.11.0 published on Friday, Apr 19, 2024 by Pulumi

    The gitlab.ClusterAgent resource allows to manage the lifecycle of a GitLab Agent for Kubernetes.

    Note that this resource only registers the agent, but doesn’t configure it. The configuration needs to be manually added as described in the docs. However, a gitlab.RepositoryFile resource may be used to achieve that.

    Requires at least maintainer permissions on the project.

    Requires at least GitLab 14.10

    Upstream API: GitLab REST API docs

    Create ClusterAgent Resource

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

    Constructor syntax

    new ClusterAgent(name: string, args: ClusterAgentArgs, opts?: CustomResourceOptions);
    @overload
    def ClusterAgent(resource_name: str,
                     args: ClusterAgentArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClusterAgent(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     project: Optional[str] = None,
                     name: Optional[str] = None)
    func NewClusterAgent(ctx *Context, name string, args ClusterAgentArgs, opts ...ResourceOption) (*ClusterAgent, error)
    public ClusterAgent(string name, ClusterAgentArgs args, CustomResourceOptions? opts = null)
    public ClusterAgent(String name, ClusterAgentArgs args)
    public ClusterAgent(String name, ClusterAgentArgs args, CustomResourceOptions options)
    
    type: gitlab:ClusterAgent
    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 ClusterAgentArgs
    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 ClusterAgentArgs
    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 ClusterAgentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClusterAgentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClusterAgentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var clusterAgentResource = new GitLab.ClusterAgent("clusterAgentResource", new()
    {
        Project = "string",
        Name = "string",
    });
    
    example, err := gitlab.NewClusterAgent(ctx, "clusterAgentResource", &gitlab.ClusterAgentArgs{
    	Project: pulumi.String("string"),
    	Name:    pulumi.String("string"),
    })
    
    var clusterAgentResource = new ClusterAgent("clusterAgentResource", ClusterAgentArgs.builder()        
        .project("string")
        .name("string")
        .build());
    
    cluster_agent_resource = gitlab.ClusterAgent("clusterAgentResource",
        project="string",
        name="string")
    
    const clusterAgentResource = new gitlab.ClusterAgent("clusterAgentResource", {
        project: "string",
        name: "string",
    });
    
    type: gitlab:ClusterAgent
    properties:
        name: string
        project: string
    

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

    Project string
    ID or full path of the project maintained by the authenticated user.
    Name string
    The Name of the agent.
    Project string
    ID or full path of the project maintained by the authenticated user.
    Name string
    The Name of the agent.
    project String
    ID or full path of the project maintained by the authenticated user.
    name String
    The Name of the agent.
    project string
    ID or full path of the project maintained by the authenticated user.
    name string
    The Name of the agent.
    project str
    ID or full path of the project maintained by the authenticated user.
    name str
    The Name of the agent.
    project String
    ID or full path of the project maintained by the authenticated user.
    name String
    The Name of the agent.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ClusterAgent resource produces the following output properties:

    AgentId int
    The ID of the agent.
    CreatedAt string
    The ISO8601 datetime when the agent was created.
    CreatedByUserId int
    The ID of the user who created the agent.
    Id string
    The provider-assigned unique ID for this managed resource.
    AgentId int
    The ID of the agent.
    CreatedAt string
    The ISO8601 datetime when the agent was created.
    CreatedByUserId int
    The ID of the user who created the agent.
    Id string
    The provider-assigned unique ID for this managed resource.
    agentId Integer
    The ID of the agent.
    createdAt String
    The ISO8601 datetime when the agent was created.
    createdByUserId Integer
    The ID of the user who created the agent.
    id String
    The provider-assigned unique ID for this managed resource.
    agentId number
    The ID of the agent.
    createdAt string
    The ISO8601 datetime when the agent was created.
    createdByUserId number
    The ID of the user who created the agent.
    id string
    The provider-assigned unique ID for this managed resource.
    agent_id int
    The ID of the agent.
    created_at str
    The ISO8601 datetime when the agent was created.
    created_by_user_id int
    The ID of the user who created the agent.
    id str
    The provider-assigned unique ID for this managed resource.
    agentId Number
    The ID of the agent.
    createdAt String
    The ISO8601 datetime when the agent was created.
    createdByUserId Number
    The ID of the user who created the agent.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ClusterAgent Resource

    Get an existing ClusterAgent 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?: ClusterAgentState, opts?: CustomResourceOptions): ClusterAgent
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            agent_id: Optional[int] = None,
            created_at: Optional[str] = None,
            created_by_user_id: Optional[int] = None,
            name: Optional[str] = None,
            project: Optional[str] = None) -> ClusterAgent
    func GetClusterAgent(ctx *Context, name string, id IDInput, state *ClusterAgentState, opts ...ResourceOption) (*ClusterAgent, error)
    public static ClusterAgent Get(string name, Input<string> id, ClusterAgentState? state, CustomResourceOptions? opts = null)
    public static ClusterAgent get(String name, Output<String> id, ClusterAgentState 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:
    AgentId int
    The ID of the agent.
    CreatedAt string
    The ISO8601 datetime when the agent was created.
    CreatedByUserId int
    The ID of the user who created the agent.
    Name string
    The Name of the agent.
    Project string
    ID or full path of the project maintained by the authenticated user.
    AgentId int
    The ID of the agent.
    CreatedAt string
    The ISO8601 datetime when the agent was created.
    CreatedByUserId int
    The ID of the user who created the agent.
    Name string
    The Name of the agent.
    Project string
    ID or full path of the project maintained by the authenticated user.
    agentId Integer
    The ID of the agent.
    createdAt String
    The ISO8601 datetime when the agent was created.
    createdByUserId Integer
    The ID of the user who created the agent.
    name String
    The Name of the agent.
    project String
    ID or full path of the project maintained by the authenticated user.
    agentId number
    The ID of the agent.
    createdAt string
    The ISO8601 datetime when the agent was created.
    createdByUserId number
    The ID of the user who created the agent.
    name string
    The Name of the agent.
    project string
    ID or full path of the project maintained by the authenticated user.
    agent_id int
    The ID of the agent.
    created_at str
    The ISO8601 datetime when the agent was created.
    created_by_user_id int
    The ID of the user who created the agent.
    name str
    The Name of the agent.
    project str
    ID or full path of the project maintained by the authenticated user.
    agentId Number
    The ID of the agent.
    createdAt String
    The ISO8601 datetime when the agent was created.
    createdByUserId Number
    The ID of the user who created the agent.
    name String
    The Name of the agent.
    project String
    ID or full path of the project maintained by the authenticated user.

    Import

    GitLab Agent for Kubernetes can be imported with the following command and the id pattern <project>:<agent-id>

    $ pulumi import gitlab:index/clusterAgent:ClusterAgent example '12345:42'
    

    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 v6.11.0 published on Friday, Apr 19, 2024 by Pulumi