You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please enter the module version that you are using:
4.1.5
Description
I've been using the LZ vending module for the Vnet creation and the Azure rm module for subnet creation, initial plan and apply works fine. Then something happens and i start getting the below error. This doesn't happen straight away so will keep working fine for a while and then i start getting the below:
Error: Invalid configuration
│
│ with module.lz_vending.module.virtualnetwork[0].azapi_resource.vnet["vnet-1"],
│ on .terraform\modules\lz_vending\modules\virtualnetwork\main.tf line 37, in resource "azapi_resource" "vnet":
│ 37: resource "azapi_resource" "vnet" {
│
│ embedded schema validation failed: the argument "body" is invalid:
│ properties.subnets.0.properties.defaultOutboundAccess is not expected here. Do you mean properties.subnets.0.properties.delegations?
│ properties.subnets.1.properties.defaultOutboundAccess is not expected here. Do you mean properties.subnets.1.properties.delegations?
│ properties.subnets.1.properties.serviceEndpoints.0.provisioningState is not expected here, it's read only
│ properties.subnets.2.properties.defaultOutboundAccess is not expected here. Do you mean properties.subnets.2.properties.delegations?
│ properties.subnets.2.properties.serviceEndpoints.0.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?
│ 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
If i add as suggested the 'schema_validation_enabled = false' feature into the lz_vending module/network module config the plan/apply then works fine.
Community Note
Versions
Please paste the output of
terraform version
command from within the initialized directory:Please enter the module version that you are using:
Description
I've been using the LZ vending module for the Vnet creation and the Azure rm module for subnet creation, initial plan and apply works fine. Then something happens and i start getting the below error. This doesn't happen straight away so will keep working fine for a while and then i start getting the below:
Error: Invalid configuration
│
│ with module.lz_vending.module.virtualnetwork[0].azapi_resource.vnet["vnet-1"],
│ on .terraform\modules\lz_vending\modules\virtualnetwork\main.tf line 37, in resource "azapi_resource" "vnet":
│ 37: resource "azapi_resource" "vnet" {
│
│ embedded schema validation failed: the argument "body" is invalid:
│
properties.subnets.0.properties.defaultOutboundAccess
is not expected here. Do you meanproperties.subnets.0.properties.delegations
?│
properties.subnets.1.properties.defaultOutboundAccess
is not expected here. Do you meanproperties.subnets.1.properties.delegations
?│
properties.subnets.1.properties.serviceEndpoints.0.provisioningState
is not expected here, it's read only│
properties.subnets.2.properties.defaultOutboundAccess
is not expected here. Do you meanproperties.subnets.2.properties.delegations
?│
properties.subnets.2.properties.serviceEndpoints.0.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
?│ You can try to update
azapi
provider to the latest version or disable the validation using the feature flagschema_validation_enabled = false
within the resource blockIf i add as suggested the 'schema_validation_enabled = false' feature into the lz_vending module/network module config the plan/apply then works fine.
Screenshot of config below
Steps to Reproduce
resource "azurerm_subnet" "subnets" {
for_each = var.subnet_configs
provider = azurerm.agrimetrics-dsp
name = each.key
resource_group_name = var.networking_resource_group_name
virtual_network_name = var.vnet_name
address_prefixes = [each.value.address_prefix]
private_endpoint_network_policies = lookup(each.value, "private_endpoint_network_policies", "Disabled")
private_link_service_network_policies_enabled = lookup(each.value, "private_link_service_network_policies_enabled", false)
service_endpoints = lookup(each.value, "service_endpoints", null)
dynamic "delegation" {
# Use the boolean flag to determine whether to create the dynamic block
for_each = each.value.enable_delegation ? [{}] : []
}
depends_on = [module.lz_vending]
}
3. Plan and apply - this will work and then something happens at a later point to cause the error.
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: