cfn-language-discussion icon indicating copy to clipboard operation
cfn-language-discussion copied to clipboard

List<AWS::CloudFormation::Stack::Name>

Open fernandohonig opened this issue 4 years ago • 1 comments

1. Add ListAWS::CloudFormation::Stack::Name as AWS-specific parameter types

2. Scope of request

AWS-specific parameter types are helpful in catching invalid values at the start of creating or updating a stack. Sometimes you can build nested-stacks and reference the parent stack to get Outputs and use them as values in child ones. Sometimes, you want to create multiple child stacks depending on the parent stack.

Currently, you can't create a list of Stacks in the Parameters section in order to get the stack name that could provide those needed outputs.

By adding this feature, it could also help AWS Service Catalog as you can provision multiple Applications Products referencing the same Network or Database parent provisioned product.

  • A Parent VPC Stack with VPCId as Output (VPC-Product)
  • S3 Endpoint Stack with the ParentVPC Stack Name as Parameter (Endpoint-Product)
  • S3 Endpoint Stack with !ImportValue of ${VPCStack}-VPCId

Samples:

` AWSTemplateFormatVersion: '2010-09-09' Description: "VPC Endpoints Sub-Stack"

Parameters: NetworkStack: Description: 'Stack name of parent VPC stack' Type: ListAWS::CloudFormation::Stack::Name

Resources: S3VPCEndpoint: Type: AWS::EC2::VPCEndpoint DeletionPolicy: Delete Properties: PolicyDocument: Version: '2012-10-17' Statement: - Action: '' Effect: Allow Resource: '' Principal: '*' ServiceName: !Join ['', [com.amazonaws., !Ref 'AWS::Region', .s3]] VpcId: 'Fn::ImportValue': !Sub '${NetworkStack}-VPCId' `

3. Expected behavior

In Create, it should list the stacks available in a particular region

In Update, it should check the stack referenced as Parameter exists otherwise, make it blank and request a new value to be set.

4. Suggest specific test cases

5. Helpful Links to speed up research and evaluation

It would be great if it worked like this similar procedure: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-specific-parameter-types

6. Category (required) - Will help with tagging and be easier to find by other users to +1

Management

fernandohonig avatar Nov 26 '20 09:11 fernandohonig

@fernandohonig Thank you very much for your feedback! Since this repository is focused on resource coverage, I'm transferring this issue over to a new GitHub repository dedicated to CloudFormation template language issues.

lejiati avatar May 10 '22 02:05 lejiati