1. Packages
  2. Qovery
  3. API Docs
  4. GitToken
Qovery v0.41.0 published on Saturday, Sep 28, 2024 by dirien

qovery.GitToken

Explore with Pulumi AI

qovery logo
Qovery v0.41.0 published on Saturday, Sep 28, 2024 by dirien

    # qovery.GitToken (Resource)

    Provides a Qovery git token resource. This can be used to create and manage Qovery git token.

    Example

    import * as pulumi from "@pulumi/pulumi";
    import * as qovery from "@ediri/qovery";
    
    const myGitToken = new qovery.GitToken("myGitToken", {
        organizationId: qovery_organization.my_organization.id,
        type: "GITHUB",
        token: "my-git-provider-token",
        description: "Github token",
        bitbucketWorkspace: "workspace-bitbucket",
    });
    
    import pulumi
    import ediri_qovery as qovery
    
    my_git_token = qovery.GitToken("myGitToken",
        organization_id=qovery_organization["my_organization"]["id"],
        type="GITHUB",
        token="my-git-provider-token",
        description="Github token",
        bitbucket_workspace="workspace-bitbucket")
    
    package main
    
    import (
    	"github.com/dirien/pulumi-qovery/sdk/go/qovery"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := qovery.NewGitToken(ctx, "myGitToken", &qovery.GitTokenArgs{
    			OrganizationId:     pulumi.Any(qovery_organization.My_organization.Id),
    			Type:               pulumi.String("GITHUB"),
    			Token:              pulumi.String("my-git-provider-token"),
    			Description:        pulumi.String("Github token"),
    			BitbucketWorkspace: pulumi.String("workspace-bitbucket"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Qovery = ediri.Qovery;
    
    return await Deployment.RunAsync(() => 
    {
        var myGitToken = new Qovery.GitToken("myGitToken", new()
        {
            OrganizationId = qovery_organization.My_organization.Id,
            Type = "GITHUB",
            Token = "my-git-provider-token",
            Description = "Github token",
            BitbucketWorkspace = "workspace-bitbucket",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.qovery.GitToken;
    import com.pulumi.qovery.GitTokenArgs;
    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 myGitToken = new GitToken("myGitToken", GitTokenArgs.builder()
                .organizationId(qovery_organization.my_organization().id())
                .type("GITHUB")
                .token("my-git-provider-token")
                .description("Github token")
                .bitbucketWorkspace("workspace-bitbucket")
                .build());
    
        }
    }
    
    resources:
      myGitToken:
        type: qovery:GitToken
        properties:
          # Required
          organizationId: ${qovery_organization.my_organization.id}
          type: GITHUB
          token: my-git-provider-token
          # Optional
          description: Github token
          # Only necessary for BITBUCKET git tokens
          bitbucketWorkspace: workspace-bitbucket
    

    Create GitToken Resource

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

    Constructor syntax

    new GitToken(name: string, args: GitTokenArgs, opts?: CustomResourceOptions);
    @overload
    def GitToken(resource_name: str,
                 args: GitTokenArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def GitToken(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 organization_id: Optional[str] = None,
                 token: Optional[str] = None,
                 type: Optional[str] = None,
                 bitbucket_workspace: Optional[str] = None,
                 description: Optional[str] = None,
                 name: Optional[str] = None)
    func NewGitToken(ctx *Context, name string, args GitTokenArgs, opts ...ResourceOption) (*GitToken, error)
    public GitToken(string name, GitTokenArgs args, CustomResourceOptions? opts = null)
    public GitToken(String name, GitTokenArgs args)
    public GitToken(String name, GitTokenArgs args, CustomResourceOptions options)
    
    type: qovery:GitToken
    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 GitTokenArgs
    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 GitTokenArgs
    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 GitTokenArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GitTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GitTokenArgs
    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 gitTokenResource = new Qovery.GitToken("gitTokenResource", new()
    {
        OrganizationId = "string",
        Token = "string",
        Type = "string",
        BitbucketWorkspace = "string",
        Description = "string",
        Name = "string",
    });
    
    example, err := qovery.NewGitToken(ctx, "gitTokenResource", &qovery.GitTokenArgs{
    	OrganizationId:     pulumi.String("string"),
    	Token:              pulumi.String("string"),
    	Type:               pulumi.String("string"),
    	BitbucketWorkspace: pulumi.String("string"),
    	Description:        pulumi.String("string"),
    	Name:               pulumi.String("string"),
    })
    
    var gitTokenResource = new GitToken("gitTokenResource", GitTokenArgs.builder()
        .organizationId("string")
        .token("string")
        .type("string")
        .bitbucketWorkspace("string")
        .description("string")
        .name("string")
        .build());
    
    git_token_resource = qovery.GitToken("gitTokenResource",
        organization_id="string",
        token="string",
        type="string",
        bitbucket_workspace="string",
        description="string",
        name="string")
    
    const gitTokenResource = new qovery.GitToken("gitTokenResource", {
        organizationId: "string",
        token: "string",
        type: "string",
        bitbucketWorkspace: "string",
        description: "string",
        name: "string",
    });
    
    type: qovery:GitToken
    properties:
        bitbucketWorkspace: string
        description: string
        name: string
        organizationId: string
        token: string
        type: string
    

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

    OrganizationId string
    Id of the organization.
    Token string
    Value of the git token.
    Type string
    Type of the git token. - Can be: BITBUCKET, GITHUB, GITLAB.
    BitbucketWorkspace string
    (Mandatory only for Bitbucket git token) Workspace where the token has permissions .
    Description string
    Description of the git token.
    Name string
    Name of the git token.
    OrganizationId string
    Id of the organization.
    Token string
    Value of the git token.
    Type string
    Type of the git token. - Can be: BITBUCKET, GITHUB, GITLAB.
    BitbucketWorkspace string
    (Mandatory only for Bitbucket git token) Workspace where the token has permissions .
    Description string
    Description of the git token.
    Name string
    Name of the git token.
    organizationId String
    Id of the organization.
    token String
    Value of the git token.
    type String
    Type of the git token. - Can be: BITBUCKET, GITHUB, GITLAB.
    bitbucketWorkspace String
    (Mandatory only for Bitbucket git token) Workspace where the token has permissions .
    description String
    Description of the git token.
    name String
    Name of the git token.
    organizationId string
    Id of the organization.
    token string
    Value of the git token.
    type string
    Type of the git token. - Can be: BITBUCKET, GITHUB, GITLAB.
    bitbucketWorkspace string
    (Mandatory only for Bitbucket git token) Workspace where the token has permissions .
    description string
    Description of the git token.
    name string
    Name of the git token.
    organization_id str
    Id of the organization.
    token str
    Value of the git token.
    type str
    Type of the git token. - Can be: BITBUCKET, GITHUB, GITLAB.
    bitbucket_workspace str
    (Mandatory only for Bitbucket git token) Workspace where the token has permissions .
    description str
    Description of the git token.
    name str
    Name of the git token.
    organizationId String
    Id of the organization.
    token String
    Value of the git token.
    type String
    Type of the git token. - Can be: BITBUCKET, GITHUB, GITLAB.
    bitbucketWorkspace String
    (Mandatory only for Bitbucket git token) Workspace where the token has permissions .
    description String
    Description of the git token.
    name String
    Name of the git token.

    Outputs

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

    Get an existing GitToken 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?: GitTokenState, opts?: CustomResourceOptions): GitToken
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bitbucket_workspace: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            organization_id: Optional[str] = None,
            token: Optional[str] = None,
            type: Optional[str] = None) -> GitToken
    func GetGitToken(ctx *Context, name string, id IDInput, state *GitTokenState, opts ...ResourceOption) (*GitToken, error)
    public static GitToken Get(string name, Input<string> id, GitTokenState? state, CustomResourceOptions? opts = null)
    public static GitToken get(String name, Output<String> id, GitTokenState 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:
    BitbucketWorkspace string
    (Mandatory only for Bitbucket git token) Workspace where the token has permissions .
    Description string
    Description of the git token.
    Name string
    Name of the git token.
    OrganizationId string
    Id of the organization.
    Token string
    Value of the git token.
    Type string
    Type of the git token. - Can be: BITBUCKET, GITHUB, GITLAB.
    BitbucketWorkspace string
    (Mandatory only for Bitbucket git token) Workspace where the token has permissions .
    Description string
    Description of the git token.
    Name string
    Name of the git token.
    OrganizationId string
    Id of the organization.
    Token string
    Value of the git token.
    Type string
    Type of the git token. - Can be: BITBUCKET, GITHUB, GITLAB.
    bitbucketWorkspace String
    (Mandatory only for Bitbucket git token) Workspace where the token has permissions .
    description String
    Description of the git token.
    name String
    Name of the git token.
    organizationId String
    Id of the organization.
    token String
    Value of the git token.
    type String
    Type of the git token. - Can be: BITBUCKET, GITHUB, GITLAB.
    bitbucketWorkspace string
    (Mandatory only for Bitbucket git token) Workspace where the token has permissions .
    description string
    Description of the git token.
    name string
    Name of the git token.
    organizationId string
    Id of the organization.
    token string
    Value of the git token.
    type string
    Type of the git token. - Can be: BITBUCKET, GITHUB, GITLAB.
    bitbucket_workspace str
    (Mandatory only for Bitbucket git token) Workspace where the token has permissions .
    description str
    Description of the git token.
    name str
    Name of the git token.
    organization_id str
    Id of the organization.
    token str
    Value of the git token.
    type str
    Type of the git token. - Can be: BITBUCKET, GITHUB, GITLAB.
    bitbucketWorkspace String
    (Mandatory only for Bitbucket git token) Workspace where the token has permissions .
    description String
    Description of the git token.
    name String
    Name of the git token.
    organizationId String
    Id of the organization.
    token String
    Value of the git token.
    type String
    Type of the git token. - Can be: BITBUCKET, GITHUB, GITLAB.

    Import

    $ pulumi import qovery:index/gitToken:GitToken my_git_token "<organization_id>,<git_token_id>"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    qovery dirien/pulumi-qovery
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the qovery Terraform Provider.
    qovery logo
    Qovery v0.41.0 published on Saturday, Sep 28, 2024 by dirien