Skip to content

Commit

Permalink
Prevent setting idle_timeout_minutes if idle_scaling is false (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
whites11 authored Aug 7, 2024
1 parent 40ff40c commit 1e7da0c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/resource/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,13 @@ func (r *ServiceResource) ModifyPlan(ctx context.Context, req resource.ModifyPla
)
}

if !plan.IdleTimeoutMinutes.IsNull() && !plan.IdleScaling.ValueBool() {
resp.Diagnostics.AddError(
"Invalid Configuration",
"idle_timeout_minutes must be null if idle_scaling is disabled",
)
}

if !plan.Password.IsNull() && !plan.PasswordHash.IsNull() {
resp.Diagnostics.AddError(
"Invalid Configuration",
Expand Down

0 comments on commit 1e7da0c

Please sign in to comment.