Skip to content

None of the [default.deploy.parameters] properties are read when there is [dev.deploy.parameters] #9048

Description

@mustafizEnosis

I am assuming that when I have environment specific parameters, the parameters that have same values for all the environments (dev, staging, prod), can be placed under [default.deploy.parameters]. Am I correct?

For example, here are the common parameters across all environments.

[default.deploy.parameters]
capabilities = "CAPABILITY_IAM"
confirm_changeset = true
fail_on_empty_changeset = false
image_repositories = []

Here are the dev and prod environments.

[dev.deploy.parameters]
stack_name = "cfn-lambda-dev-{{ cookiecutter.project_name }}"
s3_bucket = "sample-bucket"
s3_prefix = "lambda/cfn-lambda-dev-{{ cookiecutter.project_name }}"
disable_rollback = true
parameter_overrides = "Env=\"dev\""

[prod.deploy.parameters]
stack_name = "cfn-lambda-prod-{{ cookiecutter.project_name }}"
s3_bucket = "sample-bucket"
s3_prefix = "lambda/cfn-lambda-prod-{{ cookiecutter.project_name }}"
parameter_overrides = "Env=\"prod\""

Utilize the below commands for deployment.

sam deploy \
      --config-env dev \
      --no-execute-changeset
sam deploy \
      --config-env prod \
      --no-confirm-changeset

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions