Skip to content

Conditional DeploymentPreference not supported #1342

@hgl

Description

@hgl

Description:

I want to disable DeploymentPreference for staging and only enable for prod, it seems it's not supported.

Steps to reproduce the issue:

Conditions:
  IsProd: !Equals [ !Ref Stage, prod ]
Function:
  Type: AWS::Serverless::Function
  Properties:
    DeploymentPreference:
      Enabled: !If [ IsProd, true, false ]
      Type: Canary10Percent10Minutes

Observed result:

Failed with

Resource with id [Function] is invalid. 'Enabled' must be a boolean value

Expected result:

It should deploy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions