Skip to content

Commit

Permalink
Merge pull request #7480 from SebRosander/issue-3328
Browse files Browse the repository at this point in the history
`azurerm_monitor_autoscale_settings` support for time_aggregation = "Last"
  • Loading branch information
tombuildsstuff committed Jun 25, 2020
2 parents d7f8b98 + cd2097b commit 83832c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Expand Up @@ -151,6 +151,7 @@ func resourceArmMonitorAutoScaleSetting() *schema.Resource {
string(insights.TimeAggregationTypeMaximum),
string(insights.TimeAggregationTypeMinimum),
string(insights.TimeAggregationTypeTotal),
string(insights.TimeAggregationTypeLast),
}, true),
DiffSuppressFunc: suppress.CaseDifference,
},
Expand Down
Expand Up @@ -27,6 +27,7 @@ func TestAccAzureRMMonitorAutoScaleSetting_basic(t *testing.T) {
resource.TestCheckResourceAttr(data.ResourceName, "profile.#", "1"),
resource.TestCheckResourceAttr(data.ResourceName, "profile.0.name", "metricRules"),
resource.TestCheckResourceAttr(data.ResourceName, "profile.0.rule.#", "1"),
resource.TestCheckResourceAttr(data.ResourceName, "profile.0.rule.0.metric_trigger.0.time_aggregation", "Last"),
resource.TestCheckResourceAttr(data.ResourceName, "notification.#", "0"),
resource.TestCheckNoResourceAttr(data.ResourceName, "tags.$type"),
),
Expand Down Expand Up @@ -363,7 +364,7 @@ resource "azurerm_monitor_autoscale_setting" "test" {
time_grain = "PT1M"
statistic = "Average"
time_window = "PT5M"
time_aggregation = "Average"
time_aggregation = "Last"
operator = "GreaterThan"
threshold = 75
}
Expand Down

0 comments on commit 83832c6

Please sign in to comment.