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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南