Hey, folks. Getting some weird behavior with impor...
# aws
Hey, folks. Getting some weird behavior with imported RDS instance. Details in thread ๐Ÿงต
Context: I've restored a snapshot to a new RDS instance, created config for this instance. Then I ran
pulumi import aws:rds/instance:Instance my-instance my-instance
. Import was successful. Then I ran
pulumi refresh
which was okay.
pulumi preview
shows following
Copy code
~ aws:rds/instance:Instance: (update) ๐Ÿ”“
        [provider: urn:pulumi:stag::infra::pulumi:providers:aws::default_6_24_0::faf00f73-b5d0-43b7-9e03-0bbd945f9237 => urn:pulumi:stag::infra-tsgs::pulumi:providers:aws::default_5_43_0::4db022de-01e1-4c49-a3e0-a519acb3c347]
      + allowMajorVersionUpgrade: true
      + password                : [secret]
which is expected. But when I ran
pulumi up
I got the following error
Copy code
aws:rds:Instance (my-instance):
    error: 1 error occurred:
        * updating urn:pulumi:stag::infra::aws:rds/instance:Instance::my-instance: 1 error occurred:
        * updating RDS DB Instance (db-OPHPWZ46KNISPZQSBCN7FJK3AE): operation error RDS: ModifyDBInstance, https response error StatusCode: 404, RequestID: 6344bdbf-463f-4c1a-ba69-b211b4181bef, DBInstanceNotFound: DB instance not found: db-ophpwz46knispzqsbcn7fjk3ae
When I ran
aws rds describe-db-instances --db-instance-identifier my-instance
instance is found and it has
. Any idea why this might be happening?
Copy code
p about
Version      3.109.0
Go Version   go1.22.0
Go Compiler  gc

aws     6.24.0
aws     5.43.0
awsx    2.5.0
docker  4.5.1
docker  3.6.1
docker  3.6.1
nodejs  unknown

OS       darwin
Version  14.3.1
Arch     arm64

This project is written in nodejs: executable='/usr/local/bin/node' version='v20.11.1'

NAME            VERSION
@pulumi/pulumi  3.108.1
@types/node     20.11.24
@pulumi/aws     5.43.0
@pulumi/awsx    0.40.1
figured it out. so apparently, when you do
pulumi import
pulumi will use the latest aws provider pulgin installed, which in my case is
. But in infra we are using aws provider plugin
. And pulumi tries to change aws provider used
Copy code
[provider: urn:pulumi:stag::infra::pulumi:providers:aws::default_6_24_0::faf00f73-b5d0-43b7-9e03-0bbd945f9237 => urn:pulumi:stag::infra::pulumi:providers:aws::default_5_43_0::4db022de-01e1-4c49-a3e0-a519acb3c347]
and that, apparently breaks something internally. to workaround this issue it is possible to explicitly specify provider version when importing by adding
Copy code
--provider aws_provider=urn:pulumi:stag::infra::pulumi:providers:aws::default_5_43_0::4db022de-01e1-4c49-a3e0-a519acb3c347