Resource: aws_codebuild_source_credential

Provides a CodeBuild Source Credentials Resource.

Example Usage

resource "aws_codebuild_source_credential" "example" {
  auth_type   = "PERSONAL_ACCESS_TOKEN"
  server_type = "GITHUB"
  token       = "example"
}

Bitbucket Server Usage

resource "aws_codebuild_source_credential" "example" {
  auth_type   = "BASIC_AUTH"
  server_type = "BITBUCKET"
  token       = "example"
  user_name   = "test-user"
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import CodeBuild Source Credential using the CodeBuild Source Credential arn. For example:

import {
  to = aws_codebuild_source_credential.example
  id = "arn:aws:codebuild:us-west-2:123456789:token:github"
}

Using terraform import, import CodeBuild Source Credential using the CodeBuild Source Credential arn. For example:

% terraform import aws_codebuild_source_credential.example arn:aws:codebuild:us-west-2:123456789:token:github