Connection

class Connection : KotlinCustomResource

Provides a CodeStar Connection.

NOTE: The aws.codestarconnections.Connection resource is created in the state PENDING. Authentication with the connection provider must be completed in the AWS Console. See the AWS documentation for details.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.codestarconnections.Connection;
import com.pulumi.aws.codestarconnections.ConnectionArgs;
import com.pulumi.aws.codepipeline.Pipeline;
import com.pulumi.aws.codepipeline.PipelineArgs;
import com.pulumi.aws.codepipeline.inputs.PipelineArtifactStoreArgs;
import com.pulumi.aws.codepipeline.inputs.PipelineStageArgs;
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 exampleConnection = new Connection("exampleConnection", ConnectionArgs.builder()
.providerType("Bitbucket")
.build());
var examplePipeline = new Pipeline("examplePipeline", PipelineArgs.builder()
.roleArn(aws_iam_role.codepipeline_role().arn())
.artifactStores()
.stages(
PipelineStageArgs.builder()
.name("Source")
.actions(PipelineStageActionArgs.builder()
.name("Source")
.category("Source")
.owner("AWS")
.provider("CodeStarSourceConnection")
.version("1")
.outputArtifacts("source_output")
.configuration(Map.ofEntries(
Map.entry("ConnectionArn", exampleConnection.arn()),
Map.entry("FullRepositoryId", "my-organization/test"),
Map.entry("BranchName", "main")
))
.build())
.build(),
PipelineStageArgs.builder()
.name("Build")
.actions()
.build(),
PipelineStageArgs.builder()
.name("Deploy")
.actions()
.build())
.build());
}
}

Import

CodeStar connections can be imported using the ARN, e.g.,

$ pulumi import aws:codestarconnections/connection:Connection test-connection arn:aws:codestar-connections:us-west-1:0123456789:connection/79d4d357-a2ee-41e4-b350-2fe39ae59448

Properties

Link copied to clipboard
val arn: Output<String>

The codestar connection ARN.

Link copied to clipboard

The codestar connection status. Possible values are PENDING, AVAILABLE and ERROR.

Link copied to clipboard
val hostArn: Output<String>?

The Amazon Resource Name (ARN) of the host associated with the connection. Conflicts with provider_type

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the connection to be created. The name must be unique in the calling AWS account. Changing name will create a new resource.

Link copied to clipboard
val providerType: Output<String>

The name of the external provider where your third-party code repository is configured. Valid values are Bitbucket, GitHub or GitHubEnterpriseServer. Changing provider_type will create a new resource. Conflicts with host_arn

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tags: Output<Map<String, String>>?

Map of key-value resource tags to associate with the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>