serverlessrepository

package
v6.25.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 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 CloudFormationStack

type CloudFormationStack struct {
	pulumi.CustomResourceState

	// The ARN of the application from the Serverless Application Repository.
	ApplicationId pulumi.StringOutput `pulumi:"applicationId"`
	// A list of capabilities. Valid values are `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_RESOURCE_POLICY`, or `CAPABILITY_AUTO_EXPAND`
	Capabilities pulumi.StringArrayOutput `pulumi:"capabilities"`
	// The name of the stack to create. The resource deployed in AWS will be prefixed with `serverlessrepo-`
	Name pulumi.StringOutput `pulumi:"name"`
	// A map of outputs from the stack.
	Outputs pulumi.StringMapOutput `pulumi:"outputs"`
	// A map of Parameter structures that specify input parameters for the stack.
	Parameters pulumi.StringMapOutput `pulumi:"parameters"`
	// The version of the application to deploy. If not supplied, deploys the latest version.
	SemanticVersion pulumi.StringOutput `pulumi:"semanticVersion"`
	// A list of tags to associate with this stack. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
	//
	// Deprecated: Please use `tags` instead.
	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
}

Deploys an Application CloudFormation Stack from the Serverless Application Repository.

## Example Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/serverlessrepository"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := aws.GetPartition(ctx, nil, nil)
		if err != nil {
			return err
		}
		currentGetRegion, err := aws.GetRegion(ctx, nil, nil)
		if err != nil {
			return err
		}
		_, err = serverlessrepository.NewCloudFormationStack(ctx, "postgres-rotator", &serverlessrepository.CloudFormationStackArgs{
			Name:          pulumi.String("postgres-rotator"),
			ApplicationId: pulumi.String("arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser"),
			Capabilities: pulumi.StringArray{
				pulumi.String("CAPABILITY_IAM"),
				pulumi.String("CAPABILITY_RESOURCE_POLICY"),
			},
			Parameters: pulumi.StringMap{
				"functionName": pulumi.String("func-postgres-rotator"),
				"endpoint":     pulumi.String(fmt.Sprintf("secretsmanager.%v.%v", currentGetRegion.Name, current.DnsSuffix)),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Using `pulumi import`, import Serverless Application Repository Stack using the CloudFormation Stack name (with or without the `serverlessrepo-` prefix) or the CloudFormation Stack ID. For example:

```sh

$ pulumi import aws:serverlessrepository/cloudFormationStack:CloudFormationStack example serverlessrepo-postgres-rotator

```

func GetCloudFormationStack

func GetCloudFormationStack(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *CloudFormationStackState, opts ...pulumi.ResourceOption) (*CloudFormationStack, error)

GetCloudFormationStack gets an existing CloudFormationStack 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 NewCloudFormationStack

func NewCloudFormationStack(ctx *pulumi.Context,
	name string, args *CloudFormationStackArgs, opts ...pulumi.ResourceOption) (*CloudFormationStack, error)

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

func (*CloudFormationStack) ElementType

func (*CloudFormationStack) ElementType() reflect.Type

func (*CloudFormationStack) ToCloudFormationStackOutput

func (i *CloudFormationStack) ToCloudFormationStackOutput() CloudFormationStackOutput

func (*CloudFormationStack) ToCloudFormationStackOutputWithContext

func (i *CloudFormationStack) ToCloudFormationStackOutputWithContext(ctx context.Context) CloudFormationStackOutput

type CloudFormationStackArgs

type CloudFormationStackArgs struct {
	// The ARN of the application from the Serverless Application Repository.
	ApplicationId pulumi.StringInput
	// A list of capabilities. Valid values are `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_RESOURCE_POLICY`, or `CAPABILITY_AUTO_EXPAND`
	Capabilities pulumi.StringArrayInput
	// The name of the stack to create. The resource deployed in AWS will be prefixed with `serverlessrepo-`
	Name pulumi.StringPtrInput
	// A map of Parameter structures that specify input parameters for the stack.
	Parameters pulumi.StringMapInput
	// The version of the application to deploy. If not supplied, deploys the latest version.
	SemanticVersion pulumi.StringPtrInput
	// A list of tags to associate with this stack. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a CloudFormationStack resource.

func (CloudFormationStackArgs) ElementType

func (CloudFormationStackArgs) ElementType() reflect.Type

type CloudFormationStackArray

type CloudFormationStackArray []CloudFormationStackInput

func (CloudFormationStackArray) ElementType

func (CloudFormationStackArray) ElementType() reflect.Type

func (CloudFormationStackArray) ToCloudFormationStackArrayOutput

func (i CloudFormationStackArray) ToCloudFormationStackArrayOutput() CloudFormationStackArrayOutput

func (CloudFormationStackArray) ToCloudFormationStackArrayOutputWithContext

func (i CloudFormationStackArray) ToCloudFormationStackArrayOutputWithContext(ctx context.Context) CloudFormationStackArrayOutput

type CloudFormationStackArrayInput

type CloudFormationStackArrayInput interface {
	pulumi.Input

	ToCloudFormationStackArrayOutput() CloudFormationStackArrayOutput
	ToCloudFormationStackArrayOutputWithContext(context.Context) CloudFormationStackArrayOutput
}

CloudFormationStackArrayInput is an input type that accepts CloudFormationStackArray and CloudFormationStackArrayOutput values. You can construct a concrete instance of `CloudFormationStackArrayInput` via:

CloudFormationStackArray{ CloudFormationStackArgs{...} }

type CloudFormationStackArrayOutput

type CloudFormationStackArrayOutput struct{ *pulumi.OutputState }

func (CloudFormationStackArrayOutput) ElementType

func (CloudFormationStackArrayOutput) Index

func (CloudFormationStackArrayOutput) ToCloudFormationStackArrayOutput

func (o CloudFormationStackArrayOutput) ToCloudFormationStackArrayOutput() CloudFormationStackArrayOutput

func (CloudFormationStackArrayOutput) ToCloudFormationStackArrayOutputWithContext

func (o CloudFormationStackArrayOutput) ToCloudFormationStackArrayOutputWithContext(ctx context.Context) CloudFormationStackArrayOutput

type CloudFormationStackInput

type CloudFormationStackInput interface {
	pulumi.Input

	ToCloudFormationStackOutput() CloudFormationStackOutput
	ToCloudFormationStackOutputWithContext(ctx context.Context) CloudFormationStackOutput
}

type CloudFormationStackMap

type CloudFormationStackMap map[string]CloudFormationStackInput

func (CloudFormationStackMap) ElementType

func (CloudFormationStackMap) ElementType() reflect.Type

func (CloudFormationStackMap) ToCloudFormationStackMapOutput

func (i CloudFormationStackMap) ToCloudFormationStackMapOutput() CloudFormationStackMapOutput

func (CloudFormationStackMap) ToCloudFormationStackMapOutputWithContext

func (i CloudFormationStackMap) ToCloudFormationStackMapOutputWithContext(ctx context.Context) CloudFormationStackMapOutput

type CloudFormationStackMapInput

type CloudFormationStackMapInput interface {
	pulumi.Input

	ToCloudFormationStackMapOutput() CloudFormationStackMapOutput
	ToCloudFormationStackMapOutputWithContext(context.Context) CloudFormationStackMapOutput
}

CloudFormationStackMapInput is an input type that accepts CloudFormationStackMap and CloudFormationStackMapOutput values. You can construct a concrete instance of `CloudFormationStackMapInput` via:

CloudFormationStackMap{ "key": CloudFormationStackArgs{...} }

type CloudFormationStackMapOutput

type CloudFormationStackMapOutput struct{ *pulumi.OutputState }

func (CloudFormationStackMapOutput) ElementType

func (CloudFormationStackMapOutput) MapIndex

func (CloudFormationStackMapOutput) ToCloudFormationStackMapOutput

func (o CloudFormationStackMapOutput) ToCloudFormationStackMapOutput() CloudFormationStackMapOutput

func (CloudFormationStackMapOutput) ToCloudFormationStackMapOutputWithContext

func (o CloudFormationStackMapOutput) ToCloudFormationStackMapOutputWithContext(ctx context.Context) CloudFormationStackMapOutput

type CloudFormationStackOutput

type CloudFormationStackOutput struct{ *pulumi.OutputState }

func (CloudFormationStackOutput) ApplicationId

func (o CloudFormationStackOutput) ApplicationId() pulumi.StringOutput

The ARN of the application from the Serverless Application Repository.

func (CloudFormationStackOutput) Capabilities

A list of capabilities. Valid values are `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_RESOURCE_POLICY`, or `CAPABILITY_AUTO_EXPAND`

func (CloudFormationStackOutput) ElementType

func (CloudFormationStackOutput) ElementType() reflect.Type

func (CloudFormationStackOutput) Name

The name of the stack to create. The resource deployed in AWS will be prefixed with `serverlessrepo-`

func (CloudFormationStackOutput) Outputs

A map of outputs from the stack.

func (CloudFormationStackOutput) Parameters

A map of Parameter structures that specify input parameters for the stack.

func (CloudFormationStackOutput) SemanticVersion

func (o CloudFormationStackOutput) SemanticVersion() pulumi.StringOutput

The version of the application to deploy. If not supplied, deploys the latest version.

func (CloudFormationStackOutput) Tags

A list of tags to associate with this stack. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.

func (CloudFormationStackOutput) TagsAll deprecated

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

Deprecated: Please use `tags` instead.

func (CloudFormationStackOutput) ToCloudFormationStackOutput

func (o CloudFormationStackOutput) ToCloudFormationStackOutput() CloudFormationStackOutput

func (CloudFormationStackOutput) ToCloudFormationStackOutputWithContext

func (o CloudFormationStackOutput) ToCloudFormationStackOutputWithContext(ctx context.Context) CloudFormationStackOutput

type CloudFormationStackState

type CloudFormationStackState struct {
	// The ARN of the application from the Serverless Application Repository.
	ApplicationId pulumi.StringPtrInput
	// A list of capabilities. Valid values are `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_RESOURCE_POLICY`, or `CAPABILITY_AUTO_EXPAND`
	Capabilities pulumi.StringArrayInput
	// The name of the stack to create. The resource deployed in AWS will be prefixed with `serverlessrepo-`
	Name pulumi.StringPtrInput
	// A map of outputs from the stack.
	Outputs pulumi.StringMapInput
	// A map of Parameter structures that specify input parameters for the stack.
	Parameters pulumi.StringMapInput
	// The version of the application to deploy. If not supplied, deploys the latest version.
	SemanticVersion pulumi.StringPtrInput
	// A list of tags to associate with this stack. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapInput
	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
	//
	// Deprecated: Please use `tags` instead.
	TagsAll pulumi.StringMapInput
}

func (CloudFormationStackState) ElementType

func (CloudFormationStackState) ElementType() reflect.Type

type GetApplicationArgs

type GetApplicationArgs struct {
	// ARN of the application.
	ApplicationId string `pulumi:"applicationId"`
	// Requested version of the application. By default, retrieves the latest version.
	SemanticVersion *string `pulumi:"semanticVersion"`
}

A collection of arguments for invoking getApplication.

type GetApplicationOutputArgs

type GetApplicationOutputArgs struct {
	// ARN of the application.
	ApplicationId pulumi.StringInput `pulumi:"applicationId"`
	// Requested version of the application. By default, retrieves the latest version.
	SemanticVersion pulumi.StringPtrInput `pulumi:"semanticVersion"`
}

A collection of arguments for invoking getApplication.

func (GetApplicationOutputArgs) ElementType

func (GetApplicationOutputArgs) ElementType() reflect.Type

type GetApplicationResult

type GetApplicationResult struct {
	// ARN of the application.
	ApplicationId string `pulumi:"applicationId"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// Name of the application.
	Name string `pulumi:"name"`
	// A list of capabilities describing the permissions needed to deploy the application.
	RequiredCapabilities []string `pulumi:"requiredCapabilities"`
	SemanticVersion      string   `pulumi:"semanticVersion"`
	// URL pointing to the source code of the application version.
	SourceCodeUrl string `pulumi:"sourceCodeUrl"`
	// URL pointing to the Cloud Formation template for the application version.
	TemplateUrl string `pulumi:"templateUrl"`
}

A collection of values returned by getApplication.

func GetApplication

func GetApplication(ctx *pulumi.Context, args *GetApplicationArgs, opts ...pulumi.InvokeOption) (*GetApplicationResult, error)

Use this data source to get information about an AWS Serverless Application Repository application. For example, this can be used to determine the required `capabilities` for an application.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/serverlessrepository"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := serverlessrepository.GetApplication(ctx, &serverlessrepository.GetApplicationArgs{
			ApplicationId: "arn:aws:serverlessrepo:us-east-1:123456789012:applications/ExampleApplication",
		}, nil)
		if err != nil {
			return err
		}
		_, err = serverlessrepository.NewCloudFormationStack(ctx, "example", &serverlessrepository.CloudFormationStackArgs{
			Name:            pulumi.String("Example"),
			ApplicationId:   *pulumi.String(example.ApplicationId),
			SemanticVersion: *pulumi.String(example.SemanticVersion),
			Capabilities:    interface{}(example.RequiredCapabilities),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetApplicationResultOutput

type GetApplicationResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getApplication.

func (GetApplicationResultOutput) ApplicationId

ARN of the application.

func (GetApplicationResultOutput) ElementType

func (GetApplicationResultOutput) ElementType() reflect.Type

func (GetApplicationResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetApplicationResultOutput) Name

Name of the application.

func (GetApplicationResultOutput) RequiredCapabilities

func (o GetApplicationResultOutput) RequiredCapabilities() pulumi.StringArrayOutput

A list of capabilities describing the permissions needed to deploy the application.

func (GetApplicationResultOutput) SemanticVersion

func (o GetApplicationResultOutput) SemanticVersion() pulumi.StringOutput

func (GetApplicationResultOutput) SourceCodeUrl

URL pointing to the source code of the application version.

func (GetApplicationResultOutput) TemplateUrl

URL pointing to the Cloud Formation template for the application version.

func (GetApplicationResultOutput) ToGetApplicationResultOutput

func (o GetApplicationResultOutput) ToGetApplicationResultOutput() GetApplicationResultOutput

func (GetApplicationResultOutput) ToGetApplicationResultOutputWithContext

func (o GetApplicationResultOutput) ToGetApplicationResultOutputWithContext(ctx context.Context) GetApplicationResultOutput

Jump to

Keyboard shortcuts

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