terraform-azurerm-lz-vending icon indicating copy to clipboard operation
terraform-azurerm-lz-vending copied to clipboard

potential bug: vnet resource and peerings

Open nyanhp opened this issue 11 months ago • 0 comments

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 "+1" or "me too" comments, 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

Versions

Please paste the output of terraform version command from within the initialized directory:

Terraform v1.7.4
on windows_amd64

Please enter the module version that you are using:

4.0.2
Tested AzApi 1.11.0 - 1.12.1

Description

A first deployment works, every plan thereafter runs into the error:

Error: embedded schema validation failed: the `body` is invalid:
│ `properties.virtualNetworkPeerings.0.properties.routeServiceVips` is not expected here. Do you mean `properties.virtualNetworkPeerings.0.properties.resourceGuid`?
│ `properties.virtualNetworkPeerings.0.properties.resourceGuid` is not expected here, it's read only
│ `properties.virtualNetworkPeerings.0.properties.provisioningState` is not expected here, it's read only
│ `properties.virtualNetworkPeerings.0.properties.peerCompleteVnets` is not expected here. Do you mean `properties.virtualNetworkPeerings.0.properties.peeringState`?
│ `properties.virtualNetworkPeerings.0.etag` is not expected here, it's read only
│  You can try to update `azapi` provider to the latest version or disable the validation using the feature flag `schema_validation_enabled = false` within the resource block

I'm a bit flummoxed as the deployment worked fine in the past - I simply don't know what changed.

Steps to Reproduce

Normal LZ deployment. I cannot reasonably redact all the client information, it's a big deployment. The vnet in question is configured as:

"vn1": {
          "name": "vnet-redacted",
          "hub_peering_use_remote_gateways": false,
          "resource_group_name": "rg-redacted",
          "address_space": [
            "192.168.1.0/24"
          ],
          "hub_network_resource_id": "/subscriptions/redacted/resourceGroups/redacted-connectivity-westeurope-networking/providers/Microsoft.Network/virtualNetworks/redacted-hub-westeurope-networking",
          "hub_peering_name_fromhub": "redacted-hub-westeurope-networking-to-redacted",
          "hub_peering_enabled": true,
          "hub_peering_name_tohub": "redacted-to-redacted-hub-westeurope-networking"
        }
  1. terraform plan, no peerings in place yet
  2. terraform apply, peerings are configured
  3. terraform plan -> The error occurs

Screenshots

Additional context

nyanhp avatar Mar 06 '24 09:03 nyanhp