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

Error: deleting Azure Firewall #271

Closed
krowlandson opened this issue Feb 16, 2022 · 1 comment · Fixed by #287
Closed

Error: deleting Azure Firewall #271

krowlandson opened this issue Feb 16, 2022 · 1 comment · Fixed by #287

Comments

@krowlandson
Copy link
Contributor

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

Versions

terraform: Terraform v1.1.5

azure provider: + provider registry.terraform.io/hashicorp/azurerm v2.83.0

module: v1.1.2

Description

Describe the bug

When running terraform destroy with a configuration which has deployed one or more Azure Firewall resources, we get the following error:

╷
│ Error: deleting Azure Firewall Firewall: (Azure Firewall Name "12345-fw-northeurope" / Resource Group "12345-connectivity-northeurope") : network.AzureFirewallsClient#Delete: Failure sending request: StatusCode=415 -- Original Error: Code="UnsupportedMediaType" Message="The content media type '<null>' is not supported. Only 'application/json' is supported."
│
│
╵

This results in multiple resources failing to be destroyed due to dependencies.

Steps to Reproduce

  1. Create a module configuration which deploys at least 1 virtual network using hub_networks or vwan_hub_networks with the Azure Firewall enabled.
  2. Run terraform apply and confirm.
  3. Once deployment is completed, run terraform destroy and confirm.
  4. Take note of the error message and resources which are still to be destroyed.

Screenshots

image

Additional context

This appears to be an Azure API related breaking change which has impacted multiple 3rd party tooling, including the Azure provider for Terraform.

Please refer to the following issue for reference:

NOTE: This issue is fixed in v2.96.0 of the Terraform Provider.

@ghost ghost added the Needs: Triage 🔍 Needs triaging by the team label Feb 16, 2022
@krowlandson krowlandson self-assigned this Feb 16, 2022
@ghost ghost removed the Needs: Triage 🔍 Needs triaging by the team label Feb 16, 2022
@krowlandson krowlandson added this to the v1.2.0 release milestone Feb 16, 2022
@krowlandson
Copy link
Contributor Author

This is an upstream issue which will impact all versions of the Azure provider for Terraform prior to release v2.96.0.

Proposed fix will be to update the minimum supported Azure provider for Terraform to release v2.96.0 onwards.

@krowlandson krowlandson changed the title Error Error: deleting Azure Firewall Feb 16, 2022
krowlandson pushed a commit to krowlandson/terraform-azurerm-caf-enterprise-scale that referenced this issue Feb 17, 2022
krowlandson pushed a commit to krowlandson/terraform-azurerm-caf-enterprise-scale that referenced this issue Feb 18, 2022
krowlandson pushed a commit that referenced this issue Feb 21, 2022
* Refactor test deployments

* Update minimum supported provider version

* Fix linting error

* Update root_name

* Update unit test pipeline

* Fix certificate path error

* Rename job display names

* Update e2e test pipeline

* Update location variable

* Remove unused TF_PLAN_OUT variable

* Update parallelism environment variable

* Update path for terraform destroy

* Increase job timeouts for e2e

* Update OPA value generator for pwsh

* Add `planned_values.json` for each test case

* Remove trailing whitespace

* Update OPA tests script for new framework

* Add OPA tasks to Unit Tests job

* Remove `.sh` script (to be unified with `.ps1` version)

* Refactor OPA installation scripts

* Update execution bit

* Update task names

* Add readme to test framework

* Add VWAN config to connectivity settings

* Remove unsupported tags object from config

* Update minimum supported version to fix #271

* Fix #271 error deleting firewall

* Updates to fix #272

* Fix formatting error on fix for #273

* Fix to prevent lock file versions error

* Update rego files to reflect changes for #272

* Updated for latest test framework plans
@ghost ghost added the PR-referenced label Mar 1, 2022
krowlandson pushed a commit that referenced this issue Mar 9, 2022
* Add VWAN capabilities to upstream branch (#250)

* Initial MVP for virtual wan and hub resources
* Update resource dependencies
* Refactor to create dedicated resources for vwan
* Refactor to simplify for management resources
* Replace `try()` with `lookup()`
* Update custom settings for Virtual WAN
* Add DNS links for spokes connected to Virtual Hubs
* Add virtual hub connections

* Fix incorrect VPN gateway name (#251)

* Fix incorrect VPN gateway name

* Refactor test framework for VWAN additions (#265)

* Refactor test deployments

* Update minimum supported provider version

* Fix linting error

* Update root_name

* Update unit test pipeline

* Fix certificate path error

* Rename job display names

* Update e2e test pipeline

* Update location variable

* Remove unused TF_PLAN_OUT variable

* Update parallelism environment variable

* Update path for terraform destroy

* Increase job timeouts for e2e

* Update OPA value generator for pwsh

* Add `planned_values.json` for each test case

* Remove trailing whitespace

* Update OPA tests script for new framework

* Add OPA tasks to Unit Tests job

* Remove `.sh` script (to be unified with `.ps1` version)

* Refactor OPA installation scripts

* Update execution bit

* Update task names

* Add readme to test framework

* Add VWAN config to connectivity settings

* Remove unsupported tags object from config

* Update minimum supported version to fix #271

* Fix #271 error deleting firewall

* Updates to fix #272

* Fix formatting error on fix for #273

* Fix to prevent lock file versions error

* Update rego files to reflect changes for #272

* Updated for latest test framework plans

* Update conftest baseline

* Add opt-out for `terraform destroy`

* Update for remote backend configuration

* Update dependsOn for test jobs

* Update execution bit on script file

* Output variables to pipeline

* Update auth config for backend

* Update backend config for SPN auth

* Update comment

* Move random `root_id` generation to strategy job

* Add SPN credentials to backend configuration

* Do not try to overwrite readonly variable

* Rename function for linting error

* Remove `use_microsoft_graph` due to error

* Add `az logout` step

* Troubleshoot `terraform init` error

* Map dependent variables

* Add `az cli` login to init step

* Troubleshoot auth issue for `terraform init`

* Add `ARM_CLIENT_SECRET` to `terraform init` steps

* Add dependent variables to e2e test jobs

* Split e2e tests into multiple jobs

* Update condition in test loop

* Rename jobs

* Update timeout on clean-up

* Update condition format

* Update dependencies

* Update conditions

* Update conditions

* Update timeout and conditions for e2e tests

* Rename tasks

* Update logic for `terraform destroy`

* Update logic for `terraform destroy`

* Update condition

* Rename e2e clean-up job
@ghost ghost added PR-merged and removed PR-referenced labels Mar 9, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant