ConnectionArgs

data class ConnectionArgs(val hostArn: Output<String>? = null, val name: Output<String>? = null, val providerType: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ConnectionArgs>

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

Constructors

Link copied to clipboard
constructor(hostArn: Output<String>? = null, name: Output<String>? = null, providerType: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

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

Link copied to clipboard
val name: Output<String>? = null

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>? = null

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 tags: Output<Map<String, String>>? = null

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.

Functions

Link copied to clipboard
open override fun toJava(): ConnectionArgs