SourceCredential

Provides a CodeBuild Source Credentials Resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.CodeBuild.SourceCredential("example", new Aws.CodeBuild.SourceCredentialArgs
        {
            AuthType = "PERSONAL_ACCESS_TOKEN",
            ServerType = "GITHUB",
            Token = "example",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/codebuild"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := codebuild.NewSourceCredential(ctx, "example", &codebuild.SourceCredentialArgs{
            AuthType:   pulumi.String("PERSONAL_ACCESS_TOKEN"),
            ServerType: pulumi.String("GITHUB"),
            Token:      pulumi.String("example"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.codebuild.SourceCredential("example",
    auth_type="PERSONAL_ACCESS_TOKEN",
    server_type="GITHUB",
    token="example")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.codebuild.SourceCredential("example", {
    authType: "PERSONAL_ACCESS_TOKEN",
    serverType: "GITHUB",
    token: "example",
});

Bitbucket Server Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.CodeBuild.SourceCredential("example", new Aws.CodeBuild.SourceCredentialArgs
        {
            AuthType = "BASIC_AUTH",
            ServerType = "BITBUCKET",
            Token = "example",
            UserName = "test-user",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/codebuild"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := codebuild.NewSourceCredential(ctx, "example", &codebuild.SourceCredentialArgs{
            AuthType:   pulumi.String("BASIC_AUTH"),
            ServerType: pulumi.String("BITBUCKET"),
            Token:      pulumi.String("example"),
            UserName:   pulumi.String("test-user"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.codebuild.SourceCredential("example",
    auth_type="BASIC_AUTH",
    server_type="BITBUCKET",
    token="example",
    user_name="test-user")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.codebuild.SourceCredential("example", {
    authType: "BASIC_AUTH",
    serverType: "BITBUCKET",
    token: "example",
    userName: "test-user",
});

Create a SourceCredential Resource

def SourceCredential(resource_name, opts=None, auth_type=None, server_type=None, token=None, user_name=None, __props__=None);
name string
The unique name of the resource.
args SourceCredentialArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args SourceCredentialArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SourceCredentialArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

SourceCredential Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The SourceCredential resource accepts the following input properties:

AuthType string

The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API.

ServerType string

The source provider used for this project.

Token string

For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is the app password.

UserName string

The Bitbucket username when the authType is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.

AuthType string

The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API.

ServerType string

The source provider used for this project.

Token string

For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is the app password.

UserName string

The Bitbucket username when the authType is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.

authType string

The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API.

serverType string

The source provider used for this project.

token string

For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is the app password.

userName string

The Bitbucket username when the authType is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.

auth_type str

The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API.

server_type str

The source provider used for this project.

token str

For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is the app password.

user_name str

The Bitbucket username when the authType is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.

Outputs

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

Arn string

The ARN of Source Credential.

Id string
The provider-assigned unique ID for this managed resource.
Arn string

The ARN of Source Credential.

Id string
The provider-assigned unique ID for this managed resource.
arn string

The ARN of Source Credential.

id string
The provider-assigned unique ID for this managed resource.
arn str

The ARN of Source Credential.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing SourceCredential Resource

Get an existing SourceCredential 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?: SourceCredentialState, opts?: CustomResourceOptions): SourceCredential
static get(resource_name, id, opts=None, arn=None, auth_type=None, server_type=None, token=None, user_name=None, __props__=None);
func GetSourceCredential(ctx *Context, name string, id IDInput, state *SourceCredentialState, opts ...ResourceOption) (*SourceCredential, error)
public static SourceCredential Get(string name, Input<string> id, SourceCredentialState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Arn string

The ARN of Source Credential.

AuthType string

The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API.

ServerType string

The source provider used for this project.

Token string

For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is the app password.

UserName string

The Bitbucket username when the authType is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.

Arn string

The ARN of Source Credential.

AuthType string

The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API.

ServerType string

The source provider used for this project.

Token string

For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is the app password.

UserName string

The Bitbucket username when the authType is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.

arn string

The ARN of Source Credential.

authType string

The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API.

serverType string

The source provider used for this project.

token string

For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is the app password.

userName string

The Bitbucket username when the authType is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.

arn str

The ARN of Source Credential.

auth_type str

The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API.

server_type str

The source provider used for this project.

token str

For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is the app password.

user_name str

The Bitbucket username when the authType is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.