hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.61k stars 4.65k forks source link

Terraform Crash Azure #5918

Closed ghost closed 4 years ago

ghost commented 4 years ago

This issue was originally opened by @lhlima as hashicorp/terraform#24226. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.12.21

Step:

Terraform plan

Terraform Configuration Files

`provider "azurerm" {
  version         = "1.44.0"
  features {}
}

resource "azurerm_resource_group" "resource_group" {
  location = "Central US"
  name     = "test"
}

resource "azurerm_app_service_plan" "resource_plan" {
  name                = "test"
  location            = azurerm_resource_group.resource_group.location
  resource_group_name = azurerm_resource_group.resource_group.name
  sku {
    size = "S1"
    tier = "Standard"
  }
}

resource "azurerm_app_service" "app_service" {
  name                = "test"
  app_service_plan_id = azurerm_app_service_plan.resource_plan.id
  location            = azurerm_resource_group.resource_group.location
  resource_group_name = azurerm_resource_group.resource_group.name
  site_config {
    php_version = "7.2"
    scm_type    = "LocalGit"
  }
}`

Crash Output

2020/02/26 16:15:42 [INFO] Terraform version: 0.12.21
2020/02/26 16:15:42 [INFO] Go runtime version: go1.12.13 2020/02/26 16:15:42 [INFO] CLI args: []string{"C:\Program Files\terraform\terraform.exe", "plan"} 2020/02/26 16:15:42 [DEBUG] Attempting to open CLI config file: C:\Users\lhsilval\AppData\Roaming\terraform.rc 2020/02/26 16:15:42 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. 2020/02/26 16:15:42 [INFO] CLI command args: []string{"plan"} 2020/02/26 16:15:42 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config 2020/02/26 16:15:42 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory 2020/02/26 16:15:42 [DEBUG] New state was assigned lineage "a3b168d6-1442-c55c-3c02-98011bf3042d" 2020/02/26 16:15:42 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend) 2020/02/26 16:15:42 [TRACE] Meta.Backend: instantiated backend of type 2020/02/26 16:15:42 [DEBUG] checking for provider in "." 2020/02/26 16:15:42 [DEBUG] checking for provider in "C:\Program Files\terraform" 2020/02/26 16:15:42 [DEBUG] checking for provider in ".terraform\plugins\windows_amd64" 2020/02/26 16:15:42 [DEBUG] found provider "terraform-provider-azurerm_v1.44.0_x4.exe" 2020/02/26 16:15:42 [DEBUG] found valid plugin: "azurerm", "1.44.0", "C:\temp\IaC\terraform\module\.terraform\plugins\windows_amd64\terraform-provider-azurerm_v1.44.0_x4.exe" 2020/02/26 16:15:42 [DEBUG] checking for provisioner in "." 2020/02/26 16:15:42 [DEBUG] checking for provisioner in "C:\Program Files\terraform" 2020/02/26 16:15:42 [DEBUG] checking for provisioner in ".terraform\plugins\windows_amd64" 2020/02/26 16:15:42 [TRACE] Meta.Backend: backend does not support operations, so wrapping it in a local backend 2020/02/26 16:15:42 [INFO] backend/local: starting Plan operation 2020/02/26 16:15:42 [TRACE] backend/local: requesting state manager for workspace "default" 2020/02/26 16:15:42 [TRACE] backend/local: state manager for workspace "default" will:

jackofallops commented 4 years ago

This is a panic from attempting to use the optional beta features block without any config. Whilst this is not intended behaviour, and is a bug, the beta has now been superseded by the release of 2.0. If there is a use case for this using the features block here, then please set one of the optional fields in that block. This bug is not present in 2.0 where the features block is required rather than optional.

ghost commented 4 years ago

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!