hashicorp / terraform-provider-awscc

Terraform AWS Cloud Control provider
https://registry.terraform.io/providers/hashicorp/awscc/latest/docs
Mozilla Public License 2.0
248 stars 113 forks source link

The plugin6.(*GRPCProvider).ConfigureProvider request was cancelled. #1808

Closed syphernl closed 2 months ago

syphernl commented 2 months ago

Community Note

Terraform CLI and Terraform AWS Cloud Control Provider Version

Terraform v1.8.5
on linux_amd64
+ provider registry.terraform.io/cloudposse/awsutils v0.19.1
+ provider registry.terraform.io/gitlabhq/gitlab v17.0.1
+ provider registry.terraform.io/hashicorp/aws v4.67.0
+ provider registry.terraform.io/hashicorp/awscc v0.78.0
+ provider registry.terraform.io/hashicorp/local v2.5.1
+ provider registry.terraform.io/hashicorp/null v3.2.2
+ provider registry.terraform.io/hashicorp/random v3.6.2
+ provider registry.terraform.io/hashicorp/template v2.2.0
+ provider registry.terraform.io/hashicorp/time v0.11.2
+ provider registry.terraform.io/integrations/github v6.2.1
+ provider registry.terraform.io/jianyuan/sentry v0.13.0

Affected Resource(s)

Terraform Configuration Files

provider "awscc" {
  region = var.aws_region
}

Stack Trace

Stack trace from the terraform-provider-awscc_v1.1.0_x5 plugin:
panic: Go Duration ValueDuration Error
Duration string value is null
goroutine 11 [running]:
github.com/hashicorp/terraform-provider-awscc/internal/errs.Must[...](...)
    github.com/hashicorp/terraform-provider-awscc/internal/errs/must.go:13
github.com/hashicorp/terraform-provider-awscc/internal/errs/diag.Must[...](...)
    github.com/hashicorp/terraform-provider-awscc/internal/errs/diag/must.go:17
github.com/hashicorp/terraform-provider-awscc/internal/provider.assumeRoleWithWebIdentityData.Config({{{0x0, {0x0, 0x0}}}, {{0x0, {0x0, 0x0}}}, {{0x0, 0x0, 0x0}, {0x31b0678, ...}, ...}, ...})
    github.com/hashicorp/terraform-provider-awscc/internal/provider/provider.go:341 +0x347
github.com/hashicorp/terraform-provider-awscc/internal/provider.newProviderData({0x31ad308, 0xc0004c8b70}, 0xc0004ee000)
    github.com/hashicorp/terraform-provider-awscc/internal/provider/provider.go:483 +0xbbb
github.com/hashicorp/terraform-provider-awscc/internal/provider.(*ccProvider).Configure(0xc000104a90, {0x31ad308, 0xc0004c8b70}, {{0xc000012148, 0x5}, {{{0x31b36d0, 0xc0004e0c90}, {0x2105720, 0xc0004e04b0}}, {0x31e0a88, ...}}, ...}, ...)
    github.com/hashicorp/terraform-provider-awscc/internal/provider/provider.go:373 +0x21f
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ConfigureProvider(0xc000232960, {0x31ad308, 0xc0004c8b70}, 0xc0000ba690, 0xc0001218c0)
    github.com/hashicorp/terraform-plugin-framework@v1.9.0/internal/fwserver/server_configureprovider.go:18 +0x132
github.com/hashicorp/terraform-plugin-framework/internal/proto6server.(*Server).ConfigureProvider(0xc000232960, {0x31ad308?, 0xc0004c8a80?}, 0xc0000ae100)
    github.com/hashicorp/terraform-plugin-framework@v1.9.0/internal/proto6server/server_configureprovider.go:39 +0x2c5
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ConfigureProvider(0xc00029fae0, {0x31ad308?, 0xc0004c8210?}, 0xc0000ba140)
    github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov6/tf6server/server.go:559 +0x35a
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ConfigureProvider_Handler({0x221e0c0, 0xc00029fae0}, {0x31ad308, 0xc0004c8210}, 0xc00018e000, 0x0)
    github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:464 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001bb000, {0x31ad308, 0xc0004c8180}, {0x31de600, 0xc000002180}, 0xc0004cc000, 0xc00037b650, 0x40af130, 0x0)
    google.golang.org/grpc@v1.63.2/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc0001bb000, {0x31de600, 0xc000002180}, 0xc0004cc000)
    google.golang.org/grpc@v1.63.2/server.go:1780 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
    google.golang.org/grpc@v1.63.2/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 7
    google.golang.org/grpc@v1.63.2/server.go:1030 +0x125
Error: The terraform-provider-awscc_v1.1.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.
Unexpected exit code generated by command 'terraform plan -out=test_plan.tfplan -detailed-exitcode': 1

Steps to Reproduce

  1. Upgrade awscc from 0.78.0 -> 1.1.0 and run terraform plan
bootswithdefer commented 2 months ago

1.0.0 works, 1.1.0 broke. Adding duration to the provider works around the issue.

provider "awscc" {
  region = var.region

  assume_role = {
    role_arn = var.admin_role_arn
    duration = "1h"
  }
}