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_frontdoor: check for nil value in future.Response() #11720

Merged
merged 1 commit into from
May 19, 2021
Merged

azurerm_frontdoor: check for nil value in future.Response() #11720

merged 1 commit into from
May 19, 2021

Conversation

favoretti
Copy link
Collaborator

@WodansSon apparently this can be nil? 😟

Fixes #11715

@ghost ghost added the size/XS label May 14, 2021
@WodansSon
Copy link
Collaborator

Yes, this is related to change in the RP where the CNAME has to be deleted first. I have tried to check future for nil already and it had no effect on the panic outcome. I will give this PR a try to see if my mileage will vary with what you have done. 🚀

@WodansSon WodansSon added the upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR label May 17, 2021
@WodansSon
Copy link
Collaborator

@favoretti, thanks for this PR... this does stop the panic with a better experience. It now errors with:

Error: deleting Front Door "exampleFrontdoor" (Resource Group "example-rg"): frontdoor.FrontDoorsClient#Delete: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="Conflict" Message="Cannot delete frontend endpoint \"example-custom.wodans-son.co.uk\" because it is still directly or indirectly (using \"afdverify\" prefix) CNAMEd to front door \"exampleFrontdoor.azurefd.net\". Please remove the DNS CNAME records and try again."

Copy link
Collaborator

@WodansSon WodansSon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@favoretti thanks for the PR this LGTM 🚀

@WodansSon WodansSon added this to the v2.60.0 milestone May 19, 2021
@WodansSon
Copy link
Collaborator

image

@WodansSon WodansSon merged commit 7fcef19 into hashicorp:master May 19, 2021
WodansSon added a commit that referenced this pull request 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 pushed a commit to gro1m/terraform-provider-azurerm that referenced this pull request May 26, 2021
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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
bug service/frontdoor size/XS upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin crash when removing a Front Door resource
3 participants