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.53k stars 4.61k forks source link

Crash with creation of azurerm_redis_cache #6852

Closed Japeth closed 4 years ago

Japeth commented 4 years ago

Community Note

Terraform (and AzureRM Provider) Version

terraform 0.12.24 azurerm 2.9.0

Affected Resource(s)

Terraform Configuration Files

resource "azurerm_redis_cache" "redis" {
  name                = var.json.environment_name
  location            = azurerm_resource_group.resource_group.location
  resource_group_name = azurerm_resource_group.resource_group.name
  capacity            = var.json.redis_settings.capacity
  family              = var.json.redis_settings.family
  sku_name            = var.json.redis_settings.sku
  enable_non_ssl_port = false
  minimum_tls_version = "1.2"
  tags                = local.resource_tags

  redis_configuration {
  }

}

Debug Output

Panic Output

2020-05-08T22:12:31.2988132Z azurerm_api_management.api_management: Still creating... [26m0s elapsed]
2020-05-08T22:12:31.3839790Z azurerm_redis_cache.redis: Still creating... [23m50s elapsed]
2020-05-08T22:12:41.2984471Z azurerm_api_management.api_management: Still creating... [26m10s elapsed]
2020-05-08T22:12:41.3844138Z azurerm_redis_cache.redis: Still creating... [24m0s elapsed]
2020-05-08T22:12:51.2989263Z azurerm_api_management.api_management: Still creating... [26m20s elapsed]
2020-05-08T22:12:51.3844388Z azurerm_redis_cache.redis: Still creating... [24m10s elapsed]
2020-05-08T22:13:01.2990762Z azurerm_api_management.api_management: Still creating... [26m30s elapsed]
2020-05-08T22:13:01.3847891Z azurerm_redis_cache.redis: Still creating... [24m20s elapsed]
2020-05-08T22:13:11.2993499Z azurerm_api_management.api_management: Still creating... [26m40s elapsed]
2020-05-08T22:13:11.3851763Z azurerm_redis_cache.redis: Still creating... [24m30s elapsed]
2020-05-08T22:13:21.2994810Z azurerm_api_management.api_management: Still creating... [26m50s elapsed]
2020-05-08T22:13:21.3853478Z azurerm_redis_cache.redis: Still creating... [24m40s elapsed]
2020-05-08T22:13:31.2995939Z azurerm_api_management.api_management: Still creating... [27m0s elapsed]
2020-05-08T22:13:31.3853533Z azurerm_redis_cache.redis: Still creating... [24m50s elapsed]
2020-05-08T22:13:41.0583329Z 
2020-05-08T22:13:41.0584681Z Error: rpc error: code = Unavailable desc = transport is closing
2020-05-08T22:13:41.0588236Z 
2020-05-08T22:13:41.0588892Z 
2020-05-08T22:13:41.0589180Z 
2020-05-08T22:13:41.0589684Z Error: rpc error: code = Unavailable desc = transport is closing
2020-05-08T22:13:41.0590201Z 
2020-05-08T22:13:41.0590924Z 
2020-05-08T22:13:41.0771166Z panic: interface conversion: interface {} is nil, not map[string]interface {}
2020-05-08T22:13:41.0772200Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5: 
2020-05-08T22:13:41.0772930Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5: goroutine 165 [running]:
2020-05-08T22:13:41.0774462Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5: github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/apimanagement.expandApiManagementPolicies(0xc000f7e2f0, 0x1, 0x1, 0x3a95d80, 0xc000e20620, 0x1)
2020-05-08T22:13:41.0775869Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/apimanagement/api_management_resource.go:1233 +0x39a
2020-05-08T22:13:41.0777642Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5: github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/apimanagement.resourceArmApiManagementServiceCreateUpdate(0xc0004a9b90, 0x3bd2440, 0xc0006d8780, 0x0, 0x0)
2020-05-08T22:13:41.0779033Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/apimanagement/api_management_resource.go:532 +0x132b
2020-05-08T22:13:41.0780375Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc000181d00, 0xc000e52d70, 0xc00101c3a0, 0x3bd2440, 0xc0006d8780, 0x3bf7301, 0xc001660e38, 0xc000a27c20)
2020-05-08T22:13:41.0781927Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go:305 +0x365
2020-05-08T22:13:41.0783255Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc000a07400, 0xc0015c38e0, 0xc000e52d70, 0xc00101c3a0, 0xc001660dc8, 0xc00000ff20, 0x3bf95a0)
2020-05-08T22:13:41.0784593Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/provider.go:294 +0x99
2020-05-08T22:13:41.0785980Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5: github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc00012ed00, 0x4936540, 0xc0015de570, 0xc0000b8f00, 0xc00012ed00, 0xc0015de570, 0xc000d10a48)
2020-05-08T22:13:41.0787403Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5:  /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:885 +0x882
2020-05-08T22:13:41.0788850Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5: github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x3f82880, 0xc00012ed00, 0x4936540, 0xc0015de570, 0xc0000b8ea0, 0x0, 0x4936540, 0xc0015de570, 0xc0015d6e00, 0x671)
2020-05-08T22:13:41.0790276Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5:  /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:3189 +0x217
2020-05-08T22:13:41.0791549Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5: google.golang.org/grpc.(*Server).processUnaryRPC(0xc00014e2c0, 0x4970660, 0xc000133e00, 0xc000eead00, 0xc0000b7500, 0x74d5100, 0x0, 0x0, 0x0)
2020-05-08T22:13:41.0793013Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:995 +0x460
2020-05-08T22:13:41.0794113Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5: google.golang.org/grpc.(*Server).handleStream(0xc00014e2c0, 0x4970660, 0xc000133e00, 0xc000eead00, 0x0)
2020-05-08T22:13:41.0795272Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:1275 +0xd3d
2020-05-08T22:13:41.0796420Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5: google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0009ac0e0, 0xc00014e2c0, 0x4970660, 0xc000133e00, 0xc000eead00)
2020-05-08T22:13:41.0797606Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:710 +0xa1
2020-05-08T22:13:41.0798591Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5: created by google.golang.org/grpc.(*Server).serveStreams.func1
2020-05-08T22:13:41.0799717Z 2020-05-08T22:13:40.942Z [DEBUG] plugin.terraform-provider-azurerm_v2.9.0_x5:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:708 +0xa1
2020-05-08T22:13:41.0800978Z 2020-05-08T22:13:40.946Z [DEBUG] plugin: plugin process exited: path=/home/vsts/work/r1/a/_CSIE_DevOps/terraform/.terraform/plugins/linux_amd64/terraform-provider-azurerm_v2.9.0_x5 pid=2935 error="exit status 2"
2020-05-08T22:13:41.0802110Z 2020/05/08 22:13:40 [DEBUG] azurerm_redis_cache.redis: apply errored, but we're indicating that via the Error pointer rather than returning it: rpc error: code = Unavailable desc = transport is closing
2020-05-08T22:13:41.0802716Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalMaybeTainted
2020-05-08T22:13:41.0803175Z 2020/05/08 22:13:40 [TRACE] EvalMaybeTainted: azurerm_redis_cache.redis encountered an error during creation, so it is now marked as tainted
2020-05-08T22:13:41.0803647Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalWriteState
2020-05-08T22:13:41.0804031Z 2020/05/08 22:13:40 [TRACE] EvalWriteState: removing state object for azurerm_redis_cache.redis
2020-05-08T22:13:41.0804430Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalApplyProvisioners
2020-05-08T22:13:41.0804877Z 2020/05/08 22:13:40 [TRACE] EvalApplyProvisioners: azurerm_redis_cache.redis has no state, so skipping provisioners
2020-05-08T22:13:41.0805302Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalMaybeTainted
2020-05-08T22:13:41.0805758Z 2020/05/08 22:13:40 [TRACE] EvalMaybeTainted: azurerm_redis_cache.redis encountered an error during creation, so it is now marked as tainted
2020-05-08T22:13:41.0806226Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalWriteState
2020-05-08T22:13:41.0806613Z 2020/05/08 22:13:40 [TRACE] EvalWriteState: removing state object for azurerm_redis_cache.redis
2020-05-08T22:13:41.0807000Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalIf
2020-05-08T22:13:41.0807322Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalIf
2020-05-08T22:13:41.0807652Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalWriteDiff
2020-05-08T22:13:41.0808007Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalApplyPost
2020-05-08T22:13:41.0808465Z 2020/05/08 22:13:40 [ERROR] <root>: eval: *terraform.EvalApplyPost, err: rpc error: code = Unavailable desc = transport is closing
2020-05-08T22:13:41.0809102Z 2020/05/08 22:13:40 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020-05-08T22:13:41.0809606Z 2020/05/08 22:13:40 [TRACE] [walkApply] Exiting eval tree: azurerm_redis_cache.redis
2020-05-08T22:13:41.0810010Z 2020/05/08 22:13:40 [TRACE] vertex "azurerm_redis_cache.redis": visit complete
2020-05-08T22:13:41.0810970Z 2020/05/08 22:13:40 [DEBUG] azurerm_api_management.api_management: apply errored, but we're indicating that via the Error pointer rather than returning it: rpc error: code = Unavailable desc = transport is closing
2020-05-08T22:13:41.0811604Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalMaybeTainted
2020-05-08T22:13:41.0812078Z 2020/05/08 22:13:40 [TRACE] EvalMaybeTainted: azurerm_api_management.api_management encountered an error during creation, so it is now marked as tainted
2020-05-08T22:13:41.0812568Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalWriteState
2020-05-08T22:13:41.0812975Z 2020/05/08 22:13:40 [TRACE] EvalWriteState: removing state object for azurerm_api_management.api_management
2020-05-08T22:13:41.0814094Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalApplyProvisioners
2020-05-08T22:13:41.0814559Z 2020/05/08 22:13:40 [TRACE] EvalApplyProvisioners: azurerm_api_management.api_management has no state, so skipping provisioners
2020-05-08T22:13:41.0815000Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalMaybeTainted
2020-05-08T22:13:41.0815471Z 2020/05/08 22:13:40 [TRACE] EvalMaybeTainted: azurerm_api_management.api_management encountered an error during creation, so it is now marked as tainted
2020-05-08T22:13:41.0815956Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalWriteState
2020-05-08T22:13:41.0816360Z 2020/05/08 22:13:40 [TRACE] EvalWriteState: removing state object for azurerm_api_management.api_management
2020-05-08T22:13:41.0816843Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalIf
2020-05-08T22:13:41.0817180Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalIf
2020-05-08T22:13:41.0817515Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalWriteDiff
2020-05-08T22:13:41.0817943Z 2020/05/08 22:13:40 [TRACE] <root>: eval: *terraform.EvalApplyPost
2020-05-08T22:13:41.0818399Z 2020/05/08 22:13:40 [ERROR] <root>: eval: *terraform.EvalApplyPost, err: rpc error: code = Unavailable desc = transport is closing
2020-05-08T22:13:41.0818984Z 2020/05/08 22:13:40 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020-05-08T22:13:41.0819491Z 2020/05/08 22:13:40 [TRACE] [walkApply] Exiting eval tree: azurerm_api_management.api_management
2020-05-08T22:13:41.0819930Z 2020/05/08 22:13:40 [TRACE] vertex "azurerm_api_management.api_management": visit complete
2020-05-08T22:13:41.0820652Z 2020/05/08 22:13:40 [TRACE] dag/walk: upstream of "meta.count-boundary (EachMode fixup)" errored, so skipping
2020-05-08T22:13:41.0821088Z 2020/05/08 22:13:40 [TRACE] dag/walk: upstream of "provider.azurerm (close)" errored, so skipping
2020-05-08T22:13:41.0821479Z 2020/05/08 22:13:40 [TRACE] dag/walk: upstream of "root" errored, so skipping
2020-05-08T22:13:41.0821999Z 2020-05-08T22:13:41.071Z [DEBUG] plugin: plugin exited
2020-05-08T22:13:41.0822194Z 
2020-05-08T22:13:41.0822284Z 
2020-05-08T22:13:41.0822371Z 
2020-05-08T22:13:41.0822602Z !!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
2020-05-08T22:13:41.0822801Z 
2020-05-08T22:13:41.0823017Z Terraform crashed! This is always indicative of a bug within Terraform.
2020-05-08T22:13:41.0823331Z A crash log has been placed at "crash.log" relative to your current
2020-05-08T22:13:41.0823654Z working directory. It would be immensely helpful if you could please
2020-05-08T22:13:41.0823951Z report the crash with Terraform[1] so that we can fix this.
2020-05-08T22:13:41.0824132Z 
2020-05-08T22:13:41.0824350Z When reporting bugs, please include your terraform version. That
2020-05-08T22:13:41.0824657Z information is available on the first line of crash.log. You can also
2020-05-08T22:13:41.0825196Z get it by running 'terraform --version' on the command line.
2020-05-08T22:13:41.0825396Z 
2020-05-08T22:13:41.0825612Z SECURITY WARNING: the "crash.log" file that was created may contain 
2020-05-08T22:13:41.0825933Z sensitive information that must be redacted before it is safe to share 
2020-05-08T22:13:41.0826175Z on the issue tracker.
2020-05-08T22:13:41.0826314Z 
2020-05-08T22:13:41.0826504Z [1]: https://github.com/hashicorp/terraform/issues
2020-05-08T22:13:41.0826676Z 
2020-05-08T22:13:41.0826889Z !!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Expected Behavior

Successfully create redis cache

Actual Behavior

Panic - other subsequent runs will output rpc error: code = Unavailable desc = transport is closing

Steps to Reproduce

  1. terraform apply

Important Factoids

References

Japeth commented 4 years ago

FYI I get the same type of error when creating azurerm_api_management

ghost commented 4 years ago

This has been released in version 2.10.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.10.0"
}
# ... other configuration ...
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!