Open junkiebev opened 2 months ago
Hi @junkiebev thanks for opening this issue. However, as far as I know in Terraform, for expressions cannot directly generate resource blocks or other configuration blocks. You could achieve similar functionality by leveraging dynamic blocks within resource definitions. Also, I would like to explain that this forum is intended to be used for feature enhancements and bugs in the Azure Provider . So that we can keep this forum focused on that we instead ask that questions are raised using one of the Community Resources. Thanks!
Hi @junkiebev thanks for opening this issue. However, as far as I know in Terraform, for expressions cannot directly generate resource blocks or other configuration blocks. You could achieve similar functionality by leveraging dynamic blocks within resource definitions. Also, I would like to explain that this forum is intended to be used for feature enhancements and bugs in the Azure Provider . So that we can keep this forum focused on that we instead ask that questions are raised using one of the Community Resources. Thanks!
Triage via documentation works :)
Is there an existing issue for this?
Community Note
Terraform Version
1.8.1
AzureRM Provider Version
3.109.0
Affected Resource(s)/Data Source(s)
azurerm_route_table
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Route table created with all the routes in the list of route objects
Actual Behaviour
Error thrown - attribute
next_hot_in_ip_address
requiredSteps to Reproduce
terraform apply
Important Factoids
No response
References
According to this: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/route_table
azurerm_route_table
can take a route as a list ofroute
objectsroute
blocks requirename
,address_prefix
,next_hop_type
next_hop_in_ip_address
is only allowed whennext_hop_type
isVirtualAppliance
(and the API will reject any non-conformant request)next_hop_type
is specified asInternet
I believe the issue is here in the code - the function should only require and allow that attribute to be set if
string(props.NextHopType) == "VirtualAppliance"
.A few issues which are probably related