hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.51k stars 4.6k forks source link

Support for declaratively set Azure Quotas #25512

Open KiVo16 opened 5 months ago

KiVo16 commented 5 months ago

Is there an existing issue for this?

Community Note

Description

Hi, Could you add suport for Azure Quota? I'd like to set Compute and Network Quotas declaratively.

As far as I understand the Azure SDK for Go already supports it: Docs

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

-

Potential Terraform Configuration

resource "azurerm_quota" "compute_quota" {
  name            = "standardFSv2Family"
  location        = "West Europe"
  provider        = "Microsoft.Compute"
  subscription_id = "<sub_id>"
  limit           = 3000
}

or with scope like in the Azure SDK

resource "azurerm_quota" "compute_quota" {
  name  = "standardFSv2Family"
  scope = "subscriptions/<sub_id>/providers/Microsoft.Compute/locations/eastus"
  limit = 3000
}

References

No response

KiVo16 commented 4 months ago

@rcskosir I added PR to pandora. It was merged recently, so there is Azure Quotas client available in hashicorp/go-azure-sdk

https://github.com/hashicorp/go-azure-sdk/tree/main/resource-manager/quota/2023-02-01

fleetwoodstack commented 2 days ago

I am so surprised this isn't supported already. So there is no way to currently set Quotas (e.g. for Virtual Machines) in terraform yet? That seems silly considering it's now possible to create quota alerts in the portal (and API) now.