Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_monitor_action_rule_suppression should have optional end_date_utc #17678

Closed
1 task done
philwelz opened this issue Jul 19, 2022 · 2 comments · Fixed by #17006
Closed
1 task done

azurerm_monitor_action_rule_suppression should have optional end_date_utc #17678

philwelz opened this issue Jul 19, 2022 · 2 comments · Fixed by #17006

Comments

@philwelz
Copy link
Contributor

philwelz commented Jul 19, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

If you create a azurerm_monitor_action_rule_suppression resource via Terraform, end_date_utc is required as per Terraform documentation.

If you create this rule via Portal, the End date is optional. Terraform should also support this value as optional.

IT would be also good to seperate the date from the time, like it is done with bicep.

New or Affected Resource(s)/Data Source(s)

azurerm_monitor_action_rule_suppression

Potential Terraform Configuration

resource "azurerm_monitor_action_rule_suppression" "example" {
  name                = "example"
  resource_group_name = azurerm_resource_group.rg.name
  description         = "Example"

  scope {
    type         = "ResourceGroup"
    resource_ids = [azurerm_resource_group.rg.id]
  }

  suppression {
    recurrence_type = "Weekly"

    schedule {
      start_date = "2022-03-03"
      start_time_utc = "02:00:00Z"
      end_time_utc = "04:00:00Z"
      recurrence_weekly = ["Tuesday"]
    }
  }
}

References

No response

@philwelz philwelz changed the title azurerm_monitor_action_rule_suppression should have optional end_date_utc azurerm_monitor_action_rule_suppression should have optional end_date_utc Jul 19, 2022
@teowa
Copy link
Contributor

teowa commented Aug 1, 2022

@philwelz This is caused by REST API version differences, this azurerm_monitor_action_rule_suppression is based on an old API version 2019-05-05-preview, which need required end_date. Action Rule in Azure Portal in based on a newer API version, maybe is 2021-08-08, which can have a optional end_date.
Besides, a newer version of Action Rule in TF based on newer API version is in PR review, you can try it in near future.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants