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.

1 Antwort
1
Akzeptierte Antwort

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
EXPERTE
Kallu
beantwortet vor 9 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen