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

falied to create azurerm_security_center_auto_provisioning #27670

Closed
1 task done
christian1607 opened this issue Oct 16, 2024 · 2 comments · Fixed by #28030
Closed
1 task done

falied to create azurerm_security_center_auto_provisioning #27670

christian1607 opened this issue Oct 16, 2024 · 2 comments · Fixed by #28030

Comments

@christian1607
Copy link

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 comments along the lines of "+1", "me too" or "any updates", 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.7.5

AzureRM Provider Version

3.97.1

Affected Resource(s)/Data Source(s)

azurerm_security_center_auto_provisioning

Terraform Configuration Files

resource "azurerm_security_center_auto_provisioning" "example" {
  auto_provision = "On"
}

Debug Output/Panic Output

│ Error: updating auto-provisioning setting for Auto Provisioning Setting: (Name "default"): security.AutoProvisioningSettingsClient#Create: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="Deprecated" Message="Log Analytics auto provisioning is deprecated and can no longer be enabled."
2460│
2461│   with module.sece.azurerm_security_center_auto_provisioning.seccen,
2462│   on sece/main.tf line 10, in resource "azurerm_security_center_auto_provisioning" "seccen":
2463│   10: resource "azurerm_security_center_auto_provisioning" "seccen" {
2464│
2465╵
2466Error: Terraform exited with code 1.
2467Error: Process completed with exit code 1.

Expected Behaviour

the resource should be created without any error

Actual Behaviour

Can't create the resource because I think internally the provider tries to enable log analytics agent autoprovisioning which will be deprecated by November 2024 info

Steps to Reproduce

  1. user azurerm version 3.97.1
  2. terraform apply

Important Factoids

No response

References

No response

@neil-yechenwei
Copy link
Contributor

neil-yechenwei commented Oct 17, 2024

Thanks for raising this issue. TF doesn't enable Log Analytics auto provisioning in the request payload. Seems there is some issue on service API side. Suggest file Azure Support Ticket.

Below is the request payload:

PUT https://management.azure.com/subscriptions/<subscriptionId>/providers/Microsoft.Security/autoProvisioningSettings/default

{
    "properties": {
        "autoProvision": "On"
    }
}

@ziyeqf
Copy link
Contributor

ziyeqf commented Nov 15, 2024

Hi @christian1607, thanks for reporting.

I submitted a PR (#28030) to deprecate the resource and noticed this issue. The capability is being deprecated per the document.

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

Successfully merging a pull request may close this issue.

4 participants