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

Deployment error related with diagnostic settings error #23

Open
srihamat opened this issue Aug 30, 2023 · 0 comments
Open

Deployment error related with diagnostic settings error #23

srihamat opened this issue Aug 30, 2023 · 0 comments

Comments

@srihamat
Copy link

srihamat commented Aug 30, 2023

This issue is for a: (mark with an x)

- [ ] bug report 
- [ ] feature request
- [ ] documentation issue or request
- [ x ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  1. Get latest code
  2. Deploy by terraform

Any log messages given by the failure

module.bastion_host.azurerm_bastion_host.bastion_host: Creation complete after 9m52s [id=/subscriptions/xxx/resourceGroups/magic8ballRG/providers/Microsoft.Network/bastionHosts/magic8ballBastionHost]
module.bastion_host.azurerm_monitor_diagnostic_setting.settings: Creating...
╷
│ Error: creating Monitor Diagnostics Setting "DiagnosticsSettings" for Resource "/subscriptions/xxx/resourceGroups/magic8ballRG/providers/Microsoft.Network/bastionHosts/magic8ballBastionHost": diagnosticsettings.DiagnosticSettingsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Diagnostic settings does not support retention for new diagnostic settings."
│
│   with module.bastion_host.azurerm_monitor_diagnostic_setting.settings,
│   on modules\bastion_host\main.tf line 35, in resource "azurerm_monitor_diagnostic_setting" "settings":
│   35: resource "azurerm_monitor_diagnostic_setting" "settings" {

Expected/desired behavior

No error

OS and Version?

Windows 10

Versions

Latest - 30-Aug-2023

Mention any other details that might be useful

By refer to https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/migrate-to-azure-storage-lifecycle-policy
I realized there is changed in diagnostic setting storage that going to be deprecation.
Workaround is to either remove setting about retention days or set log retention in the log analytics workspace.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant