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.62k stars 4.66k forks source link

Support for declaratively set Azure Quotas #25512

Open KiVo16 opened 8 months ago

KiVo16 commented 8 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 7 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 months 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.