Open
Description
Describe your idea/feature/enhancement
I would like to be able to specify multiple env
profiles in my samconfig.toml
, and share common settings via the default
profile.
As an example of what I would like to do:
version = 0.1
[default]
[default.deploy]
[default.deploy.parameters]
s3_bucket = <bucket>
s3_prefix = <prefix>
region = "us-east-1"
confirm_changeset = false
capabilities = "CAPABILITY_NAMED_IAM"
[env1]
[env1.deploy]
[env1.deploy.parameters]
stack_name = "Environment 1"
parameter_overrides = "Environment=\"Environment1\""
[env2]
[env2.deploy]
[env2.deploy.parameters]
stack_name = "Environment 2"
parameter_overrides = "Environment=\"Environment2\""
Currently, the selected profile needs to have all of the parameters provided, which will lead to extensive duplication with a large number of profiles.
Proposal
One possibility would be to process the config file twice. The first pass would load the defaults, with the second pass augmenting & overriding these defaults. The command line overrides would then follow as normal.