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

Microsoft.Network/virtualNetworks/subnets/action reference in Terraform docs #24869

Open rolyon opened 6 months ago

rolyon commented 6 months ago

Is there an existing issue for this?

Community Note

Terraform Version

1.0.0

AzureRM Provider Version

3.91.0

Affected Resource(s)/Data Source(s)

azurerm_subnet

Terraform Configuration Files

I think this is an example config file.

postgres_subnet = {
      name              = "<name>"
      address_prefixes  = ["<address>"]
      service_endpoints = ["Microsoft.Storage"]

      delegation = {
        name = "fs"

        service_delegation = {
          name = "Microsoft.DBforPostgreSQL/flexibleServers"

          actions = [
            "Microsoft.Network/virtualNetworks/subnets/join/action"
          ]
        }
      }
    }

Debug Output/Panic Output

Error: creating Flexible Server (Subscription: "<subscription_id>"
│ Resource Group Name: "<name>"
│ Flexible Server Name: "<server>"): polling after Create: Code="OperationFailed" Message="Operation on <path> under resource type VirtualNetworks is blocking by customer lock, Please release the lock to unblock the operation. Lock details: [Lock Name: del, Lock Id: /subscriptions/<subscription_id>/resourceGroups/<name>/providers/Microsoft.Authorization/locks/del, Lock Level: CanNotDelete]"
│ 
│   with module.auth_pg_fs_database.azurerm_postgresql_flexible_server.main,
│   on ../../terraform-modules/postgresql-flexible-server/main.tf line 19, in resource "azurerm_postgresql_flexible_server" "main":
│   19: resource "azurerm_postgresql_flexible_server" "main" {
│ 

Expected Behaviour

No response

Actual Behaviour

No response

Steps to Reproduce

No response

Important Factoids

No response

References

The Terraform docs indicate that the following action can be used: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet#actions Microsoft.Network/virtualNetworks/subnets/action

However, the Microsoft.Network resource provider does not include this action. https://learn.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#microsoftnetwork When we list the provider operations in the Azure portal and Azure CLI, this action is not included. https://learn.microsoft.com/en-us/cli/azure/provider/operation?view=azure-cli-latest#az-provider-operation-show

Do you know why there is this difference? Do the Terraform docs need to be updated?

Based on customer feedback https://github.com/MicrosoftDocs/azure-docs/issues/101357

thanks

dylanberry commented 5 months ago

This should be a quick fix and is causing issues for everyone using this resource. It would be nice to see this completed and closed ASAP.