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 Risposta
1
Risposta accettata

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
ESPERTO
Kallu
con risposta 9 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande