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
new SourceCredential(name: string, args: SourceCredentialArgs, opts?: CustomResourceOptions);def SourceCredential(resource_name, opts=None, auth_type=None, server_type=None, token=None, user_name=None, __props__=None);func NewSourceCredential(ctx *Context, name string, args SourceCredentialArgs, opts ...ResourceOption) (*SourceCredential, error)public SourceCredential(string name, SourceCredentialArgs args, CustomResourceOptions? opts = null)- 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:
- Auth
Type 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.
- Server
Type string The source provider used for this project.
- Token string
For
GitHuborGitHub Enterprise, this is the personal access token. ForBitbucket, this is the app password.- User
Name 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 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.
- Server
Type string The source provider used for this project.
- Token string
For
GitHuborGitHub Enterprise, this is the personal access token. ForBitbucket, this is the app password.- User
Name 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 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.
- server
Type string The source provider used for this project.
- token string
For
GitHuborGitHub Enterprise, this is the personal access token. ForBitbucket, this is the app password.- user
Name 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
GitHuborGitHub Enterprise, this is the personal access token. ForBitbucket, 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:
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): SourceCredentialstatic 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.
- Auth
Type 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.
- Server
Type string The source provider used for this project.
- Token string
For
GitHuborGitHub Enterprise, this is the personal access token. ForBitbucket, this is the app password.- User
Name 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.
- Auth
Type 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.
- Server
Type string The source provider used for this project.
- Token string
For
GitHuborGitHub Enterprise, this is the personal access token. ForBitbucket, this is the app password.- User
Name 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.
- auth
Type 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.
- server
Type string The source provider used for this project.
- token string
For
GitHuborGitHub Enterprise, this is the personal access token. ForBitbucket, this is the app password.- user
Name 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
GitHuborGitHub Enterprise, this is the personal access token. ForBitbucket, 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
awsTerraform Provider.