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

Plugin crash when removing a Front Door resource #11715

Closed
la-sanchez opened this issue May 14, 2021 · 4 comments · Fixed by #11720
Closed

Plugin crash when removing a Front Door resource #11715

la-sanchez opened this issue May 14, 2021 · 4 comments · Fixed by #11720
Assignees
Labels
crash service/frontdoor upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Milestone

Comments

@la-sanchez
Copy link

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

Terraform (and AzureRM Provider) Version

Terraform: 0.15.3
Azurerm: 2.59.0

Affected Resource(s)

  • azurerm_frontdoor

Terraform Configuration Files

resource "azurerm_frontdoor" "fd" {
  name = var.name
  friendly_name = var.name
  resource_group_name = var.rg.name
  enforce_backend_pools_certificate_name_check = false
  backend_pools_send_receive_timeout_seconds = 60

  dynamic backend_pool {
    for_each = var.backend_pools
    content {
      name = backend_pool.value.name
      load_balancing_name = "loadBalancingSettings-${backend_pool.value.name}"
      health_probe_name = "healthProbeSettings-${backend_pool.value.name}"
      backend {
        host_header = ""
        address = backend_pool.value.address
        http_port = local.http_port
        https_port = local.https_port
      }
    }
  }

  dynamic "backend_pool_load_balancing"  {
    for_each = var.backend_pools
    content {
      name = "loadBalancingSettings-${backend_pool_load_balancing.value.name}"
    }
  }

  dynamic "backend_pool_health_probe" {
    for_each = var.backend_pools
    content {
      name = "healthProbeSettings-${backend_pool_health_probe.value.name}"
      enabled = true
      interval_in_seconds = 30
      probe_method = "HEAD"
      protocol = "Http"
    }
  }

  dynamic "frontend_endpoint" {
    for_each = var.frontend_endpoints
    content {
      name = frontend_endpoint.value.name
      host_name = frontend_endpoint.value.host_name
      web_application_firewall_policy_link_id = azurerm_frontdoor_firewall_policy.fd_waf_policy.id
    }
  }

  dynamic "routing_rule" {
    for_each = var.routing_rules
    content {
      name = routing_rule.value.name
      accepted_protocols = routing_rule.value.accepted_protocols
      patterns_to_match = routing_rule.value.patterns_to_match
      frontend_endpoints = routing_rule.value.frontend_endpoints

      dynamic "forwarding_configuration" {
        for_each = routing_rule.value.route_type == "Forward" ? {dummy = "dummy"} : {}
        content {
          forwarding_protocol = "HttpOnly"
          backend_pool_name = var.backend_pools["app_gtw"].name
        }
      }

      dynamic "redirect_configuration" {
        for_each = routing_rule.value.route_type == "Redirect" ? {dummy = "dummy"} : {}
        content {
          redirect_protocol = "HttpsOnly"
          redirect_type = "Found"
        }
      }
    }
  }
}

Panic Output

https://gist.github.com/laSanchezVazquez/1afe77f4538b728cf0a8f33f4e5184e4

Expected Behaviour

Front door to be removed.

Actual Behaviour

Plugin crashing

Steps to Reproduce

  1. terraform apply
@WodansSon WodansSon added the upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR label May 17, 2021
@WodansSon WodansSon self-assigned this May 17, 2021
@WodansSon
Copy link
Collaborator

@la-sanchez, thank you for opening this issue, but this is a known issue and noted in issue #11231. I have already looked into this and didn't find a workaround outside of adding the subscription level feature flag, however I will look at @favoretti PR closer later today. 🚀

@la-sanchez
Copy link
Author

la-sanchez commented May 17, 2021

@WodansSon Ok thank you very much, feel free to close it then if needed.

@WodansSon WodansSon added this to the v2.60.0 milestone May 19, 2021
WodansSon pushed a commit that referenced this issue May 19, 2021
@ghost
Copy link

ghost commented May 21, 2021

This has been released in version 2.60.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.60.0"
}
# ... other configuration ...

favoretti added a commit to gro1m/terraform-provider-azurerm that referenced this issue May 26, 2021
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
crash service/frontdoor upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants