0

I have a few AWS Elastic Clusters and I am trying to import them to Pulumi. The issue is that pulumi import returned error for most of my clusters. Only a few of them were able to be detected by pulumi.

Here is the example

admin-gateway and infra-storage-thai-test-v2 are both in same aws account and same region (us-west-2). Pulumi was able to generate code for admin-gateway:

thaipham@N9GK65GXW1 quickstart % pulumi import aws:elasticache/cluster:Cluster admin-gateway admin-gateway                          
Previewing import (dev)

View Live: https://app.pulumi.com/thailowki/quickstart/dev/previews/2189eee2-316c-4e2d-a50f-ab03a68c4194

     Type                        Name            Plan       
 +   pulumi:pulumi:Stack         quickstart-dev  create     
 =   └─ aws:elasticache:Cluster  admin-gateway   import     
 
Resources:
    + 1 to create
    = 1 to import
    2 changes

Do you want to perform this import? details

Then for infra-storage-thai-test-v2

thaipham@N9GK65GXW1 quickstart % pulumi import aws:elasticache/cluster:Cluster infra-storage-thai-test-v2 infra-storage-thai-test-v2
Previewing import (dev)

View Live: https://app.pulumi.com/thailowki/quickstart/dev/previews/a5490dc5-985d-49d7-ad67-928e331dc742

     Type                        Name                        Plan       Info
 +   pulumi:pulumi:Stack         quickstart-dev              create     1 error
 =   └─ aws:elasticache:Cluster  infra-storage-thai-test-v2  import     1 error
 
Diagnostics:
  pulumi:pulumi:Stack (quickstart-dev):
    error: preview failed
 
  aws:elasticache:Cluster (infra-storage-thai-test-v2):
    error: Preview failed: resource 'infra-storage-thai-test-v2' does not exist

I tried to use --logflow enabled and still there were not good insights.

here is some of the log:

I0901 10:21:47.233425   22540 eventsink.go:59] [aws-sdk-go] DEBUG: Validate Response elasticache/DescribeCacheClusters failed, attempt 0/25, error CacheClusterNotFound: CacheCluster not found: infra-storage-thai-test-v2
I0901 10:21:47.233438   22540 eventsink.go:62] eventSink::Debug(<{%reset%}>[aws-sdk-go] DEBUG: Validate Response elasticache/DescribeCacheClusters failed, attempt 0/25, error CacheClusterNotFound: CacheCluster not found: infra-storage-thai-test-v2<{%reset%}>)
I0901 10:21:47.233675   22540 eventsink.go:59]  status code: 404, request id:

Any help would be greatly appreciated.

PS: I'm using pulumi v3.39.1

0 Answers0