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

Crash while handling Not Found response #766

Closed
irnc opened this issue Jan 29, 2018 · 3 comments · Fixed by #849
Closed

Crash while handling Not Found response #766

irnc opened this issue Jan 29, 2018 · 3 comments · Fixed by #849

Comments

@irnc
Copy link

irnc commented Jan 29, 2018

Terraform Version

Terraform v0.11.2

  • provider.azurerm v1.1.0

Affected Resource(s)

It seams that all resources are affected, as all could receive Not Found response.

Terraform Configuration Files

data "azurerm_app_service_plan" "ServicePlanb" {
  name = "ServicePlan"
  resource_group_name = "A"
  # while ServicePlan actually exists under resource group B
}

Panic Output

https://gist.github.com/irnc/0b84ce980d6af2c5861d7499c38b12b8 contains only extract with panic stack trace.

Expected Behavior

Not Found error should be handled.

Actual Behavior

Terraform crashes on a code branch, which was not supposed to be run, i.e. err != nil branch was expected to be run instead of https://github.com/terraform-providers/terraform-provider-azurerm/blob/v1.1.0/azurerm/data_source_app_service_plan.go#L97

Steps to Reproduce

  • terraform plan
@sjwaight
Copy link

sjwaight commented Feb 5, 2018

Recreate this scenario by deleting the Resource Group containing your previously provisioned resources and you will crash out of Terraform as per the above.

@tombuildsstuff
Copy link
Contributor

hey @irnc @sjwaight

Thanks for opening this issue (and for the reproduction steps!)

I've taken a look into this issue and have opened #849 which contains a fix - which should be going out in v1.1.2 later today :)

Thanks!

@ghost
Copy link

ghost commented Mar 31, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants