average-postman-7185
03/12/2024, 6:01 PMaverage-postman-7185
03/12/2024, 6:01 PMpulumi import aws:rds/instance:Instance my-instance my-instance
. Import was successful. Then I ran pulumi refresh
which was okay. pulumi preview
shows following
~ aws:rds/instance:Instance: (update) ๐
[id=db-OPHPWZ46KNISPZQSBCN7FJK3AE]
[urn=urn:pulumi:stag::infra::aws:rds/instance:Instance::my-instance]
[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
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 "DbiResourceId": "db-OPHPWZ46KNISPZQSBCN7FJK3AE"
.
Any idea why this might be happening?average-postman-7185
03/12/2024, 6:04 PMp about
CLI
Version 3.109.0
Go Version go1.22.0
Go Compiler gc
Plugins
NAME VERSION
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
Host
OS darwin
Version 14.3.1
Arch arm64
This project is written in nodejs: executable='/usr/local/bin/node' version='v20.11.1'
Dependencies:
NAME VERSION
@pulumi/pulumi 3.108.1
@types/node 20.11.24
@pulumi/aws 5.43.0
@pulumi/awsx 0.40.1
average-postman-7185
03/12/2024, 6:26 PMpulumi import
pulumi will use the latest aws provider pulgin installed, which in my case is 6.24.0
. But in infra we are using aws provider plugin 5.43.0
. And pulumi tries to change aws provider used
[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
--provider aws_provider=urn:pulumi:stag::infra::pulumi:providers:aws::default_5_43_0::4db022de-01e1-4c49-a3e0-a519acb3c347
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by