Class CloudFormationStack
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.serverlessrepository.CloudFormationStack
-
public class CloudFormationStack extends com.pulumi.resources.CustomResourceManages an Application CloudFormation Stack from the Serverless Application Repository. > **Warning:** CloudFormation masks `NoEcho` parameter values as `****` in API responses, which may set an expectation that they remain hidden. They do not — like any other argument, the configured value is persisted to state. To mask a specific parameter in plan and `terraform show` output, wrap it with Terraform's `sensitive()` function, for example `parameters = { password = sensitive(var.password) }`. ## Example Usage ### Basic Usage
## 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 ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.AwsFunctions; import com.pulumi.aws.inputs.GetPartitionArgs; import com.pulumi.aws.inputs.GetRegionArgs; import com.pulumi.aws.serverlessrepository.CloudFormationStack; import com.pulumi.aws.serverlessrepository.CloudFormationStackArgs; import java.util.ArrayList; import java.util.Arrays; 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) { final var current = AwsFunctions.getPartition(GetPartitionArgs.builder() .build()); final var currentGetRegion = AwsFunctions.getRegion(GetRegionArgs.builder() .build()); var postgres_rotator = new CloudFormationStack("postgres-rotator", CloudFormationStackArgs.builder() .name("postgres-rotator") .applicationId("arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser") .capabilities( "CAPABILITY_IAM", "CAPABILITY_RESOURCE_POLICY") .parameters(Map.ofEntries( Map.entry("functionName", "func-postgres-rotator"), Map.entry("endpoint", String.format("secretsmanager.%s.%s", currentGetRegion.region(),current.dnsSuffix())) )) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description CloudFormationStack(java.lang.String name)CloudFormationStack(java.lang.String name, CloudFormationStackArgs args)CloudFormationStack(java.lang.String name, CloudFormationStackArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>applicationId()com.pulumi.core.Output<java.util.List<java.lang.String>>capabilities()static CloudFormationStackget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, CloudFormationStackState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>outputs()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>parameters()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>semanticVersion()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()
-
-
-
Constructor Detail
-
CloudFormationStack
public CloudFormationStack(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
CloudFormationStack
public CloudFormationStack(java.lang.String name, CloudFormationStackArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
CloudFormationStack
public CloudFormationStack(java.lang.String name, CloudFormationStackArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
applicationId
public com.pulumi.core.Output<java.lang.String> applicationId()
- Returns:
- ARN of the application from the Serverless Application Repository.
-
capabilities
public com.pulumi.core.Output<java.util.List<java.lang.String>> capabilities()
- Returns:
- List of capabilities. Valid values are `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_RESOURCE_POLICY`, or `CAPABILITY_AUTO_EXPAND`. If the application contains IAM resources, IAM resources with custom names, resource-based policies, or nested applications, the corresponding capability must be specified. If omitted, the value applied by AWS is tracked in state.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Name of the stack to create. The resource deployed in AWS will be prefixed with `serverlessrepo-`
-
outputs
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> outputs()
- Returns:
- Map of outputs from the stack.
-
parameters
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> parameters()
- Returns:
- Map of Parameter structures that specify input parameters for the stack.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
semanticVersion
public com.pulumi.core.Output<java.lang.String> semanticVersion()
- Returns:
- Version of the application to deploy. If not supplied, deploys the latest version.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
get
public static CloudFormationStack get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable CloudFormationStackState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-