feat: Default to not changing autoscaling schedule values at the scheduled time #3322
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently when you don't set a value of
desired_capacity
,min_size
ormax_size
it replaces them with0
which end's up being an invalid parameter combination.For example
Config block
Payload result
The docs for the
aws_autoscaling_schedule
options desired_capacity, max_size and min_size explainSet to -1 if you don't want to change the ... at the scheduled time. Defaults to 0.
When a value is excluded from the Terraform config it's values shouldn't be overriden and updated to
0
it should leave them as is.Motivation and Context
Invalid parameters going through and potentially scaling some configurations to
0
.Breaking Changes
Yes, it just overrides the defaults.
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectsI haven't uploaded and example, it is pretty straightforward. I can if it is required but this is just a quick change.
pre-commit run -a
on my pull request