azurerm_cost_management_scheduled_action

Manages an Azure Cost Management Scheduled Action.

Example Usage

resource "azurerm_cost_management_scheduled_action" "example" {
  name         = "examplescheduledaction"
  display_name = "Report Last 6 Months"

  view_id = "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/views/ms:CostByService"

  email_address_sender = "platformteam@test.com"
  email_subject        = "Cost Management Report"
  email_addresses      = ["example@example.com"]
  message              = "Hi all, take a look at last 6 months spending!"

  frequency  = "Daily"
  start_date = "2023-01-02T00:00:00Z"
  end_date   = "2023-02-02T00:00:00Z"
}

Arguments Reference

The following arguments are supported:


Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Azure Cost Management Scheduled Actions can be imported using the resource id, e.g.

terraform import azurerm_cost_management_scheduled_action.example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/scheduledaction1