(aws_cdk.aws_applicationautoscaling): CfnScalableTarget.ScheduledActionProperty does not synthesize vaild cloudformation when using a CfnCondition #19246
Labels
@aws-cdk/aws-applicationautoscaling
Related to AWS Application Auto Scaling
bug
This issue is a bug.
duplicate
This issue is a duplicate.
needs-triage
This issue or PR still needs to be triaged.
What is the problem?
When using a
CfnCondition
to conditionally setscheduled_actions
within aCfnScalableTarget
, the Scheduled Action properties are not synthesized to valid CloudFormation. Things work as expected without using aCfnCondition
.Reproduction Steps
Conditionally enable Scheduled Actions on a
ScalableTarget
utilizing aCfnCondition
based on the value of aCfnParameter
Synthesize with
cdk synth
What did you expect to happen?
Expected valid Cloudformation as a result of
cdk synth
as such (how we currently handle this in raw yaml CloudFormation):What actually happened?
Invalid properties as a result of
cdk synth
:Which results in a failed
cdk deploy
due toEncountered unsupported property schedule
CDK CLI Version
2.15.0
Framework Version
2.15.0
Node.js Version
16.13.1
OS
macOS Big Sur v11.6
Language
Python
Language Version
Python (3.9.6)
Other information
I am currently in the process of migrating our maintained CloudFormation yaml templates to CDK. In the spirit of creating as minimal difference between our deployed stack, I am trying to recreate our yaml via
cdk synth
as closely as possible. We currently use a Condition based on the value of a parameter to enable Scheduled Actions on a ScalableTarget. The idea here being that we have the ability to turn scaling on/off without a code change.example of the raw yaml we write for our currently deployed CF stacks:
The text was updated successfully, but these errors were encountered: