I am getting what I think is an underlying TF erro...
# aws
s
I am getting what I think is an underlying TF error during preview when I
pulumi up
that is associated with the
aws.apigateway.VpcLink()
resource.
Copy code
Diagnostics:
  aws:apigateway:VpcLink (testing-alb-vpc-link):
    error: Preview failed: error reading from server: EOF
 
  pulumi:pulumi:Stack (bioinfo-tools-app-infra-testing):
    panic: Error reading level config: '' expected type 'string', got unconvertible type '[]interface {}', value: '[74D93920-ED26-11E3-AC10-0800200C9A66]'
    goroutine 31 [running]:
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).get(0xc001ffa100|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).get(0xc001ffa100>, 0xc002185be0, 0x1, 0x1, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/resource_data.go:553 +0x429
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).getChange(0xc001ffa100|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).getChange(0xc001ffa100>, 0x79f2a96, 0xb, 0xc002df1201, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/resource_data.go:524 +0x125
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).diffChange(0xc001ffa100|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).diffChange(0xc001ffa100>, 0x79f2a96, 0xb, 0xb, 0x0, 0x0, 0x1, 0xc00090e540)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/resource_data.go:501 +0x97
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.diffList(0xc000f73380|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.diffList(0xc000f73380>, 0x79f2a96, 0xb, 0xc000f9f040, 0xc001b71278, 0x853c770, 0xc001ffa100, 0x203000, 0x0, 0x0)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/schema.go:997 +0x66
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.diff(0xc000f73380|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.diff(0xc000f73380>, 0x79f2a96, 0xb, 0xc000f9f040, 0xc001f719a0, 0x853c770, 0xc001ffa100, 0xc002df7400, 0x0, 0x0)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/schema.go:958 +0x473
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0xc000f73380|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0xc000f73380>, 0x85220d8, 0xc0000500d0, 0x0, 0xc001fbbc50, 0x0, 0x6c87740, 0xc0020d8000, 0xc001936900, 0xc001fbbc20, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/schema.go:521 +0x219
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).SimpleDiff(0xc000fa0000|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).SimpleDiff(0xc000fa0000>, 0x85220d8, 0xc0000500d0, 0x0, 0xc001fbbc50, 0x6c87740, 0xc0020d8000, 0x0, 0x0, 0xc000011040)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/resource.go:446 +0x9f
    <http://github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfshim/sdk-v2.v2Provider.Diff(0xc001936960|github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfshim/sdk-v2.v2Provider.Diff(0xc001936960>, 0x7a475e2, 0x18, 0x0, 0x0, 0x8466f80, 0xc001fbbc50, 0x8466f80, 0xc001fbbc50, 0xc001fbbbc0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.21.0/pkg/tfshim/sdk-v2/provider.go:99 +0x1cc
    <http://github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.(*Provider).Create(0xc00000ab40|github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.(*Provider).Create(0xc00000ab40>, 0x8522148, 0xc001fbbb00, 0xc001fbe820, 0xc00000ab40, 0x6beba01, 0xc001fc1fc0)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.21.0/pkg/tfbridge/provider.go:772 +0x508
    <http://github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Create_Handler.func1(0x8522148|github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Create_Handler.func1(0x8522148>, 0xc001fbbb00, 0x776f4c0, 0xc001fbe820, 0x77cbf00, 0xc6decc0, 0x8522148, 0xc001fbbb00)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.22.1-0.20210310211618-1f16423ede4c/proto/go/provider.pb.go:2269 +0x89
    <http://github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x8522148|github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x8522148>, 0xc001fbba70, 0x776f4c0, 0xc001fbe820, 0xc001f71860, 0xc001fabe90, 0x0, 0x0, 0x8452aa0, 0xc000444b20)
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x30a
    <http://github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Create_Handler(0x78cf740|github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Create_Handler(0x78cf740>, 0xc00000ab40, 0x8522148, 0xc001fbba70, 0xc001eefc80, 0xc001921900, 0x8522148, 0xc001fbba70, 0xc001f792c0, 0x12c)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.22.1-0.20210310211618-1f16423ede4c/proto/go/provider.pb.go:2271 +0x150
    <http://google.golang.org/grpc.(*Server).processUnaryRPC(0xc0006ccc40|google.golang.org/grpc.(*Server).processUnaryRPC(0xc0006ccc40>, 0x8543bf8, 0xc000a5a300, 0xc001e34500, 0xc001a33ec0, 0xc69c8a8, 0x0, 0x0, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.34.0/server.go:1210 +0x52b
    <http://google.golang.org/grpc.(*Server).handleStream(0xc0006ccc40|google.golang.org/grpc.(*Server).handleStream(0xc0006ccc40>, 0x8543bf8, 0xc000a5a300, 0xc001e34500, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.34.0/server.go:1533 +0xd0c
    <http://google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000a34050|google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000a34050>, 0xc0006ccc40, 0x8543bf8, 0xc000a5a300, 0xc001e34500)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.34.0/server.go:871 +0xab
    created by <http://google.golang.org/grpc.(*Server).serveStreams.func1|google.golang.org/grpc.(*Server).serveStreams.func1>
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.34.0/server.go:869 +0x1fd
code snippet that is generating the VpcLink:
Copy code
load_balancer = aws.lb.LoadBalancer(f'{env}-bta-alb',
    load_balancer_type = "network",
    internal = True,
    security_groups = [load_balancer_security_group.id],
    subnets = [private_subnets[0].id, private_subnets[1].id])

load_balancer_vpc_link = aws.apigateway.VpcLink(f"{env}-alb-vpc-link",
    description="enable apigateway-to-alb connection in private subnets",
    target_arn=[load_balancer.arn])
When I comment out the
VpcLink
the preview runs through. Any guidance on how to debug?
l
Looks more like a type error? There's no Terraform code actually run in Pulumi; this error is saying that a schema (presumably loaded from a Terraform library) has been violated.
Error reading level config: '' expected type 'string', got unconvertible type '[]interface {}', value: '[74D93920-ED26-11E3-AC10-0800200C9A66]'
Does a VPC link require an array of ARNs?
s
It is a bit confusing as under inputs it says
str
, but then says โ€œThe list of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.โ€
But that is a good idea - I will try just the arn alone.
l
The GUID is also a hint.. nothing in there should be a GUID, they should all be ARNs, so if you can find where that's coming from, it'll help.
s
๐Ÿ‘