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

Function Event Schedule - Can't use conditional for "Enabled" property #1271

Closed
muzehyun opened this issue Nov 28, 2019 · 1 comment
Closed
Labels
area/intrinsics Ref, If, Sub, GetAtt, ...

Comments

@muzehyun
Copy link

Description:
I have created Schedule event for a function.
And I wanted to enable it conditionally
Whatever conditional I have used, it's always enabled.
(I already verified with inverted true/false - conditional might wrong - still always enabled)
I have confirmed through cloudwatch log too.
If I use Enabled: false directly, it works well.

Conditions:
  IsDev:
    Fn::Equals:
      - Ref: Stage
      - dev

SomeFunction:
  Type: AWS::Serverless::Function
  Properties:
    ...
    Events:
      warming:
        Type: Schedule
        Properties:
          Enabled:
            Fn::If:
              - IsDev
              - false
              - true
          Schedule: "cron(* * * * ? *)"

Observed result:
Screen Shot 2019-11-28 at 12 40 26 AM

Expected result:
Properly "Disabled" based on conditional.

@sriram-mv sriram-mv added the stage/bug-repro The issue/bug needs to be reproduced label Feb 22, 2021
@sriram-mv sriram-mv added the area/intrinsics Ref, If, Sub, GetAtt, ... label Apr 12, 2021
@elbayaaa elbayaaa added stage/pm-review Waiting for review by our Product Manager, please don't work on this yet and removed stage/pm-review Waiting for review by our Product Manager, please don't work on this yet labels May 5, 2021
@jfuss
Copy link
Contributor

jfuss commented Aug 5, 2021

This is a duplicate of #1329

Closing this one in favor of that since #1329 has a bunch of comments.

@jfuss jfuss closed this as completed Aug 5, 2021
@jfuss jfuss added type/duplicate and removed type/bug stage/bug-repro The issue/bug needs to be reproduced labels Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/intrinsics Ref, If, Sub, GetAtt, ...
Projects
None yet
Development

No branches or pull requests

5 participants