Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_virtual_hub_routing_intent does not seem to support a list of destinations in the routing_policy #23999

Open
1 task done
zadigus opened this issue Nov 23, 2023 · 4 comments

Comments

@zadigus
Copy link

zadigus commented Nov 23, 2023

Is there an existing issue for this?

  • I have searched the existing issues

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 and review the contribution guide to help.

Terraform Version

1.4.1

AzureRM Provider Version

3.81.0

Affected Resource(s)/Data Source(s)

azurerm_virtual_hub_routing_intent

Terraform Configuration Files

resource "azurerm_virtual_hub_routing_intent" "vwan_hub" {
  name           = "routing-intent"
  virtual_hub_id = var.virtual_hub_id

  routing_policy {
    name         = "AllTrafficPolicy"
    destinations = ["Internet", "PrivateTraffic"]
    next_hop     = var.fw_id
  }
}

Debug Output/Panic Output

There is no error.

Expected Behaviour

In the Azure Portal, I expect to see:

image

Actual Behaviour

Unfortunately, on the Azure Portal, I see

image

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@zadigus
Copy link
Author

zadigus commented Nov 23, 2023

If instead I write my terraform configuration like this:

resource "azurerm_virtual_hub_routing_intent" "vwan_hub" {
  name           = "routing-intent"
  virtual_hub_id = var.virtual_hub_id

  routing_policy {
    name         = "InternetTrafficPolicy"
    destinations = ["Internet"]
    next_hop     = var.fw_id
  }

  routing_policy {
    name         = "PrivateTrafficPolicy"
    destinations = ["PrivateTraffic"]
    next_hop     = var.fw_id
  }
}

then I get the expected result. However, I expect my initial configuration to work as expected too, there is nothing in the azurerm documentation telling me otherwise.

@neil-yechenwei
Copy link
Contributor

neil-yechenwei commented Nov 24, 2023

Thanks for raising this issue. I assume it's by service API design not a TF bug.

@zadigus
Copy link
Author

zadigus commented Nov 24, 2023

Maybe, but then, you should not accept an array of values for the destinations.

@LaurentLesle
Copy link
Contributor

LaurentLesle commented Sep 9, 2024

Hi @zadigus and @neil-yechenwei. I got misled by the list of destination and my deployment was ended-up in failure. I managed to create 2 policies as you mentioned. One for Internet and 1 for PrivateNetwork and now routing intent is properly configured. I would qualify it as a bug as it should not accept a list.

 with module.alz_connectivity.azurerm_virtual_hub_routing_intent.virtual_wan["/subscriptions/000000/resourceGroups/rg-prod-network-vwan/providers/Microsoft.Network/virtualHubs/hub-southeastasia/lz-cl-routingintent-southeastasia"],
│   on .terraform/modules/alz_connectivity/resources.virtual_wan.tf line 364, in resource "azurerm_virtual_hub_routing_intent" "virtual_wan":
│  364: resource "azurerm_virtual_hub_routing_intent" "virtual_wan" {
│ 
│ creating Routing Intent (Subscription: "000000"
│ Resource Group Name: "rg-prod-network-vwan"
│ Virtual Hub Name: "hub-southeastasia"
│ Routing Intent Name: "routingintent-southeastasia"): polling after RoutingIntentCreateOrUpdate: polling failed: the Azure
│ API returned the following error:
│ 
│ Status: "InternalServerError"
│ Code: ""
│ Message: "An error occurred."
│ Activity Id: ""
│ 
│ ---
│ 
│ API Response:
│ 
│ ----[start]----
│ {"status":"Failed","error":{"code":"InternalServerError","message":"An error occurred.","details":[]}}
│ -----[end]-----

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants