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.52k stars 4.6k forks source link

Support for `azurerm_application_gateway` Basic SKU (Preview) #25973

Open tedsmitt opened 4 months ago

tedsmitt commented 4 months ago

Is there an existing issue for this?

Community Note

Description

As per the announcement for the Application Gateway Basic SKU (Preview) - implement Basic as an option for the azurerm_application_gateway property sku.name and sku.tier

Following feature will be required to be registered in the subscription: az feature register --name AllowApplicationGatewayBasicSku --namespace Microsoft.Network

Some changes to the sku.capacity and autoscale_configuration logic/defaults may need to be made as well, since the Basic SKU doesn't support this

I'm happy to look at implementing this, is the process to update to go-azure-sdk first, and then implement this in the provider?

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

azurerm_application_gateway

Potential Terraform Configuration

resource "azurerm_application_gateway" "this" {
  name                = "${var.prefix}-agw"
  resource_group_name = var.resource_group.name
  location            = var.resource_group.location

  sku {
    name = "Basic"
    tier = "Basic"
  }
...

References

https://azure.microsoft.com/en-us/updates/public-preview-azure-application-gateway-v2-basic-sku/#:~:text=The%20Application%20Gateway%20Basic%20SKU,require%20advanced%20traffic%20management%20features

tedsmitt commented 4 months ago

I am writing a PR for this feature, should have it ready for review either by the end of tomorrow.

tedsmitt commented 4 months ago

Upgrade of the applicationgateways API version is required

Application Gateway Name: "acctestag-xxx"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: ApplicationGatewayPropertyNotSupportedApiVersionTooOld: Specified api-version '2022-07-01' does not support property 'Basic' in context '/subscriptions/xxx/resourceGroups/acctestRG-xxx/providers/Microsoft.Network/applicationGateways/acctestag-xxx'. Use at least api-version '2023-02-01' or remove property 'Basic' from the request body.

This might be more work than initially expected 😅

EDIT: Looks like this is staying on 2022-07-01 for compatibility reasons as per https://github.com/hashicorp/terraform-provider-azurerm/pull/25844 - so this will be blocked pending the upgrade of the api version.

tedsmitt commented 1 month ago

Pending https://github.com/hashicorp/terraform-provider-azurerm/pull/26776 and release of 4.0

Karl-jurvanen commented 1 week ago

Any news on this, now that 4.0 is out?

t-l-k commented 6 days ago

@tedsmitt @rcskosir normally I'd consider an azapi resource when the required functionality isn't provided in azurerm, but for this resource, its so complicated! Standard_v2 SKU brings a lot of excess features surplus to requirements and at a hefty price, in comparison to Basic. Can we remove the blocked label now given the following is merged?