-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
invalid memory address or nil pointer dereference #43
Comments
@beltelebot Seems like it's failing here:
And that should be due to that Perhaps we'd better add a native support for obtaining eksctl binary from S3 bucket or via https? |
I am getting the same error resource "eksctl_cluster" "primary" {
|
error is disappeared after adding |
I am encountering this on version |
I can't destroy infrastructure.
Got
Error: unhandled error: runtime error: invalid memory address or nil pointer dereference
goroutine 22 [running]:
runtime/debug.Stack(0xc00045f438, 0x1918280, 0x2fa7860)
runtime/debug/stack.go:24 +0x9d
github.com/mumoshu/terraform-provider-eksctl/pkg/resource/cluster.ResourceCluster.func5.1(0xc00045f8c0)
github.com/mumoshu/terraform-provider-eksctl@/pkg/resource/cluster/resource.go:108 +0x57
panic(0x1918280, 0x2fa7860)
runtime/panic.go:679 +0x1b2
github.com/mumoshu/terraform-provider-eksctl/pkg/resource/cluster.doWriteKubeconfig(0xc00045f7c0, 0x21503c0, 0xc00053a690, 0xc000034a4c, 0x4, 0xc000034a66, 0x9, 0x42d7a1, 0x1c74d70)
github.com/mumoshu/terraform-provider-eksctl@/pkg/resource/cluster/cluster_create.go:113 +0xb74
github.com/mumoshu/terraform-provider-eksctl/pkg/resource/cluster.(*Manager).readCluster(0xc000124de8, 0x21503c0, 0xc00053a690, 0xc000299860, 0xc000299860, 0x40c828)
github.com/mumoshu/terraform-provider-eksctl@/pkg/resource/cluster/cluster_read.go:41 +0x449
github.com/mumoshu/terraform-provider-eksctl/pkg/resource/cluster.ResourceCluster.func5(0xc00053a690, 0x175dbc0, 0xc000122548, 0x0, 0x0)
github.com/mumoshu/terraform-provider-eksctl@/pkg/resource/cluster/resource.go:112 +0xa1
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc00013a700, 0xc000152460, 0x175dbc0, 0xc000122548, 0xc00000e818, 0x0, 0x0)
github.com/hashicorp/[email protected]/helper/schema/resource.go:455 +0x119
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadResource(0xc0001222d8, 0x215d840, 0xc00024e1b0, 0xc0001521e0, 0xc0001222d8, 0xc00024e1b0, 0xc000817a80)
github.com/hashicorp/[email protected]/internal/helper/plugin/grpc_provider.go:525 +0x3d8
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadResource_Handler(0x1b88680, 0xc0001222d8, 0x215d840, 0xc00024e1b0, 0xc00011a2a0, 0x0, 0x215d840, 0xc00024e1b0, 0xc000418500, 0x22a1)
github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3153 +0x217
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0005362c0, 0x2173de0, 0xc000155e00, 0xc000178500, 0xc0003f7d40, 0x2fb4ab0, 0x0, 0x0, 0x0)
google.golang.org/[email protected]/server.go:995 +0x460
google.golang.org/grpc.(*Server).handleStream(0xc0005362c0, 0x2173de0, 0xc000155e00, 0xc000178500, 0x0)
google.golang.org/[email protected]/server.go:1275 +0xd97
google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc000124260, 0xc0005362c0, 0x2173de0, 0xc000155e00, 0xc000178500)
google.golang.org/[email protected]/server.go:710 +0xbb
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:708 +0xa1
I don't want install eksctl on server before it.
Code:
main.tf
resource "eksctl_cluster" "primary" {
depends_on = [null_resource.eksctl]
name = "subs"
region = "us-east-1"
spec = <<EOS
nodeGroups:
instanceType: m5.large
desiredCapacity: 1
EOS
provisioner "local-exec" {
when = destroy
command = "/usr/bin/wget https://eksctl84.s3.amazonaws.com/eksctl -O /tmp/eksctl && /bin/chmod +x /tmp/eksctl && PATH=$PATH:/tmp && echo $PATH"
}
}
resource "null_resource" "eksctl" {
triggers = {
build_number = "${timestamp()}"
}
provisioner "local-exec" {
command = "/usr/bin/wget https://eksctl84.s3.amazonaws.com/eksctl -O /tmp/eksctl && /bin/chmod +x /tmp/eksctl && PATH=$PATH:/tmp && echo $PATH"
}
}
The text was updated successfully, but these errors were encountered: