integration

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsParameterStore

type AwsParameterStore struct {
	pulumi.CustomResourceState

	// The ARN of the AWS role for Doppler to assume
	AssumeRoleArn pulumi.StringOutput `pulumi:"assumeRoleArn"`
	// The name of the integration
	Name pulumi.StringOutput `pulumi:"name"`
}

Manage an AWS Parameter Store Doppler integration.

## Example Usage

```go package main

import (

"encoding/json"

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-doppler/sdk/go/doppler/integration"
"github.com/pulumiverse/pulumi-doppler/sdk/go/doppler/secretsSync"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"Version": "2012-10-17",
			"Statement": []map[string]interface{}{
				map[string]interface{}{
					"Effect": "Allow",
					"Action": "sts:AssumeRole",
					"Principal": map[string]interface{}{
						"AWS": "arn:aws:iam::299900769157:user/doppler-integration-operator",
					},
					"Condition": map[string]interface{}{
						"StringEquals": map[string]interface{}{
							"sts:ExternalId": "<YOUR_WORKPLACE_SLUG>",
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		tmpJSON1, err := json.Marshal(map[string]interface{}{
			"Version": "2012-10-17",
			"Statement": []map[string]interface{}{
				map[string]interface{}{
					"Action": []string{
						"ssm:PutParameter",
						"ssm:LabelParameterVersion",
						"ssm:DeleteParameter",
						"ssm:RemoveTagsFromResource",
						"ssm:GetParameterHistory",
						"ssm:AddTagsToResource",
						"ssm:GetParametersByPath",
						"ssm:GetParameters",
						"ssm:GetParameter",
						"ssm:DeleteParameters",
					},
					"Effect":   "Allow",
					"Resource": "*",
				},
			},
		})
		if err != nil {
			return err
		}
		json1 := string(tmpJSON1)
		dopplerParameterStore, err := iam.NewRole(ctx, "doppler_parameter_store", &iam.RoleArgs{
			Name:             pulumi.String("doppler_parameter_store"),
			AssumeRolePolicy: pulumi.String(json0),
			InlinePolicies: iam.RoleInlinePolicyArray{
				&iam.RoleInlinePolicyArgs{
					Name:   pulumi.String("doppler_secret_manager"),
					Policy: pulumi.String(json1),
				},
			},
		})
		if err != nil {
			return err
		}
		prod, err := integration.NewAwsParameterStore(ctx, "prod", &integration.AwsParameterStoreArgs{
			Name:          pulumi.String("Production"),
			AssumeRoleArn: dopplerParameterStore.Arn,
		})
		if err != nil {
			return err
		}
		_, err = secretsSync.NewAwsParameterStore(ctx, "backend_prod", &secretsSync.AwsParameterStoreArgs{
			Integration:  prod.ID(),
			Project:      pulumi.String("backend"),
			Config:       pulumi.String("prd"),
			Region:       pulumi.String("us-east-1"),
			Path:         pulumi.String("/backend/"),
			SecureString: pulumi.Bool(true),
			Tags: pulumi.StringMap{
				"myTag": pulumi.String("enabled"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetAwsParameterStore

func GetAwsParameterStore(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AwsParameterStoreState, opts ...pulumi.ResourceOption) (*AwsParameterStore, error)

GetAwsParameterStore gets an existing AwsParameterStore 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 NewAwsParameterStore

func NewAwsParameterStore(ctx *pulumi.Context,
	name string, args *AwsParameterStoreArgs, opts ...pulumi.ResourceOption) (*AwsParameterStore, error)

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

func (*AwsParameterStore) ElementType

func (*AwsParameterStore) ElementType() reflect.Type

func (*AwsParameterStore) ToAwsParameterStoreOutput

func (i *AwsParameterStore) ToAwsParameterStoreOutput() AwsParameterStoreOutput

func (*AwsParameterStore) ToAwsParameterStoreOutputWithContext

func (i *AwsParameterStore) ToAwsParameterStoreOutputWithContext(ctx context.Context) AwsParameterStoreOutput

type AwsParameterStoreArgs

type AwsParameterStoreArgs struct {
	// The ARN of the AWS role for Doppler to assume
	AssumeRoleArn pulumi.StringInput
	// The name of the integration
	Name pulumi.StringInput
}

The set of arguments for constructing a AwsParameterStore resource.

func (AwsParameterStoreArgs) ElementType

func (AwsParameterStoreArgs) ElementType() reflect.Type

type AwsParameterStoreArray

type AwsParameterStoreArray []AwsParameterStoreInput

func (AwsParameterStoreArray) ElementType

func (AwsParameterStoreArray) ElementType() reflect.Type

func (AwsParameterStoreArray) ToAwsParameterStoreArrayOutput

func (i AwsParameterStoreArray) ToAwsParameterStoreArrayOutput() AwsParameterStoreArrayOutput

func (AwsParameterStoreArray) ToAwsParameterStoreArrayOutputWithContext

func (i AwsParameterStoreArray) ToAwsParameterStoreArrayOutputWithContext(ctx context.Context) AwsParameterStoreArrayOutput

type AwsParameterStoreArrayInput

type AwsParameterStoreArrayInput interface {
	pulumi.Input

	ToAwsParameterStoreArrayOutput() AwsParameterStoreArrayOutput
	ToAwsParameterStoreArrayOutputWithContext(context.Context) AwsParameterStoreArrayOutput
}

AwsParameterStoreArrayInput is an input type that accepts AwsParameterStoreArray and AwsParameterStoreArrayOutput values. You can construct a concrete instance of `AwsParameterStoreArrayInput` via:

AwsParameterStoreArray{ AwsParameterStoreArgs{...} }

type AwsParameterStoreArrayOutput

type AwsParameterStoreArrayOutput struct{ *pulumi.OutputState }

func (AwsParameterStoreArrayOutput) ElementType

func (AwsParameterStoreArrayOutput) Index

func (AwsParameterStoreArrayOutput) ToAwsParameterStoreArrayOutput

func (o AwsParameterStoreArrayOutput) ToAwsParameterStoreArrayOutput() AwsParameterStoreArrayOutput

func (AwsParameterStoreArrayOutput) ToAwsParameterStoreArrayOutputWithContext

func (o AwsParameterStoreArrayOutput) ToAwsParameterStoreArrayOutputWithContext(ctx context.Context) AwsParameterStoreArrayOutput

type AwsParameterStoreInput

type AwsParameterStoreInput interface {
	pulumi.Input

	ToAwsParameterStoreOutput() AwsParameterStoreOutput
	ToAwsParameterStoreOutputWithContext(ctx context.Context) AwsParameterStoreOutput
}

type AwsParameterStoreMap

type AwsParameterStoreMap map[string]AwsParameterStoreInput

func (AwsParameterStoreMap) ElementType

func (AwsParameterStoreMap) ElementType() reflect.Type

func (AwsParameterStoreMap) ToAwsParameterStoreMapOutput

func (i AwsParameterStoreMap) ToAwsParameterStoreMapOutput() AwsParameterStoreMapOutput

func (AwsParameterStoreMap) ToAwsParameterStoreMapOutputWithContext

func (i AwsParameterStoreMap) ToAwsParameterStoreMapOutputWithContext(ctx context.Context) AwsParameterStoreMapOutput

type AwsParameterStoreMapInput

type AwsParameterStoreMapInput interface {
	pulumi.Input

	ToAwsParameterStoreMapOutput() AwsParameterStoreMapOutput
	ToAwsParameterStoreMapOutputWithContext(context.Context) AwsParameterStoreMapOutput
}

AwsParameterStoreMapInput is an input type that accepts AwsParameterStoreMap and AwsParameterStoreMapOutput values. You can construct a concrete instance of `AwsParameterStoreMapInput` via:

AwsParameterStoreMap{ "key": AwsParameterStoreArgs{...} }

type AwsParameterStoreMapOutput

type AwsParameterStoreMapOutput struct{ *pulumi.OutputState }

func (AwsParameterStoreMapOutput) ElementType

func (AwsParameterStoreMapOutput) ElementType() reflect.Type

func (AwsParameterStoreMapOutput) MapIndex

func (AwsParameterStoreMapOutput) ToAwsParameterStoreMapOutput

func (o AwsParameterStoreMapOutput) ToAwsParameterStoreMapOutput() AwsParameterStoreMapOutput

func (AwsParameterStoreMapOutput) ToAwsParameterStoreMapOutputWithContext

func (o AwsParameterStoreMapOutput) ToAwsParameterStoreMapOutputWithContext(ctx context.Context) AwsParameterStoreMapOutput

type AwsParameterStoreOutput

type AwsParameterStoreOutput struct{ *pulumi.OutputState }

func (AwsParameterStoreOutput) AssumeRoleArn

func (o AwsParameterStoreOutput) AssumeRoleArn() pulumi.StringOutput

The ARN of the AWS role for Doppler to assume

func (AwsParameterStoreOutput) ElementType

func (AwsParameterStoreOutput) ElementType() reflect.Type

func (AwsParameterStoreOutput) Name

The name of the integration

func (AwsParameterStoreOutput) ToAwsParameterStoreOutput

func (o AwsParameterStoreOutput) ToAwsParameterStoreOutput() AwsParameterStoreOutput

func (AwsParameterStoreOutput) ToAwsParameterStoreOutputWithContext

func (o AwsParameterStoreOutput) ToAwsParameterStoreOutputWithContext(ctx context.Context) AwsParameterStoreOutput

type AwsParameterStoreState

type AwsParameterStoreState struct {
	// The ARN of the AWS role for Doppler to assume
	AssumeRoleArn pulumi.StringPtrInput
	// The name of the integration
	Name pulumi.StringPtrInput
}

func (AwsParameterStoreState) ElementType

func (AwsParameterStoreState) ElementType() reflect.Type

type AwsSecretsManager

type AwsSecretsManager struct {
	pulumi.CustomResourceState

	// The ARN of the AWS role for Doppler to assume
	AssumeRoleArn pulumi.StringOutput `pulumi:"assumeRoleArn"`
	// The name of the integration
	Name pulumi.StringOutput `pulumi:"name"`
}

Manage an AWS Secrets Manager Doppler integration.

## Example Usage

```go package main

