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.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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
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
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. GitTokenArgs
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. 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 This property is required. string
The unique name of the resource.
args This property is required. GitTokenArgs
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. GitTokenArgs
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. 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",
});
Copy
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"),
})
Copy
var gitTokenResource = new GitToken("gitTokenResource", GitTokenArgs.builder()
    .organizationId("string")
    .token("string")
    .type("string")
    .bitbucketWorkspace("string")
    .description("string")
    .name("string")
    .build());
Copy
git_token_resource = qovery.GitToken("gitTokenResource",
    organization_id="string",
    token="string",
    type="string",
    bitbucket_workspace="string",
    description="string",
    name="string")
Copy
const gitTokenResource = new qovery.GitToken("gitTokenResource", {
    organizationId: "string",
    token: "string",
    type: "string",
    bitbucketWorkspace: "string",
    description: "string",
    name: "string",
});
Copy
type: qovery:GitToken
properties:
    bitbucketWorkspace: string
    description: string
    name: string
    organizationId: string
    token: string
    type: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The GitToken resource accepts the following input properties:

OrganizationId This property is required. string
Id of the organization.
Token This property is required. string
Value of the git token.
Type This property is required. 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 This property is required. string
Id of the organization.
Token This property is required. string
Value of the git token.
Type This property is required. 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 This property is required. String
Id of the organization.
token This property is required. String
Value of the git token.
type This property is required. 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 This property is required. string
Id of the organization.
token This property is required. string
Value of the git token.
type This property is required. 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 This property is required. str
Id of the organization.
token This property is required. str
Value of the git token.
type This property is required. 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 This property is required. String
Id of the organization.
token This property is required. String
Value of the git token.
type This property is required. 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)
resources:  _:    type: qovery:GitToken    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:
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>"
Copy

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.