Azure / terraform-provider-azapi

Terraform provider for Azure Resource Manager Rest API
https://registry.terraform.io/providers/Azure/azapi/latest
Mozilla Public License 2.0
191 stars 50 forks source link

route map azapi (not associating to the connection) #433

Closed burimali closed 1 day ago

burimali commented 7 months ago

Subject: Route map creation and association to the peering connection.

Symptom: route map is created successfully but it is failing to be associated to the peering connection.

Some more details testing steps: terraform: if we re-run it tries each time to associate it, the run goes through without failing. terraform: re-run again it tries each time to associate it again, and the run goes goes through without failing. click-ops: doing the association with click-ops, it gets associated. terraform: running the code it then shows no changes to the infrastructure.

Code sample

source: https://learn.microsoft.com/en-us/azure/templates/microsoft.network/virtualhubs/routemaps?pivots=deployment-language-terraform

resource "azapi_resource" "routemap_outbound" { type = "Microsoft.Network/virtualHubs/routeMaps@2023-04-01" name = routemap-outbound parent_id = "/subscriptions/*****/of the hub"

body = jsonencode({ properties = { associatedOutboundConnections = [ "/subscriptions/*****/removed-full-id" ] rules = [ { actions = [ { parameters = [ { community = [ "65515:1" ] } ] type = "Add" } ] matchCriteria = [ { asPath = [ "65515" ] matchCondition = "Contains" } ] name = "rule1" nextStepIfMatched = "Continue" }, { actions = [ { parameters = [ { community = [ "65520:1" ] } ] type = "Add" } ] matchCriteria = [ { asPath = [ "65520" ] matchCondition = "Contains" } ] name = "rule2" nextStepIfMatched = "Continue" } ] } }) }

ms-henglu commented 7 months ago

Hi @burimali ,

Thank you for taking time to report this issue!

Would you please share us more details to help investigate? Like the http request traces and the error message.

ms-henglu commented 1 day ago

I'll close this issue as there's no response, but feel free to reopen it if there's any questions.