Closed adamchainz closed 3 weeks ago
Agreed. This would be a good business logic addition to compare values. I'll label this as an enhancement.
Started with rule E3016 to check the basic configuration of the UpdatePolicy (attributes, values are of the correct type), etc.
Moving down the chain to this one next.
I have an issue with UpdatePolicy validation. I am using a different update policy for spot instances (replacingupdate) and regular instances (rolling update)
So something like:
UpdatePolicy:
!If
- spotInstances
- AutoScalingReplacingUpdate:
WillReplace: true
- AutoScalingRollingUpdate:
MinInstancesInService: !Ref DedicatedIngestNodeCount
MinSuccessfulInstancesPercent: 100
MaxBatchSize: 1
PauseTime: PT15M
WaitOnResourceSignals: true
SuspendProcesses:
- HealthCheck
- ReplaceUnhealthy
- AZRebalance
- AlarmNotification
- ScheduledActions
But this gives the following linting error:
E3016 UpdatePolicy doesn't support type Fn::If
This code actually works in CFN, so can the linting be fixed for this?
Thanks!
Sorry @kalpik I lost track of this. I have created pull request #468 totally rewritten to handle conditions on each level. Used your example for adding to tests. Thanks for reporting this.
I am getting error E3016 UpdatePolicy doesn't support type AutoScalingRollingUpdate from this AWS example: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-autoscaling.html#scenario-as-updatepolicy
Closing this issue as it is covered in v1. Any improvements we can do we will do as requested.
cfn-lint version: (
cfn-lint --version
) 0.7.2Description of issue.
Using a template like:
will fail at deployment time with an error from CloudFormation like:
It would be nice to have protection against this. I guess there are other constraints, some are in the docs. I submitted a docs PR for this one.