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

Plugin v3.87.0 crashes #10291

Closed
ghost opened this issue Oct 11, 2021 · 7 comments
Closed

Plugin v3.87.0 crashes #10291

ghost opened this issue Oct 11, 2021 · 7 comments
Assignees

Comments

@ghost
Copy link

ghost commented Oct 11, 2021

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.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

Terraform v1.0.8

Affected Resource(s)

  • google.resourceComputeInstanceTemplateRead
  • beta.resourceComputeRegionInstanceGroupManagerRead

Terraform Configuration Files

resource "google_compute_instance_template" "template" {
  project      = google_project.project.project_id
  region       = "us-central1"
  name_prefix  = "template-"
  description  = "Instance template"
  machine_type = "n1-standard-8"

  network_interface {
    subnetwork = data.google_compute_subnetwork.subnetwork.self_link
  }

  scheduling {
    automatic_restart   = true
    on_host_maintenance = "MIGRATE"
    preemptible         = false
  }

  // Boot Disk
  disk {
    source_image = "my-image"
    type         = "PERSISTENT"
    disk_type    = "pd-ssd"
    disk_size_gb = 25
    mode         = "READ_WRITE"
    boot         = true
  }

  // Data Disk
  disk {
    type         = "PERSISTENT"
    disk_type    = "pd-ssd" // Can change to local-ssd if needed for Vault performance
    disk_size_gb = 50
    mode         = "READ_WRITE"
    device_name  = "vault_data"
  }

  service_account {
    email  = google_service_account.sa.email
    scopes = ["https://www.googleapis.com/auth/cloud-platform"]
  }

  metadata_startup_script = templatefile(
    "${path.module}/template_file",
    {
      ...stuff
    }
  )

  metadata = {
   ...
  }

  lifecycle {
    create_before_destroy = true
  }
}

resource "google_compute_region_instance_group_manager" "mig" {
  provider = google-beta
  project  = google_project.projecct.project_id
  name     = "my-mig"
  region   = "us-central1"

  base_instance_name = "mig-instance"
  wait_for_instances = true
  target_size        = 3

  target_pools = []

  named_port {
    name = "https"
    port = 443
  }

  stateful_disk {
    device_name = "data"
    delete_rule = "ON_PERMANENT_INSTANCE_DELETION"
  }

  version {
    instance_template = google_compute_instance_template.template.self_link
  }

  update_policy {
    type                         = "OPPORTUNISTIC"
    minimal_action               = "RESTART"
    min_ready_sec                = 180
    max_unavailable_fixed        = 3
    instance_redistribution_type = "NONE"
  }

  timeouts {
    create = "15m"
    update = "15m"
  }

  lifecycle {
    create_before_destroy = true
  }
}

Panic Output

Stack trace from the terraform-provider-google_v3.87.0_x5 plugin:

panic: interface conversion: interface {} is nil, not *google.Config

goroutine 165 [running]:
github.com/hashicorp/terraform-provider-google/google.resourceComputeInstanceTemplateRead(0xc000787000, 0x0, 0x0, 0x44e5790, 0xc000070400)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-google/google/resource_compute_instance_template.go:1215 +0x29d3
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc0005b9960, 0x359b860, 0xc000958980, 0xc000787000, 0x0, 0x0, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:335 +0x1ee
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0005b9960, 0x359b860, 0xc000958980, 0xc000af01c0, 0x0, 0x0, 0xc00000f130, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:624 +0x1cb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc0000dd800, 0x359b860, 0xc000958980, 0xc0009589c0, 0xc000958980, 0x40ba05, 0x2dce580)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:575 +0x43b
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ReadResource(0xc000b50de0, 0x359b908, 0xc000958980, 0xc001041ce0, 0xc000b50de0, 0xc000a708d0, 0xc000107ba0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/server/server.go:298 +0x105
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(0x2f8a2c0, 0xc000b50de0, 0x359b908, 0xc000a708d0, 0xc001041c80, 0x0, 0x359b908, 0xc000a708d0, 0xc000a7a000, 0x2c29)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0004036c0, 0x35d9bf8, 0xc000001500, 0xc000a0ec60, 0xc000720990, 0x44a2990, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:1297 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc0004036c0, 0x35d9bf8, 0xc000001500, 0xc000a0ec60, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:1626 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0000c9330, 0xc0004036c0, 0x35d9bf8, 0xc000001500, 0xc000a0ec60)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:941 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:939 +0x1fd

Error: The terraform-provider-google_v3.87.0_x5 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.


Stack trace from the terraform-provider-google-beta_v3.87.0_x5 plugin:

panic: interface conversion: interface {} is nil, not *google.Config

goroutine 34 [running]:
github.com/hashicorp/terraform-provider-google-beta/google-beta.resourceComputeRegionInstanceGroupManagerRead(0xc000205280, 0x0, 0x0, 0x4822db0, 0xc0001d7400)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-google-beta/google-beta/resource_compute_region_instance_group_manager.go:525 +0x15a7
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc00083f880, 0x3804800, 0xc000e99580, 0xc000205280, 0x0, 0x0, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:335 +0x1ee
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc00083f880, 0x3804800, 0xc000e99580, 0xc00037ca80, 0x0, 0x0, 0xc00000ec28, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:624 +0x1cb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc0008fc1e0, 0x3804800, 0xc000e99580, 0xc000e995c0, 0xc000e99580, 0x40ba05, 0x2fe59e0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:575 +0x43b
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ReadResource(0xc000f440c0, 0x38048a8, 0xc000e99580, 0xc000ebe240, 0xc000f440c0, 0xc000ea9aa0, 0xc000f51ba0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/server/server.go:298 +0x105
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(0x31a6ba0, 0xc000f440c0, 0x38048a8, 0xc000ea9aa0, 0xc000ebe1e0, 0x0, 0x38048a8, 0xc000ea9aa0, 0xc000981500, 0x684)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001c6540, 0x3845d38, 0xc000001380, 0xc000c16000, 0xc0001fa990, 0x47dfbf0, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:1297 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc0001c6540, 0x3845d38, 0xc000001380, 0xc000c16000, 0x0)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:1626 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc00004e280, 0xc0001c6540, 0x3845d38, 0xc000001380, 0xc000c16000)
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:941 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:939 +0x1fd

Error: The terraform-provider-google-beta_v3.87.0_x5 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.
@ghost ghost added the bug label Oct 11, 2021
@github-actions github-actions bot added the crash label Oct 11, 2021
@ghost
Copy link
Author

ghost commented Oct 11, 2021

I think this should be a straight-forward fix, but please let me know if more information is needed. Thanks!

@edwardmedia edwardmedia self-assigned this Oct 11, 2021
@edwardmedia
Copy link
Contributor

@dv-stephen do you have the config that can be used to repro the issue?

@ghost
Copy link
Author

ghost commented Oct 12, 2021

@edwardmedia It's a very large terraform run with a lot that I can't post here, but I updated the issue with the two [modified] resources that are most likely being affected.

@edwardmedia
Copy link
Contributor

@dv-stephen using your config, I can't repro the issue. Are you able to hit the error with the config?

@ghost
Copy link
Author

ghost commented Oct 14, 2021

@edwardmedia I don't have an isolated example that reproduces the problem. If this is not a problem you can fix from the stack trace, feel free to close.

@edwardmedia
Copy link
Contributor

@dv-stephen I can't repro the issue. Closing now. Please reopen if you can get an example to repro it. Thanks

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2021
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

1 participant