aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.11k stars 54 forks source link

AWS::CloudFormation::Stack - Region #562

Open jk2l opened 4 years ago

jk2l commented 4 years ago

2. Scope of request

Currently certain resources (e.g. ACM for CloudFront) require it is being deploy from within us-east-1. Or if i want a multi region codepipeline, each region also need bucket and kms...etc

I wonder can the multi region deployment simplify into a single nested stack and using it to refrence via the output of each nested stack.

e.g. main root stack - ap-southeast-1 |- child stack - us-east-1 |- child stack - ap-southeast-1 use us-east-1's stack output as parameter

3. Expected behavior

In Create: it create a stack in target region In Update: it update eh stack in target region In Delete: it delete the stack in target region Can mix multi region in one stack

4. Suggest specific test cases

Resources:
  CognitoACM:
    Type: AWS::CloudFormation::Stack
    Properties:
      Region: us-east-1
      Parameters:
        FDQN: auth.my-example.com
      TemplateURL:  !Sub 'https://s3-${AWS::Region}.amazonaws.com/my-bucket/acm-cert.yaml'

  Cognito:
    Type: AWS::CloudFormation::Stack
    Properties:
      Region: ap-southeast-2
      Parameters:
        FQDN: auth.my-example.com
        AcmArn: !GetAtt 'ACMCert.Outputs.AcmArn'
      TemplateURL:  !Sub 'https://s3-${AWS::Region}.amazonaws.com/my-bucket/cognito.yaml'

  MyAPIAcm:
    Type: AWS::CloudFormation::Stack
    Properties:
      Region: ap-southeast-2
      Parameters:
        FDQN: api.my-example.com
      TemplateURL:  !Sub 'https://s3-${AWS::Region}.amazonaws.com/my-bucket/acm-cert.yaml'

  ApiGateway:
    Type: AWS::CloudFormation::Stack
    Properties:
      Region: ap-southeast-2
      Parameters:
        FQDN: api.my-example.com
        AcmArn: !GetAtt 'MyAPIAcm.Outputs.AcmArn'
        CognitoId: !GetAtt 'Cognito.Outputs.CognitoId'
      TemplateURL:  !Sub 'https://s3-${AWS::Region}.amazonaws.com/my-bucket/apigateway.yaml'

5. Helpful Links to speed up research and evaluation

https://github.com/aws-cloudformation/aws-cloudformation-coverage-roadmap/issues/546 https://github.com/aws-cloudformation/aws-cloudformation-coverage-roadmap/issues/523 https://github.com/aws/aws-cdk/pull/8552

jk2l commented 4 years ago

Example like aws-cdk have to resolve to use custom resource to bridge the incompatibility is always an issue in CloudFormation when a multi region support required. having native support via solution like nested stack should be able to close this bridge and make multi region support deployment much easier

max-allan-surevine commented 4 years ago

See my answer to #630 . This is probably now possible with stacksets as cloudformation objects.

jk2l commented 3 years ago

Come accros this issue again, but this time it is AWS::WAFv2::IPSet. Basically I will need the resource deploy in us-east-1 (yes i can do it via StackSet object) but the problem will be to get it back from StackSet's output back into the original region

theswerd commented 3 years ago

This would be a very helpful feature for me