suggestions for sharing addons across multiple copilot apps #3130
-
Hi, I'm looking for any suggestions anybody has on a good way to share addon templates between multiple copilot apps, while making it easy for those apps to adopt new versions of the template. To make the question more concrete, we've created our own RDS addon that uses regular (not serverless v1) Aurora and adds quite a bit of alerting and other goodies. Right now we are just copying that addon template to each copilot service that is using it, but it is already getting very difficult to propagate changes to that template across the different apps, especially given that realistically you'll have to make modifications to at least the parameter defaults to enable different instance sizes, etc. So just copying in a new version of the template isn't enough, you have to do a sort of manual merging process to copy it in while preserving the parameter changes specific to your service. I took a go at solving this by having the copilot addon be nothing but a CF substack resource (AWS::CloudFormation::Stack) pointing to a shared template in S3. But in the end I realized this won't work currently, because copilot parses the addons template looking for resource names in order to do its magic to find secrets, security groups, etc in the outputs. Since those resources are defined in the substack, copilot can no longer parse them out. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
One solution I've just arrived at is to separate all the tweakable parameters into a separate .yml file, so you have something like this:
So This definitely feels a bit clunky and will take some training but it is better than my baseline of manually merging CF templates to update. I'm still definitely interested in a better solution. |
Beta Was this translation helpful? Give feedback.
-
Hi @codekitchen! |
Beta Was this translation helpful? Give feedback.
Hi @codekitchen!
Does the
svc package
command help at all, for what you're trying to do?https://aws.github.io/copilot-cli/docs/commands/svc-package/