I want to use pulumi to import one of my existing resources on AWS.
So I ran pulumi import aws:elasticache/cluster:Cluster my-redis my-redis
command and got the following details in the output:
= aws:elasticache/cluster:Cluster: (import)
[id=my-redis]
[urn=urn:pulumi:prod::my_aws_infra::aws:elasticache/cluster:Cluster::my-redis]
[provider=urn:pulumi:prod::my_aws_infra::pulumi:providers:aws::default_4_0_0::5bcb13d1-6ocf-qb30-bf12-6c7a1683a072]
availabilityZone : "ap-northeast-1c"
azMode : "single-az"
clusterId : "my-redis"
engine : "redis"
engineVersion : "4.0.10"
maintenanceWindow : "sat:20:00-sat:21:00"
nodeType : "cache.t3.small"
notificationTopicArn : "arn:aws:sns:ap-northeast-1:123456789123:redis_sns_topic"
numCacheNodes : 1
parameterGroupName : "default.redis4.0"
port : 6379
securityGroupIds : [
[0]: "sg-b6d1b86al301zd054"
[1]: "sg-5yfa3a33"
]
snapshotRetentionLimit: 0
snapshotWindow : "16:30-17:30"
subnetGroupName : "default"
tags : {
}
The code I get from pulumi import ...
becomes
my_redis = aws.elasticache.Cluster("my-redis",
cluster_id="my-redis",
notification_topic_arn="arn:aws:sns:ap-northeast-1:123456789123:redis_sns_topic",
opts=pulumi.ResourceOptions(protect=True))
Why does the generated code lack a lot of information (availabilityZone
, azMode
, engine
, etc)?
The code works correctly when I run pulumi up
.
How does pulumi know all the configurations of the redis resource?
Are the configurations stored in the backend of pulumi?