AWS CloudFormation Separate Resources in Files

0

I want to use AWS CloudFormation and to separate my stack resources into different files without using nested stacks, How can i achieve this so as to make my template neat and structure as it could have over 50 - 100 resources.

Example in YAML [MainTemplete.yaml]

  1. Resource1.yaml
  2. Resource2.yaml
  3. Resource3.yaml
  4. Resource4.yaml
  5. Resource5.yaml

if posible Resource5.yaml to include

  1. Sub1Resource5.yaml
  2. Sub2Resource5.yaml
  3. Sub3Resource5.yaml

and also able to share parameters and resources. Thank you.

Nafiu
已提问 9 个月前196 查看次数
1 回答
1
已接受的回答

I think the closest thing out-of-box is AWS::Include transform. However it won't allow you to do multiple levels of includes and it isn't a work-a-round for single template size limit as includes are processed before template is deployed. Make sure you check Remarks -section at below URL

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html

If you want more professional software development features with Cloudformation, CDK might be an option?

profile picture
专家
Kallu
已回答 9 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则