Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Allow specification of parameters that should apply to all (or multiple) environments in AWS SAM CLI configuration file (samconfig.toml) #5492

Open
rhbecker opened this issue Jul 12, 2023 · 2 comments
Labels
area/sam-config contributors/welcome Contributors are welcome to work on this type/feature Feature request

Comments

@rhbecker
Copy link

rhbecker commented Jul 12, 2023

Describe your idea/feature/enhancement

Allow specification of parameters that should apply to all (or multiple) environments in AWS SAM CLI configuration file (samconfig.toml).

This would be similar to the global keyword introduced in response to issue #2382, which allowed specifying parameters that should apply to all sam commands.

Proposal

Perhaps the simplest approach would be to introduce another key-character or keyword to use in the position where an environment name is specified - one that indicates the stanza should apply to all environments. I personally like *, but I it might also make sense to reuse the same global keyword.

Examples ...

[*.deploy.parameters]
confirm_changeset = true
region = "us-west-2"
s3_bucket = "some-bucket-name"
[global.deploy.parameters]
confirm_changeset = true
region = "us-west-2"
s3_bucket = "some-bucket-name"

A more complex, but also more powerful approach could be to allow the use of a regular expression or a glob expression, such that one could specify some, but not necessarily all environments to which a stanza should apply.

Examples ...

[^dev\d+$.deploy.parameters]
confirm_changeset = true
region = "us-west-2"
s3_bucket = "some-bucket-name"
[dev*.deploy.parameters]
confirm_changeset = true
region = "us-west-2"
s3_bucket = "some-bucket-name"

Additional Details

In the last comment on issue #2382, @dunika seemed to be asking for this feature, and his comment received several 👍s, but there are otherwise no responses.

@rhbecker rhbecker added stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. type/feature Feature request labels Jul 12, 2023
@hawflau
Copy link
Contributor

hawflau commented Jul 12, 2023

@rhbecker thanks for suggesting the feature request. It seems a useful feature to me and doesn't seem like a huge change. I'll raise that to team and see how we will prioritize it.

Meanwhile, please feel free to raise a PR if you'd like to contribute. We are happy to review it. Thanks!

@hawflau hawflau added contributors/welcome Contributors are welcome to work on this area/sam-config and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Jul 12, 2023
@rhbecker
Copy link
Author

I just found a discussion where this same idea was previously floated - now adding cross-references to each.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sam-config contributors/welcome Contributors are welcome to work on this type/feature Feature request
Projects
None yet
Development

No branches or pull requests

2 participants