Hello folks! why i'm getting this errors when upda...
# aws
v
Hello folks! why i'm getting this errors when updating my aws rds cluster ? (using golang and github.com/pulumi/pulumi-aws/sdk/v6 v.6.8.0)
Copy code
panic: interface conversion: interface {} is nil, not map[string]interface {}
    goroutine 165 [running]:
    <http://github.com/hashicorp/go-cty/cty.Value.GetAttr({{{0xfda3ba0|github.com/hashicorp/go-cty/cty.Value.GetAttr({{{0xfda3ba0>?, 0xc00f02bb20?}}, {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({0xc001e343e0|github.com/hashicorp/terraform-provider-aws/internal/provider.tagsResourceInterceptor.run({0xc001e343e0>?, 0xea8b068?, 0xea8b060?}, {0xfda36c0, 0xc00f1b25a0}, {0xfdb4b50, 0xc00e65b080}, {0xe723c00?, 0xc0000630e0?}, 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?, 0xc0000630e0?})
    	/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?, 0xc0000630e0?})
    	/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(0xc001e57ea0|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc001e57ea0>, {0xfda37a0, 0x1abe76c0}, 0xc00f1484e0, 0xc00e65ae00, {0xe723c00, 0xc0000630e0})
    	/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({0xc000997680|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Apply({0xc000997680>?, {0xc000aa2538?, 0x0?, 0xc009fc14c8?}}, {0xe7c6c4d, 0xf}, {0xfda3bd8?, 0xc00e636bb8}, {0xfdb4678, 0xc00e65ae00})
    	/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(0xc000226000|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Update(0xc000226000>, {0xfda36c0?, 0xc00e662150?}, 0xc008a57d40)
    	/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>?, 0xc000226000?})
    	/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[...](0xc005fb6c80|github.com/pulumi/pulumi-terraform-bridge/x/muxer.resourceMethod[...](0xc005fb6c80>?, 0x40, 0xc00e4b5778?)
    	/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?, 0xc00e662150?}, 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>, 0xc00e662150}, {0xe3279c0?, 0xc008a57d40})
    	/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>, 0xc00e61bbc0}, {0xe3279c0, 0xc008a57d40}, 0xc00e634e80, 0xc00e6368b8)
    	/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>?, 0xc005fb6c80}, {0xfda36c0, 0xc00e61bbc0}, 0xc001997d50, 0xc0031fb4c0)
    	/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(0xc0006bc000|google.golang.org/grpc.(*Server).processUnaryRPC(0xc0006bc000>, {0xfdb6a80, 0xc008a34000}, 0xc00e6390e0, 0xc006b6cf90, 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(0xc0006bc000|google.golang.org/grpc.(*Server).handleStream(0xc0006bc000>, {0xfdb6a80, 0xc008a34000}, 0xc00e6390e0, 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 68
    	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.58.2/server.go:996 +0x165
a
Hey Damien, I'm sorry you encountered this and thanks for reporting it. We are working on that problem, it is being tracked here: https://github.com/pulumi/pulumi-aws/issues/2904 We are still not quite certain what caused it but in my testing it's been the result of a mismatch between pulumi state and cloud state. You could try running pulumi refresh and see if that fixes the issue. Has the rds cluster been modified/deleted in the aws console?
v
look like, pulumi refresh fixed the thing
so what i did previously
1/ create a RDS cluster with this values
Copy code
BackupRetentionPeriod:      <http://pulumi.Int|pulumi.Int>(7),
            PreferredBackupWindow:      pulumi.String("01:00-02:00"),
2/ call AWS backup NewPlan with
Copy code
Lifecycle: &backup.PlanRuleLifecycleArgs{
					DeleteAfter: <http://pulumi.Int|pulumi.Int>(30), // in days
				},
everything working well at this steps
3/ few weeks later, update cluster engine version 14.6 to 15.4
Copy code
AllowMajorVersionUpgrade:   pulumi.Bool(true),
			EngineVersion:              pulumi.String("15.4"),
I got AWS error
Copy code
InvalidParameterValue: RDS cluster rh-dev-postgres is associated with the following AwsBackupRecoveryPointArn: arn:aws:backup:eu-central-2:999999999:recovery-point:continuous:cluster-olploybnydw46flnzsh22ae5yq-58f01dc1. The BackupRetentionPeriod can be blank, or you can use the current value, 30. For more details, see the AWS Backup documentation.
    	status code: 400, request id: 67454eea-f51b-42bc-8b30-a1d69e715215
Copy code
pulumi preview --diff
reported this
Copy code
~ backupRetentionPeriod      : 30 => 7
      ~ engineVersion              : "14.6" => "15.4"
      ~ preferredBackupWindow      : "21:00-23:00" => "01:00-02:00"
      ~ availabilityZones          : [
          ~ [0]: "eu-central-2b" => "eu-central-2a"
          ~ [1]: "eu-central-2c" => "eu-central-2b"
          ~ [2]: "eu-central-2a" => "eu-central-2c"
        ]
then I guessed the backup plan conflicted with the cluster config for some reason
so I changed the my code to match the cluster state
Copy code
BackupRetentionPeriod:      <http://pulumi.Int|pulumi.Int>(30),
then i got the panic error using
Copy code
pulumi up
a
Thanks for the detailed steps - I'll give it a go! I'm glad you also managed to work around the issue