Azure / Azure/Azure-Landing-Zones
VPN Gateway Connection module ignores route map IDs in routing configuration
- Dominant language
- PowerShell
- Stars
- 96
- Forks
- 70
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 7
Description
### Check for previous/existing GitHub issues
- [x] I have checked for previous/existing GitHub issues
### Issue Type?
Bug
### (Optional) Module Version
_No response_
### (Optional) Correlation Id
_No response_
### Description
## Bug Report
### Module Version
- **Version:** v0.14.0
- **Module Path:** `modules/site-to-site-gateway-conn`
### Description
The VPN Gateway Connection submodule defines `inbound_route_map_id` and `outbound_route_map_id` in its variables but doesn't use them in the resource configuration, causing route maps to be ignored.
### Expected Behavior
When `inbound_route_map_id` or `outbound_route_map_id` are provided in the routing configuration, they should be applied to the `azurerm_vpn_gateway_connection` resource.
### Current Behavior
Route map IDs are accepted as input variables but ignored in the resource creation, causing Terraform to show drift and attempt to remove manually configured route maps.
### Root Cause
**File:** [modules/site-to-site-gateway-conn/main.tf](cci:7://file:///Users/dilpreetsingh/workspace/stash/azure/azure-core/production/vWAN/prod-eastus/.terraform/modules/vwan_prod_east_us/modules/site-to-site-gateway-conn/main.tf:0:0-0:0)
**Lines:** 52-67
The `routing` dynamic block only handles:
- `associated_route_table` ✅
- `propagated_route_table` ✅
- `inbound_route_map_id` ❌ (missing)
- `outbound_route_map_id` ❌ (missing)
### Code Fix Required
**Current code (lines 55-56):**
```hcl
content {
associated_route_table = routing.value.associated_route_table
# Missing route map IDs
}
Contributor guide
Research direction
Read modules/site-to-site-gateway-conn/main.tf, especially the routing dynamic block around lines 52-67, and trace the inbound_route_map_id and outbound_route_map_id variables. Verify with a Terraform plan that supplied route map IDs are applied to azurerm_vpn_gateway_connection and no longer appear as drift or removal changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, terraform
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100