https://pulumi.com logo
#aws
Title
# aws
g

gorgeous-lunch-7514

12/04/2023, 10:27 AM
We’re getting a panic on the most recent versions of @pulumi/aws, prior to that we were getting failures in deployment with a “diff” on redrive policy for SQS, is this a known issue?
a

adorable-house-61348

12/04/2023, 10:30 AM
Hi Anosh, thanks for reporting. This doesn't sound like a known issue, so it'd be really helpful if you can provide some minimal repro for it!
g

gorgeous-lunch-7514

12/04/2023, 11:32 AM
It should, I’ve gone back to v5 and started reading the migration guide. With v5 actually not panicking we’re still getting a
redrivePolicy
issue.
5.43.0
to be clear.
Copy code
~  aws:sqs:Queue dev-xxxxx-queue updating (131s) [diff: ~redrivePolicy]; error: 1 error occurred:
   ~  aws:sqs:Queue dev-xxxxx-queue **updating failed** [diff: ~redrivePolicy]; error: 1 error occurred:
  @ updating.....
      pulumi:pulumi:Stack app-svcs-dev running error: update failed
      pulumi:pulumi:Stack app-svcs-dev **failed** 1 error
  Diagnostics:
    aws:sqs:Queue (dev-xxxxx-queue):
      error: 1 error occurred:
      	* updating urn:pulumi:dev::app-svcs::aws:sqs/queue:Queue::dev-xxxx-queue: 1 error occurred:
      	* waiting for SQS Queue (<https://sqs.eu-west-2.amazonaws.com/xxxxxx/dev-xxxxx-queue-02b9f4c.fifo>) attributes update: timeout while waiting for state to become 'equal' (last state: 'notequal', timeout: 2m0s)
a

adorable-house-61348

12/04/2023, 11:41 AM
That looks like this upstream error. You could try one of the suggested workaround there perhaps? Do you have logs from the panic you initially mentioned or some example code which triggers it?
g

gorgeous-lunch-7514

12/04/2023, 11:42 AM
aye it’s been driving me crazy, i saw that thread too. I’ll paste the logs from the panic from ~v6. Unfortunately I don’t think I have the bandwidth at the moment to nail down what part of our typescript is causing it.
Copy code
aws:sqs:Queue (dev-suggested-materials-queue):
      error: connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:40677: connect: connection refused"
  
    pulumi:pulumi:Stack (app-svcs-dev):
      panic: interface conversion: interface {} is nil, not map[string]interface {}
      goroutine 99 [running]:
      <http://github.com/hashicorp/go-cty/cty.Value.GetAttr({{{0xfda3ba0|github.com/hashicorp/go-cty/cty.Value.GetAttr({{{0xfda3ba0>?, 0xc00a151eb8?}}, {0x0?, 0x0?}}, {0xe7906f1, 0x8})
      	/home/runner/go/pkg/mod/github.com/hashicorp/go-cty@v1.4.1-0.20200723130312-85980079f637/cty/value_ops.go:711 +0x2de
      <http://github.com/hashicorp/terraform-provider-aws/internal/provider.tagsResourceInterceptor.run({0xc00311ab20|github.com/hashicorp/terraform-provider-aws/internal/provider.tagsResourceInterceptor.run({0xc00311ab20>?, 0xea8b068?, 0xea8b060?}, {0xfda36c0, 0xc00920ff50}, {0xfdb4b50, 0xc008025d80}, {0xe723c00?, 0xc000488000?}, 0x1, ...)
      	/home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/provider/intercept.go:250 +0x143a
      <http://github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Update.interceptedHandler[...].func10(0xcc12aa0|github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Update.interceptedHandler[...].func10(0xcc12aa0>?, {0xe723c00?, 0xc000488000?})
      	/home/runner/work/pulumi-aws/pulumi-aws/upstream/internal/provider/intercept.go:100 +0x169
      <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xfda37a0|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xfda37a0>?, {0xfda37a0?, 0x1abe76c0?}, 0xd?, {0xe723c00?, 0xc000488000?})
      	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20230912190043-e6d96b3b8f7e/helper/schema/resource.go:812 +0x7a
      <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc00313c380|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc00313c380>, {0xfda37a0, 0x1abe76c0}, 0xc0086db1e0, 0xc008025b80, {0xe723c00, 0xc000488000})
      	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20230912190043-e6d96b3b8f7e/helper/schema/resource.go:924 +0x83a
      <http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Apply({0xc000dec1e0|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Apply({0xc000dec1e0>?, {0xc0005ba040?, 0x427a3185c5000000?, 0xc00920e000?}}, {0xe7b2c41, 0xd}, {0xfda3bd8?, 0xc007a66618}, {0xfdb4678, 0xc008025b80})
      	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.63.2/pkg/tfshim/sdk-v2/provider.go:100 +0x165
      <http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Update(0xc000212000|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Update(0xc000212000>, {0xfda36c0?, 0xc00905c630?}, 0xc00a425440)
      	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.63.2/pkg/tfbridge/provider.go:975 +0x8ac
      <http://github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Update.func1({0xfdd5678|github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Update.func1({0xfdd5678>?, 0xc000212000?})
      	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.7-0.20230801203955-5d215c892096/muxer.go:356 +0x33
      <http://github.com/pulumi/pulumi-terraform-bridge/x/muxer.resourceMethod[...](0xc009aa6fa0|github.com/pulumi/pulumi-terraform-bridge/x/muxer.resourceMethod[...](0xc009aa6fa0>?, 0x40, 0xc009c37778?)
      	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.7-0.20230801203955-5d215c892096/muxer.go:303 +0xb5
      <http://github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Update(0x0|github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Update(0x0>?, {0xfda36c0?, 0xc00905c630?}, 0x40?)
      	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.7-0.20230801203955-5d215c892096/muxer.go:355 +0x65
      <http://github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler.func1({0xfda36c0|github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler.func1({0xfda36c0>, 0xc00905c630}, {0xe3279c0?, 0xc00a425440})
      	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.91.1/proto/go/provider_grpc.pb.go:629 +0x75
      <http://github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0xfda36c0|github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0xfda36c0>, 0xc00905c1e0}, {0xe3279c0, 0xc00a425440}, 0xc009036a60, 0xc007a665d0)
      	/home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x3d0
      <http://github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler({0xe5a5c40|github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler({0xe5a5c40>?, 0xc009aa6fa0}, {0xfda36c0, 0xc00905c1e0}, 0xc00903e380, 0xc00a1ce780)
      	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.91.1/proto/go/provider_grpc.pb.go:631 +0x135
      <http://google.golang.org/grpc.(*Server).processUnaryRPC(0xc00045e1e0|google.golang.org/grpc.(*Server).processUnaryRPC(0xc00045e1e0>, {0xfdb6a80, 0xc00adae000}, 0xc00a3ec900, 0xc00210e270, 0x1ab995d0, 0x0)
      	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.58.2/server.go:1376 +0xde7
      <http://google.golang.org/grpc.(*Server).handleStream(0xc00045e1e0|google.golang.org/grpc.(*Server).handleStream(0xc00045e1e0>, {0xfdb6a80, 0xc00adae000}, 0xc00a3ec900, 0x0)
      	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.58.2/server.go:1753 +0x9e7
      <http://google.golang.org/grpc.(*Server).serveStreams.func1.1()|google.golang.org/grpc.(*Server).serveStreams.func1.1()>
      	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.58.2/server.go:998 +0x8d
      created by <http://google.golang.org/grpc.(*Server).serveStreams.func1|google.golang.org/grpc.(*Server).serveStreams.func1> in goroutine 35
      	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.58.2/server.go:996 +0x165
  
    aws:sqs:Queue (dev-report-creation-queue):
      error: error reading from server: EOF
  
    aws:ec2:Tag (<http://subnet-09bcfefd9d6facdbc-kubernetes.io/cluster/cluster-eksCluster-9257b08|subnet-09bcfefd9d6facdbc-kubernetes.io/cluster/cluster-eksCluster-9257b08>):
      error: connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:40677: connect: connection refused"
a

adorable-house-61348

12/04/2023, 11:44 AM
As a workaround if none of the suggestions in the issue work, you could try using AWS native: https://www.pulumi.com/registry/packages/aws-native/api-docs/sqs/ That doesn't depend on the terraform provider so it should not have the same issue.
g

gorgeous-lunch-7514

12/04/2023, 11:44 AM
We’ll probably stick with v5 or aws-native
aye that’s the plan! If I re-use the SQS queue name it won’t recreate it right if I swtich to aws-native?
it’ll just “take-over” the existing resource?
a

adorable-house-61348

12/04/2023, 11:46 AM
which version of the aws provider are you using?
g

gorgeous-lunch-7514

12/04/2023, 11:46 AM
strange, we don’t touch EC2
"@pulumi/aws": "^6.8.0",
was what I had upgraded it too on the other repos
this is what gave the panic too
a

adorable-house-61348

12/04/2023, 11:47 AM
Yeah, try something > 6.9.0
g

gorgeous-lunch-7514

12/04/2023, 11:47 AM
however it’s just on this one stack im getting the panic
a

adorable-house-61348

12/04/2023, 11:47 AM
We fixed that in 6.9.0
g

gorgeous-lunch-7514

12/04/2023, 11:47 AM
alright, i’ll do an update now, if this fails i’ll fallback to using native
will post an update after lunch
I lied about lunch, panic solved, back full circle to the upstream issue.
Issue fixed, thank you!
maxReceiveCount
was a string, now a number and it works (for now).