codestarconnections

package
v3.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	pulumi.CustomResourceState

	// The codestar connection ARN.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// The codestar connection status. Possible values are `PENDING`, `AVAILABLE` and `ERROR`.
	ConnectionStatus pulumi.StringOutput `pulumi:"connectionStatus"`
	// 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.
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the external provider where your third-party code repository is configured. Valid values are `Bitbucket`, `GitHub`, or `GitHubEnterpriseServer`. Changing `providerType` will create a new resource.
	ProviderType pulumi.StringOutput `pulumi:"providerType"`
}

Provides a CodeStar Connection.

> **NOTE:** The `codestarconnections.Connection` resource is created in the state `PENDING`. Authentication with the connection provider must be completed in the AWS Console.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/codepipeline"
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/codestarconnections"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleConnection, err := codestarconnections.NewConnection(ctx, "exampleConnection", &codestarconnections.ConnectionArgs{
			ProviderType: pulumi.String("Bitbucket"),
		})
		if err != nil {
			return err
		}
		_, err = codepipeline.NewPipeline(ctx, "examplePipeline", &codepipeline.PipelineArgs{
			RoleArn:       pulumi.Any(aws_iam_role.Codepipeline_role.Arn),
			ArtifactStore: nil,
			Stages: codepipeline.PipelineStageArray{
				&codepipeline.PipelineStageArgs{
					Name: pulumi.String("Source"),
					Actions: codepipeline.PipelineStageActionArray{
						&codepipeline.PipelineStageActionArgs{
							Name:     pulumi.String("Source"),
							Category: pulumi.String("Source"),
							Owner:    pulumi.String("AWS"),
							Provider: pulumi.String("CodeStarSourceConnection"),
							Version:  pulumi.String("1"),
							OutputArtifacts: pulumi.StringArray{
								pulumi.String("source_output"),
							},
							Configuration: pulumi.StringMap{
								"ConnectionArn":    exampleConnection.Arn,
								"FullRepositoryId": pulumi.String("my-organization/test"),
								"BranchName":       pulumi.String("main"),
							},
						},
					},
				},
				&codepipeline.PipelineStageArgs{
					Name: pulumi.String("Build"),
					Actions: codepipeline.PipelineStageActionArray{
						nil,
					},
				},
				&codepipeline.PipelineStageArgs{
					Name: pulumi.String("Deploy"),
					Actions: codepipeline.PipelineStageActionArray{
						nil,
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

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

```sh

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

```

func GetConnection

func GetConnection(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ConnectionState, opts ...pulumi.ResourceOption) (*Connection, error)

GetConnection gets an existing Connection resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewConnection

func NewConnection(ctx *pulumi.Context,
	name string, args *ConnectionArgs, opts ...pulumi.ResourceOption) (*Connection, error)

NewConnection registers a new resource with the given unique name, arguments, and options.

func (*Connection) ElementType

func (*Connection) ElementType() reflect.Type

func (*Connection) ToConnectionOutput

func (i *Connection) ToConnectionOutput() ConnectionOutput

func (*Connection) ToConnectionOutputWithContext

func (i *Connection) ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput

type ConnectionArgs

type ConnectionArgs struct {
	// 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.
	Name pulumi.StringPtrInput
	// The name of the external provider where your third-party code repository is configured. Valid values are `Bitbucket`, `GitHub`, or `GitHubEnterpriseServer`. Changing `providerType` will create a new resource.
	ProviderType pulumi.StringInput
}

The set of arguments for constructing a Connection resource.

func (ConnectionArgs) ElementType

func (ConnectionArgs) ElementType() reflect.Type

type ConnectionInput

type ConnectionInput interface {
	pulumi.Input

	ToConnectionOutput() ConnectionOutput
	ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput
}

type ConnectionOutput

type ConnectionOutput struct {
	*pulumi.OutputState
}

func (ConnectionOutput) ElementType

func (ConnectionOutput) ElementType() reflect.Type

func (ConnectionOutput) ToConnectionOutput

func (o ConnectionOutput) ToConnectionOutput() ConnectionOutput

func (ConnectionOutput) ToConnectionOutputWithContext

func (o ConnectionOutput) ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput

type ConnectionState

type ConnectionState struct {
	// The codestar connection ARN.
	Arn pulumi.StringPtrInput
	// The codestar connection status. Possible values are `PENDING`, `AVAILABLE` and `ERROR`.
	ConnectionStatus pulumi.StringPtrInput
	// 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.
	Name pulumi.StringPtrInput
	// The name of the external provider where your third-party code repository is configured. Valid values are `Bitbucket`, `GitHub`, or `GitHubEnterpriseServer`. Changing `providerType` will create a new resource.
	ProviderType pulumi.StringPtrInput
}

func (ConnectionState) ElementType

func (ConnectionState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL