Resource: awsCodestarconnectionsConnection
Provides a CodeStar Connection.
\~> NOTE: The awsCodestarconnectionsConnection
resource is created in the state pending
. Authentication with the connection provider must be completed in the AWS Console.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsCodestarconnectionsConnectionExample =
new aws.codestarconnectionsConnection.CodestarconnectionsConnection(
this,
"example",
{
name: "example-connection",
providerType: "Bitbucket",
}
);
const awsCodepipelineExample = new aws.codepipeline.Codepipeline(
this,
"example_1",
{
artifactStore: [{}],
name: "tf-test-pipeline",
roleArn: "${aws_iam_role.codepipeline_role.arn}",
stage: [
{
action: [
{
category: "Source",
configuration: [
{
branchName: "main",
connectionArn: awsCodestarconnectionsConnectionExample.arn,
fullRepositoryId: "my-organization/test",
},
],
name: "Source",
outputArtifacts: ["source_output"],
owner: "AWS",
provider: "CodeStarSourceConnection",
version: "1",
},
],
name: "Source",
},
{
action: [{}],
name: "Build",
},
{
action: [{}],
name: "Deploy",
},
],
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsCodepipelineExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
name
- (Required) The name of the connection to be created. The name must be unique in the calling AWS account. Changingname
will create a new resource.providerType
- (Optional) The name of the external provider where your third-party code repository is configured. Valid values arebitbucket
,gitHub
orgitHubEnterpriseServer
. ChangingproviderType
will create a new resource. Conflicts withhostArn
hostArn
- (Optional) The Amazon Resource Name (ARN) of the host associated with the connection. Conflicts withproviderType
tags
- (Optional) Map of key-value resource tags to associate with the resource. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The codestar connection ARN.arn
- The codestar connection ARN.connectionStatus
- The codestar connection status. Possible values arepending
,available
anderror
.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Import
CodeStar connections can be imported using the ARN, e.g.,