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

The feature flag <Microsoft.Automanage/AutomanageAlertsEnabled> must enabled on subscription: <subscription>, in order to use properties: <Alerts/AutomanageStatusChanges/Enable> with azurerm_automanage_configuration #22799

Closed
1 task done
BrianRichardson opened this issue Aug 3, 2023 · 6 comments

Comments

@BrianRichardson
Copy link

BrianRichardson commented Aug 3, 2023

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 and review the contribution guide to help.

Terraform Version

1.5.4

AzureRM Provider Version

3.67.0

Affected Resource(s)/Data Source(s)

azurerm_automanage_configuration

Terraform Configuration Files

resource "azurerm_automanage_configuration" "example" {
  name                        = "Example"
  automation_account_enabled  = true
  boot_diagnostics_enabled    = true
  defender_for_cloud_enabled  = true
  guest_configuration_enabled = true
  log_analytics_enabled       = true
  status_change_alert_enabled = true
  antimalware {
    real_time_protection_enabled   = true
    scheduled_scan_enabled         = true
    scheduled_scan_type            = "Full"
    scheduled_scan_day             = 1
    scheduled_scan_time_in_minutes = 660
  }
  location            = "WestEurope"
  resource_group_name = "Example"
}

Debug Output/Panic Output

Error: creating Automanage Configuration: (Configuration Profile Name "Example" / Resource Group "Example"): automanage.ConfigurationProfilesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidConfigurationValue" Message="The feature flag <Microsoft.Automanage/AutomanageAlertsEnabled> must enabled on subscription: <subscription>, in order to use properties: <Alerts/AutomanageStatusChanges/Enable>"
│ 
│   with azurerm_automanage_configuration.deploy,
│   on automanage.tf line 1, in resource "azurerm_automanage_configuration" "deploy":
│  1: resource "azurerm_automanage_configuration" "deploy" {
│ 
│ creating Automanage Configuration: (Configuration Profile Name "Example" / Resource Group "Example"): automanage.ConfigurationProfilesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 --
│ Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidConfigurationValue" Message="The feature flag <Microsoft.Automanage/AutomanageAlertsEnabled> must enabled on subscription:
│ <subscription>, in order to use properties: <Alerts/AutomanageStatusChanges/Enable>"

Expected Behaviour

AutoManage Configuration created or updated.

Actual Behaviour

AutoManage Configuration neither created nor updated.
Previously succeeded some weeks, or a few months ago. Suspect no longer succeeding due to change with Preview Features on Azure.
Possibly caused by "status_change_alert_enabled" option set to true. Changing to false seems to resolve the issue.

Steps to Reproduce

terraform apply

Important Factoids

No response

References

No response

@liuwuliuyun
Copy link
Contributor

liuwuliuyun commented Aug 4, 2023

Hi @BrianRichardson, thanks for raising this issue. Like the error message indicates, this is a requirement from subscription. Let me show you how to enable this feature.

@liuwuliuyun
Copy link
Contributor

To enable a feature flag in a subscription, you can follow these steps:

  • Sign in to the Azure portal.

  • Search for and select Subscriptions.

  • Click on the subscription you want to enable the feature flag for.

  • In the left-hand menu, click on Preview features.

  • Find the feature flag you want to enable and click on it.

  • Click the Register button to enable the feature flag for your subscription

Please note that the availability of feature flags may vary depending on the subscription and the specific service you are using. If you cannot find the feature flag you are looking for, you may need to refer to the documentation or support for the specific Azure service you are using.

@liuwuliuyun
Copy link
Contributor

image

@2good4hisowngood
Copy link

Note for anyone following steps above, feature access is not instantaneously granted (currently ~12hrs waiting so far).

@rcskosir
Copy link
Contributor

rcskosir commented Dec 6, 2023

Thank you for taking the time to raise this! I am going to close this with @liuwuliuyun‘s response as an answer. If you have future questions, I suggest using the Community Resources, such as the Azure Provider forum.

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 Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants