Skip to content

Instantly share code, notes, and snippets.

@masterqwerty
Created November 19, 2021 20:26
Show Gist options
  • Save masterqwerty/e1b55abeffa28b8fe017b356189352b3 to your computer and use it in GitHub Desktop.
Save masterqwerty/e1b55abeffa28b8fe017b356189352b3 to your computer and use it in GitHub Desktop.
Terraform AWS provider crash report when creating a cloudfront cache policy that is missing required values in the Terraform file.
Stack trace from the terraform-provider-aws_v3.65.0_x5 plugin:
panic: interface conversion: interface {} is nil, not map[string]interface {}
goroutine 103 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/cloudfront.expandParametersInCacheKeyAndForwardedToOrigin(0xc001b82db0, 0x90bd1ee)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-aws/internal/service/cloudfront/cache_policy.go:317 +0x3d2
github.com/hashicorp/terraform-provider-aws/internal/service/cloudfront.resourceCachePolicyCreate(0xc001ad3600, 0x7d42040, 0xc00263f200, 0x1, 0xffffffffffffffff)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-aws/internal/service/cloudfront/cache_policy.go:181 +0x2be
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc000a94fc0, 0x9eab748, 0xc00178df40, 0xc001ad3600, 0x7d42040, 0xc00263f200, 0x0, 0x0, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/gdavison/terraform-plugin-sdk/v2@v2.7.1-0.20210913224932-c7c2dbd9e010/helper/schema/resource.go:318 +0x1ee
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000a94fc0, 0x9eab748, 0xc00178df40, 0xc000a31730, 0xc001625ce0, 0x7d42040, 0xc00263f200, 0x0, 0x0, 0x0, ...)
/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/gdavison/terraform-plugin-sdk/v2@v2.7.1-0.20210913224932-c7c2dbd9e010/helper/schema/resource.go:456 +0x67b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00000cf00, 0x9eab748, 0xc00178df40, 0xc001a49ef0, 0xc00178df40, 0x8d0bac0, 0xc001acb700)
/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/gdavison/terraform-plugin-sdk/v2@v2.7.1-0.20210913224932-c7c2dbd9e010/helper/schema/grpc_provider.go:955 +0x8ef
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ApplyResourceChange(0xc0019d18c0, 0x9eab7f0, 0xc00178df40, 0xc000a31340, 0xc0019d18c0, 0xc001acb7a0, 0xc001a1aba0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/server/server.go:332 +0xb5
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x8d0bac0, 0xc0019d18c0, 0x9eab7f0, 0xc001acb7a0, 0xc001ae2060, 0x0, 0x9eab7f0, 0xc001acb7a0, 0xc001878a80, 0x34f)
/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:380 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000295880, 0x9ed6558, 0xc001a80180, 0xc000308c00, 0xc00061a9c0, 0xe76f840, 0x0, 0x0, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1194 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc000295880, 0x9ed6558, 0xc001a80180, 0xc000308c00, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1517 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000e48cd0, 0xc000295880, 0x9ed6558, 0xc001a80180, 0xc000308c00)
/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:859 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
/opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:857 +0x1fd
Error: The terraform-provider-aws_v3.65.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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment