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

terraform 0.12 crash on CTRL-C during updating azurerm resources #21485

Closed
J00MZ opened this issue May 28, 2019 · 3 comments
Closed

terraform 0.12 crash on CTRL-C during updating azurerm resources #21485

J00MZ opened this issue May 28, 2019 · 3 comments

Comments

@J00MZ
Copy link
Contributor

J00MZ commented May 28, 2019

Terraform Version

$ terraform_0.12.0 version
Terraform v0.12.0
+ provider.azurerm v1.29.0

Terraform Configuration Files

resource "azurerm_resource_group" "redis_resource_group" {
  count    = 25
  name     = "${format("MetroRedisCaches-%02d", count.index)}"
  location = "northeurope"
}

variable "sp_id" {
  default = "<SP_ID>"
}

locals {
  res_group_ids = "${azurerm_resource_group.redis_resource_group.*.id}"
}


resource "azurerm_role_assignment" "redis_permission" {
  count                = "${length(local.res_group_ids)}"
  scope                = "${element(local.res_group_ids, count.index)}"
  role_definition_name = "Contributor"
  principal_id         = "${var.sp_id}"
}

data "azurerm_client_config" "current" {}

output "account_id" {
  value = "${data.azurerm_client_config.current.service_principal_application_id}"
}

Crash Output

See crash.log

Expected Behavior

CTRL-C exits cleanly

Actual Behavior

Terraform crashes on exit with below message

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

[1]: https://github.com/hashicorp/terraform/issues

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
  on main.tf line 16, in resource "azurerm_role_assignment" "redis_permission":
  16: resource "azurerm_role_assignment" "redis_permission" {

Steps to Reproduce

  1. terraform init
  2. terraform apply
@bflad
Copy link
Contributor

bflad commented May 28, 2019

Hi @J00MZ 👋 Sorry you ran into trouble here and thank you for reporting it. Looking at the relevant portion of the crash log (below), this appears to be an issue within the code of the Terraform AzureRM Provider. I'm going to have our GitHub bot automatically migrate this issue.

2019-05-28T17:58:09.548+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.29.0_x4: panic: runtime error: invalid memory address or nil pointer dereference
2019-05-28T17:58:09.548+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.29.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x2a0bdc4]
2019-05-28T17:58:09.548+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.29.0_x4: 
2019-05-28T17:58:09.548+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.29.0_x4: goroutine 2059 [running]:
2019-05-28T17:58:09.548+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.29.0_x4: github.com/terraform-providers/terraform-provider-azurerm/azurerm.retryRoleAssignmentsClient.func1(0xc0000c15e0)
2019-05-28T17:58:09.548+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.29.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/resource_arm_role_assignment.go:223 +0x1d4
2019-05-28T17:58:09.548+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.29.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/resource.Retry.func1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
2019-05-28T17:58:09.548+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.29.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/resource/wait.go:22 +0x4e
2019-05-28T17:58:09.548+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.29.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/resource.(*StateChangeConf).WaitForState.func1(0xc0005ea900, 0xc0005aff10, 0xc00015d400, 0xc00090bc20, 0xc00054f1f0, 0xc00054f1e8)
2019-05-28T17:58:09.548+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.29.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/resource/state.go:103 +0x29e
2019-05-28T17:58:09.548+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.29.0_x4: created by github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/resource.(*StateChangeConf).WaitForState
2019-05-28T17:58:09.548+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.29.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/resource/state.go:80 +0x1b9

@ghost
Copy link

ghost commented May 28, 2019

This issue has been automatically migrated to hashicorp/terraform-provider-azurerm#3537 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-azurerm#3537.

@ghost ghost closed this as completed May 28, 2019
@ghost
Copy link

ghost commented Jul 25, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 25, 2019
This issue was closed.
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