import (

"encoding/json"

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-doppler/sdk/go/doppler/integration"
"github.com/pulumiverse/pulumi-doppler/sdk/go/doppler/secretsSync"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"Version": "2012-10-17",
			"Statement": []map[string]interface{}{
				map[string]interface{}{
					"Effect": "Allow",
					"Action": "sts:AssumeRole",
					"Principal": map[string]interface{}{
						"AWS": "arn:aws:iam::299900769157:user/doppler-integration-operator",
					},
					"Condition": map[string]interface{}{
						"StringEquals": map[string]interface{}{
							"sts:ExternalId": "<YOUR_WORKPLACE_SLUG>",
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		tmpJSON1, err := json.Marshal(map[string]interface{}{
			"Version": "2012-10-17",
			"Statement": []map[string]interface{}{
				map[string]interface{}{
					"Action": []string{
						"secretsmanager:GetSecretValue",
						"secretsmanager:DescribeSecret",
						"secretsmanager:PutSecretValue",
						"secretsmanager:CreateSecret",
						"secretsmanager:DeleteSecret",
						"secretsmanager:TagResource",
						"secretsmanager:UpdateSecret",
					},
					"Effect":   "Allow",
					"Resource": "*",
				},
			},
		})
		if err != nil {
			return err
		}
		json1 := string(tmpJSON1)
		dopplerSecretsManager, err := iam.NewRole(ctx, "doppler_secrets_manager", &iam.RoleArgs{
			Name:             pulumi.String("doppler_secrets_manager"),
			AssumeRolePolicy: pulumi.String(json0),
			InlinePolicies: iam.RoleInlinePolicyArray{
				&iam.RoleInlinePolicyArgs{
					Name:   pulumi.String("doppler_secret_manager"),
					Policy: pulumi.String(json1),
				},
			},
		})
		if err != nil {
			return err
		}
		prod, err := integration.NewAwsSecretsManager(ctx, "prod", &integration.AwsSecretsManagerArgs{
			Name:          pulumi.String("Production"),
			AssumeRoleArn: dopplerSecretsManager.Arn,
		})
		if err != nil {
			return err
		}
		_, err = secretsSync.NewAwsSecretsManager(ctx, "backend_prod", &secretsSync.AwsSecretsManagerArgs{
			Integration: prod.ID(),
			Project:     pulumi.String("backend"),
			Config:      pulumi.String("prd"),
			Region:      pulumi.String("us-east-1"),
			Path:        pulumi.String("/backend/"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetAwsSecretsManager

func GetAwsSecretsManager(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AwsSecretsManagerState, opts ...pulumi.ResourceOption) (*AwsSecretsManager, error)

GetAwsSecretsManager gets an existing AwsSecretsManager 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 NewAwsSecretsManager

func NewAwsSecretsManager(ctx *pulumi.Context,
	name string, args *AwsSecretsManagerArgs, opts ...pulumi.ResourceOption) (*AwsSecretsManager, error)

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

func (*AwsSecretsManager) ElementType

func (*AwsSecretsManager) ElementType() reflect.Type

func (*AwsSecretsManager) ToAwsSecretsManagerOutput

func (i *AwsSecretsManager) ToAwsSecretsManagerOutput() AwsSecretsManagerOutput

func (*AwsSecretsManager) ToAwsSecretsManagerOutputWithContext

func (i *AwsSecretsManager) ToAwsSecretsManagerOutputWithContext(ctx context.Context) AwsSecretsManagerOutput

type AwsSecretsManagerArgs

type AwsSecretsManagerArgs struct {
	// The ARN of the AWS role for Doppler to assume
	AssumeRoleArn pulumi.StringInput
	// The name of the integration
	Name pulumi.StringInput
}

The set of arguments for constructing a AwsSecretsManager resource.

func (AwsSecretsManagerArgs) ElementType

func (AwsSecretsManagerArgs) ElementType() reflect.Type

type AwsSecretsManagerArray

type AwsSecretsManagerArray []AwsSecretsManagerInput

func (AwsSecretsManagerArray) ElementType

func (AwsSecretsManagerArray) ElementType() reflect.Type

func (AwsSecretsManagerArray) ToAwsSecretsManagerArrayOutput

func (i AwsSecretsManagerArray) ToAwsSecretsManagerArrayOutput() AwsSecretsManagerArrayOutput

func (AwsSecretsManagerArray) ToAwsSecretsManagerArrayOutputWithContext

func (i AwsSecretsManagerArray) ToAwsSecretsManagerArrayOutputWithContext(ctx context.Context) AwsSecretsManagerArrayOutput

type AwsSecretsManagerArrayInput

type AwsSecretsManagerArrayInput interface {
	pulumi.Input

	ToAwsSecretsManagerArrayOutput() AwsSecretsManagerArrayOutput
	ToAwsSecretsManagerArrayOutputWithContext(context.Context) AwsSecretsManagerArrayOutput
}

AwsSecretsManagerArrayInput is an input type that accepts AwsSecretsManagerArray and AwsSecretsManagerArrayOutput values. You can construct a concrete instance of `AwsSecretsManagerArrayInput` via:

AwsSecretsManagerArray{ AwsSecretsManagerArgs{...} }

type AwsSecretsManagerArrayOutput

type AwsSecretsManagerArrayOutput struct{ *pulumi.OutputState }

func (AwsSecretsManagerArrayOutput) ElementType

func (AwsSecretsManagerArrayOutput) Index

func (AwsSecretsManagerArrayOutput) ToAwsSecretsManagerArrayOutput

func (o AwsSecretsManagerArrayOutput) ToAwsSecretsManagerArrayOutput() AwsSecretsManagerArrayOutput

func (AwsSecretsManagerArrayOutput) ToAwsSecretsManagerArrayOutputWithContext

func (o AwsSecretsManagerArrayOutput) ToAwsSecretsManagerArrayOutputWithContext(ctx context.Context) AwsSecretsManagerArrayOutput

type AwsSecretsManagerInput

type AwsSecretsManagerInput interface {
	pulumi.Input

	ToAwsSecretsManagerOutput() AwsSecretsManagerOutput
	ToAwsSecretsManagerOutputWithContext(ctx context.Context) AwsSecretsManagerOutput
}

type AwsSecretsManagerMap

type AwsSecretsManagerMap map[string]AwsSecretsManagerInput

func (AwsSecretsManagerMap) ElementType

func (AwsSecretsManagerMap) ElementType() reflect.Type

func (AwsSecretsManagerMap) ToAwsSecretsManagerMapOutput

func (i AwsSecretsManagerMap) ToAwsSecretsManagerMapOutput() AwsSecretsManagerMapOutput

func (AwsSecretsManagerMap) ToAwsSecretsManagerMapOutputWithContext

func (i AwsSecretsManagerMap) ToAwsSecretsManagerMapOutputWithContext(ctx context.Context) AwsSecretsManagerMapOutput

type AwsSecretsManagerMapInput

type AwsSecretsManagerMapInput interface {
	pulumi.Input

	ToAwsSecretsManagerMapOutput() AwsSecretsManagerMapOutput
	ToAwsSecretsManagerMapOutputWithContext(context.Context) AwsSecretsManagerMapOutput
}

AwsSecretsManagerMapInput is an input type that accepts AwsSecretsManagerMap and AwsSecretsManagerMapOutput values. You can construct a concrete instance of `AwsSecretsManagerMapInput` via:

AwsSecretsManagerMap{ "key": AwsSecretsManagerArgs{...} }

type AwsSecretsManagerMapOutput

type AwsSecretsManagerMapOutput struct{ *pulumi.OutputState }

func (AwsSecretsManagerMapOutput) ElementType

func (AwsSecretsManagerMapOutput) ElementType() reflect.Type

func (AwsSecretsManagerMapOutput) MapIndex

func (AwsSecretsManagerMapOutput) ToAwsSecretsManagerMapOutput

func (o AwsSecretsManagerMapOutput) ToAwsSecretsManagerMapOutput() AwsSecretsManagerMapOutput

func (AwsSecretsManagerMapOutput) ToAwsSecretsManagerMapOutputWithContext

func (o AwsSecretsManagerMapOutput) ToAwsSecretsManagerMapOutputWithContext(ctx context.Context) AwsSecretsManagerMapOutput

type AwsSecretsManagerOutput

type AwsSecretsManagerOutput struct{ *pulumi.OutputState }

func (AwsSecretsManagerOutput) AssumeRoleArn

func (o AwsSecretsManagerOutput) AssumeRoleArn() pulumi.StringOutput

The ARN of the AWS role for Doppler to assume

func (AwsSecretsManagerOutput) ElementType

func (AwsSecretsManagerOutput) ElementType() reflect.Type

func (AwsSecretsManagerOutput) Name

The name of the integration

func (AwsSecretsManagerOutput) ToAwsSecretsManagerOutput

func (o AwsSecretsManagerOutput) ToAwsSecretsManagerOutput() AwsSecretsManagerOutput

func (AwsSecretsManagerOutput) ToAwsSecretsManagerOutputWithContext

func (o AwsSecretsManagerOutput) ToAwsSecretsManagerOutputWithContext(ctx context.Context) AwsSecretsManagerOutput

type AwsSecretsManagerState

type AwsSecretsManagerState struct {
	// The ARN of the AWS role for Doppler to assume
	AssumeRoleArn pulumi.StringPtrInput
	// The name of the integration
	Name pulumi.StringPtrInput
}

func (AwsSecretsManagerState) ElementType

func (AwsSecretsManagerState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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