Regression: Provider crashes when creating aws_sagemaker_endpoint_configuration
parviste-fortum opened this issue · 0 comments
parviste-fortum commented
The root cause is of course in the AWS provider itself, but since I don't really have time to investigate it further and provide a minimal example, I report it here first.
When running terrform apply
the AWS provider (version 5.20.1) crashes, giving
module.generative_model.aws_sagemaker_endpoint_configuration.huggingface_async[0]: Creating...
╷
│ Error: Request cancelled
│
│ with module.generative_model.aws_sagemaker_endpoint_configuration.huggingface_async[0],
│ on .terraform/modules/generative_model/main.tf line 182, in resource "aws_sagemaker_endpoint_configuration" "huggingface_async":
│ 182: resource "aws_sagemaker_endpoint_configuration" "huggingface_async" {
│
│ The plugin.(*GRPCProvider).ApplyResourceChange request was cancelled.
╵
Releasing state lock. This may take a few moments...
Stack trace from the terraform-provider-aws_v5.20.1_x5 plugin:
panic: interface conversion: interface {} is nil, not map[string]interface {}
goroutine 52 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker.expandEndpointConfigNotificationConfig({0xc002ba59b0?, 0xc002ba9770?, 0xdcb7ac6?})
github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker/endpoint_configuration.go:900 +0x247
github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker.expandEndpointConfigOutputConfig({0xc002ba5970?, 0xc002ba96e0?, 0xdc72cd0?})
github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker/endpoint_configuration.go:889 +0x286
github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker.expandEndpointConfigAsyncInferenceConfig({0xc002ba5940?, 0xdcdd407?, 0x0?})
github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker/endpoint_configuration.go:847 +0x1e6
github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker.resourceEndpointConfigurationCreate({0xefaca80, 0xc002ba8ff0}, 0x0?, {0xdbe43c0?, 0xc0028dbb20?})
github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker/endpoint_configuration.go:527 +0x470
github.com/hashicorp/terraform-provider-aws/internal/provider.interceptedHandler[...].func1(0x0?, {0xdbe43c0?, 0xc0028dbb20?})
github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:111 +0x34b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xefaca80?, {0xefaca80?, 0xc006da3020?}, 0xd?, {0xdbe43c0?, 0xc0028dbb20?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource.go:773 +0x87
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0015eab60, {0xefaca80, 0xc006da3020}, 0xc006dd11e0, 0xc002304880, {0xdbe43c0, 0xc0028dbb20})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource.go:909 +0xa7e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc0018bb9e0, {0xefaca80?, 0xc006da2f00?}, 0xc0017f0370)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/grpc_provider.go:1060 +0xe8d
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xefac9d8?, {0xefaca80?, 0xc006da2bd0?}, 0xc0017f0370)
github.com/hashicorp/terraform-plugin-mux@v0.12.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x1b5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc000357860, {0xefaca80?, 0xc006da21e0?}, 0xc0003ba070)
github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov5/tf5server/server.go:859 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xd96e180?, 0xc000357860}, {0xefaca80, 0xc006da21e0}, 0xc0003ba000, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:467 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000232d20, {0xefba1c0, 0xc00056c680}, 0xc006da8000, 0xc00299e9c0, 0x153f7858, 0x0)
google.golang.org/grpc@v1.57.0/server.go:1360 +0xe23
google.golang.org/grpc.(*Server).handleStream(0xc000232d20, {0xefba1c0, 0xc00056c680}, 0xc006da8000, 0x0)
google.golang.org/grpc@v1.57.0/server.go:1737 +0xa36
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/grpc@v1.57.0/server.go:982 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/grpc@v1.57.0/server.go:980 +0x18c
Error: The terraform-provider-aws_v5.20.1_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.
This seems to have been introduced in ac492cd. Maybe since it was not caught during development it works with some older version of the AWS provider, so until it has been fixed in the provider itself it might be necessary to specify a version constraint on the provider here?