Closed AntonChernysh closed 4 years ago
it works now in Azurerm provider 2.0.0 when changing variable type to list, like this:
variable "site_config" {
type = list
description = "Site config block. See https://www.terraform.io/docs/providers/azurerm/r/app_service.html for references."
default = []
}
module invocation is updated too:
use_32_bit_worker_process = true
always_on = true
ftps_state = "Disabled"
websockets_enabled = true
}]
and for_each updated as well:
for_each = var.site_config
Terraform crashes on plan
with exactly the same setup, so it doesn't work in 1.44.0:
Error: rpc error: code = Unavailable desc = transport is closing
panic: interface conversion: interface {} is nil, not map[string]interface {}
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4:
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: goroutine 14 [running]:
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/provider.expandFeatures(0xc000ca6de0, 0x1, 0x1, 0x44311a0)
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/provider/features.go:54 +0x2f4
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/provider.providerConfigure.func1(0xc00061a620, 0x0, 0xc000da5ea0, 0xc00061a620, 0x0)
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/provider/provider.go:253 +0x9ab
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Configure(0xc0008d1280, 0xc000c441e0, 0x4543000, 0xc000c44060)
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/provider.go:275 +0xf6
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).Configure(0xc0000c0920, 0x52b83c0, 0xc000c36f90, 0xc000b7f1c0, 0xc0000c0920, 0xc000c36f90, 0xc000baabd0)
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin/grpc_provider.go:487 +0x2e6
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_Configure_Handler(0x48cdfa0, 0xc0000c0920, 0x52b83c0, 0xc000c36f90, 0xc000af81e0, 0x0, 0x52b83c0, 0xc000c36f90, 0xc000c064e0, 0x187)
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.pb.go:3135 +0x23e
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003e0420, 0x530fb40, 0xc00054e780, 0xc00079fa00, 0xc0009b4780, 0x86a9838, 0x0, 0x0, 0x0)
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:995 +0x466
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: google.golang.org/grpc.(*Server).handleStream(0xc0003e0420, 0x530fb40, 0xc00054e780, 0xc00079fa00, 0x0)
2020-02-25T14:27:34.727+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:1275 +0xda6
2020-02-25T14:27:34.728+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc000598070, 0xc0003e0420, 0x530fb40, 0xc00054e780, 0xc00079fa00)
2020-02-25T14:27:34.728+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:710 +0x9f
2020-02-25T14:27:34.728+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: created by google.golang.org/grpc.(*Server).serveStreams.func1
2020-02-25T14:27:34.728+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:708 +0xa1
2020/02/25 14:27:34 [ERROR] <root>: eval: *terraform.EvalConfigProvider, err: rpc error: code = Unavailable desc = transport is closing
2020/02/25 14:27:34 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/02/25 14:27:34 [ERROR] <root>: eval: *terraform.EvalOpFilter, err: rpc error: code = Unavailable desc = transport is closing
2020/02/25 14:27:34 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/02/25 14:27:34 [TRACE] [walkRefresh] Exiting eval tree: provider.azurerm
2020/02/25 14:27:34 [TRACE] vertex "provider.azurerm": visit complete
2020/02/25 14:27:34 [TRACE] dag/walk: upstream of "module.static_rg.data.azurerm_key_vault.akv" errored, so skipping
2020/02/25 14:27:34 [TRACE] dag/walk: upstream of "module.akv.data.azurerm_client_config.current" errored, so skipping
2020/02/25 14:27:34 [TRACE] dag/walk: upstream of "module.appsvc_plan.data.azurerm_key_vault.akv" errored, so skipping
2020/02/25 14:27:34 [TRACE] dag/walk: upstream of "module.mgmt_app_service.data.azurerm_key_vault.akv" errored, so skipping
2020/02/25 14:27:34 [TRACE] dag/walk: upstream of "provider.azurerm (close)" errored, so skipping
2020/02/25 14:27:34 [TRACE] dag/walk: upstream of "root" errored, so skipping
2020-02-25T14:27:34.730+0200 [DEBUG] plugin: plugin process exited: path=/Users/acherny/temptf/tf1/.terraform/plugins/darwin_amd64/terraform-provider-azurerm_v1.44.0_x4 pid=76020 error="exit status 2"
2020/02/25 14:27:34 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
2020/02/25 14:27:34 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock
2020-02-25T14:27:34.730+0200 [DEBUG] plugin: plugin exited
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
hi @AntonChernysh
Thanks for opening this issue - apologies for the delayed response here!
Taking a look through here as you've mentioned this appears to be an instance of https://github.com/hashicorp/terraform/issues/21702 - rather than something specific to the Azure Provider - and as such I'm going to close this in favour of that issue - however I believe that you should be able to work around this by specifying an empty list rather than null
here however (e.g. []
).
Thanks!
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!
Community Note
Terraform (and AzureRM Provider) Version
terraform 0.12.20
provider 1.44.0 (also tested 1.43.0)
Affected Resource(s)
site_config block in:
azurerm_app_service
azurerm_function_app
Terraform Configuration Files
module:
module invocation
site_config variable:
Debug Output
Panic Output
Expected Behavior
The following properties should be ignored and terraform should not validate their format when not passed to module:
ip_restriction
default_documents
always_on
Also applies to dynamiccors
block (commented out in code sample)Actual Behavior
terraform plan: failure
Inappropriate value for attribute "ip_restriction": list of object required.