File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -520,15 +520,25 @@ func getSLOCompliance(d *schema.ResourceData) *SLOCompliance {
520520 complianceType := complianceDict ["compliance_type" ].(string )
521521
522522 startFrom := ""
523- if complianceType == "Calendar" && complianceDict ["start_from" ] != nil {
524- startFrom = complianceDict ["start_from" ].(string )
523+ windowType := ""
524+ size := complianceDict ["size" ].(string )
525+
526+ if complianceType == "Calendar" {
527+ // field windowType needs to be specified instead of `size` for calendar compliance
528+ windowType = size
529+ size = ""
530+
531+ if complianceDict ["start_from" ] != nil {
532+ startFrom = complianceDict ["start_from" ].(string )
533+ }
525534 }
526535
527536 return & SLOCompliance {
528537 ComplianceType : complianceType ,
529538 Target : complianceDict ["target" ].(float64 ),
530539 Timezone : complianceDict ["timezone" ].(string ),
531- Size : complianceDict ["size" ].(string ),
540+ Size : size ,
541+ WindowType : windowType ,
532542 StartFrom : startFrom ,
533543 }
534544}
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ The following arguments are supported:
9999 - ` size ` - (Required) The size of the compliance period to use.
100100 - For ` Rolling ` compliance type it must be a multiple of days e.g. ` 1d ` , ` 2d ` .
101101 - For ` Calendar ` compliance type the allowed values are ` Week ` , ` Month ` , ` Quarter ` .
102- - ` start_from ` - (Optional) Start of the calendar window. For week, it would be the day of the week (for e.g Sunday,
102+ - ` start_from ` - Start of the calendar window. For ` Week ` its required and it would be the day of the week (for e.g. Sunday,
103103 Monday etc). For month, it will always be the first day of the month. For quarter, it would be the first month of
104104 the quarter (for e.g January, February etc.)
105105- ` indicator ` - (Required) The service level indicator on which SLO is to be defined. more details on the difference
You can’t perform that action at this time.
0 commit comments