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. Tags pulumi.StringMapOutput `pulumi:"tags"` }
Deploys an Application CloudFormation Stack from the Serverless Application Repository.
## Example Usage
```go package main
import (
"fmt" "github.com/pulumi/pulumi-aws/sdk/v3/go/aws" "github.com/pulumi/pulumi-aws/sdk/v3/go/aws/serverlessrepository" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { currentPartition, err := aws.GetPartition(ctx, nil, nil) if err != nil { return err } currentRegion, err := aws.GetRegion(ctx, nil, nil) if err != nil { return err } _, err = serverlessrepository.NewCloudFormationStack(ctx, "postgres_rotator", &serverlessrepository.CloudFormationStackArgs{ 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{ "endpoint": pulumi.String(fmt.Sprintf("%v%v%v%v", "secretsmanager.", currentRegion.Name, ".", currentPartition.DnsSuffix)), "functionName": pulumi.String("func-postgres-rotator"), }, }) if err != nil { return err } return nil }) }
```
## Import
Serverless Application Repository Stack can be imported using the CloudFormation Stack name (with or without the `serverlessrepo-` prefix) or the CloudFormation Stack ID, e.g.
```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. Tags pulumi.StringMapInput }
The set of arguments for constructing a CloudFormationStack resource.
func (CloudFormationStackArgs) ElementType ¶
func (CloudFormationStackArgs) ElementType() reflect.Type
type CloudFormationStackInput ¶
type CloudFormationStackInput interface { pulumi.Input ToCloudFormationStackOutput() CloudFormationStackOutput ToCloudFormationStackOutputWithContext(ctx context.Context) CloudFormationStackOutput }
type CloudFormationStackOutput ¶
type CloudFormationStackOutput struct {
*pulumi.OutputState
}
func (CloudFormationStackOutput) ElementType ¶
func (CloudFormationStackOutput) ElementType() reflect.Type
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. Tags pulumi.StringMapInput }
func (CloudFormationStackState) ElementType ¶
func (CloudFormationStackState) ElementType() reflect.Type
type GetApplicationArgs ¶
type GetApplicationArgs struct { // The ARN of the application. ApplicationId string `pulumi:"applicationId"` // The requested version of the application. By default, retrieves the latest version. SemanticVersion *string `pulumi:"semanticVersion"` }
A collection of arguments for invoking getApplication.
type GetApplicationResult ¶
type GetApplicationResult struct { // The ARN of the application. ApplicationId string `pulumi:"applicationId"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The 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"` // A URL pointing to the source code of the application version. SourceCodeUrl string `pulumi:"sourceCodeUrl"` // A 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/v3/go/aws/serverlessrepository" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { exampleApplication, 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, "exampleCloudFormationStack", &serverlessrepository.CloudFormationStackArgs{ ApplicationId: pulumi.String(exampleApplication.ApplicationId), SemanticVersion: pulumi.String(exampleApplication.SemanticVersion), Capabilities: toPulumiStringArray(exampleApplication.RequiredCapabilities), }) if err != nil { return err } return nil }) }
func toPulumiStringArray(arr []string) pulumi.StringArray { var pulumiArr pulumi.StringArray for _, v := range arr { pulumiArr = append(pulumiArr, pulumi.String(v)) } return pulumiArr }
```