copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Share an SSM parameter between multiple copilot applications

Open aaroncarlucci opened this issue 4 years ago • 2 comments

I have some parameters stored in SSM which I would like to share between multiple copilot applications. Currently the generated CloudFormation stack restricts the access to secrets using the copilot-application and copilot-environment tags. Is it possible to configure a secret to be accessible across multiple applications or environments? Otherwise I would end up repeating SSM parameters defining credentials for certain third-party services and creating a lot of parameter management synchronization in SSM.

aaroncarlucci avatar Mar 07 '21 10:03 aaroncarlucci

Perhaps making the tag condition in the CloudFormation template to access SSM parameters optional would be worth considering. This issue also prevented me from dynamically spinning up new applications and environments in CI/CD pipelines in #2005

aaroncarlucci avatar Mar 07 '21 11:03 aaroncarlucci

Has there been any updates to this?

My application has a prod and staging environment, both of them need to access the same SSM store. Being able to access the same secrets is crucial.

Quick Fix:

The quick solution is to create another secret with a different name, e.g, /secrets/prod, with copilot-environment: prod /secrets/staging with copilot-environment: stage

but this quick fix is not ideal once my application scales to include more applications / environments requiring the same secrets. (which may also change and require more manual updates)

Better fix:

being able to tag shared resources with string delimited tags, e.g,

copilot-environment: prod:stage:feature copilot-application: v1_application:v2_application

yungalyx avatar Feb 26 '25 20:02 yungalyx