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

Importing App Service Plan of type Y1 fails (azure function consumption plan) #3665

Closed
pquinn262 opened this issue Jun 14, 2019 · 3 comments
Closed

Comments

@pquinn262
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 v0.11.13
+ provider.azurerm v1.30.1

(also tried with Terraform v0.12.2)

Affected Resource(s)

  • azurerm_app_service_plan

Terraform Configuration Files

resource "azurerm_app_service_plan" "this" {
  name                = "${var.product_name}-${terraform.workspace}-${var.region_abbreviation}-asp"
  location            = "${data.azurerm_resource_group.this.location}"
  resource_group_name = "${data.azurerm_resource_group.this.name}"
  kind                = "FunctionApp"
  tags                = "${local.tags}"

  sku {
    tier = "Dynamic"
    size = "Y1"
  }
}

Debug Output

https://gist.github.com/pquinn262/9189fd36e7c56dcd9ce0f5ffd85dfc14

Expected Behavior

resource should be imported

Actual Behavior

terraform import azurerm_app_service_plan.this /subscriptions/*redacted subscription id*/resourceGroups/*redacted group name*/providers/Microsoft.Web/serverFarms/*redacted asp name*

azurerm_app_service_plan.this: Importing from ID "/subscriptions/*redacted subscription id*/resourceGroups/*redacted group name*/providers/Microsoft.Web/serverFarms/*redacted asp name*"...
azurerm_app_service_plan.this: Import complete!
  Imported azurerm_app_service_plan (ID: /subscriptions/*redacted subscription id*/resourceGroups/*redacted group name*/providers/Microsoft.Web/serverFarms/*redacted asp name*)
azurerm_app_service_plan.this: Refreshing state... (ID: /subscriptions/...Farms/*redacted asp name*)

Error: azurerm_app_service_plan.this (import id: /subscriptions/*redacted subscription id*/resourceGroups/*redacted group name*/providers/Microsoft.Web/serverFarms/*redacted asp name*): 1 error(s) occurred:

* import azurerm_app_service_plan.this result: /subscriptions/*redacted subscription id*/resourceGroups/*redacted group name*/providers/Microsoft.Web/serverFarms/*redacted asp name*: azurerm_app_service_plan.this: unexpected EOF
panic: runtime error: invalid memory address or nil pointer dereference
2019-06-14T08:41:03.590-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.30.1_x4.exe: [signal 0xc0000005 code=0x0 addr=0x78 pc=0x26b04a5]
2019-06-14T08:41:03.590-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.30.1_x4.exe:
2019-06-14T08:41:03.590-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.30.1_x4.exe: goroutine 48 [running]:
2019-06-14T08:41:03.590-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.30.1_x4.exe: github.com/terraform-providers/terraform-provider-azurerm/azurerm.resourceArmAppServicePlanRead(0xc00024e690, 0x30546c0, 0xc0009e2000, 0xc00024e690, 0x0)
2019-06-14T08:41:03.590-0500 [DEBUG] plugin.terraform-provider-azurerm_v1.30.1_x4.exe:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/resource_arm_app_service_plan.go:288
+0x735
... more debug info ...

Important Factoids

This is a Y1 Dynamic App Service Plan for an Azure Function.

@ghost ghost added bug crash labels Jun 14, 2019
@tombuildsstuff
Copy link
Contributor

Fixed via #3657

@ghost
Copy link

ghost commented Jun 28, 2019

This has been released in version 1.31.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 = "~> 1.31.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jul 15, 2019

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 Jul 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants