# general


03/21/2024, 7:20 AM
I am using pulumi for importing all the current hosted instances and manage them. I am facing issue where pulumi is trying to replace all the instances. Steps to replicate: 1> Import instances using stack configuration or using gcp api (I created a functiion to import using gcp api) 2> Once Imported I manually deleted a instance using pulumi state delete (Note: this step is being done as in cases where in the severe prod issues we focus on resolving the issue so suppose we create a new instance.) 3> Now using the config I tried to import these instances then pulumi tried to replace all the instances with no Diffs and import that one instance which I deleted. Yaml.Config I am using --- config: gcpregion us-west1 import_all: false instances: - boot: name: elasticsearch-staging-1 image: size: 500 counter: 1 metadata: enable-oslogin: 'true' labels: applications: elasticsearch-staging-1 machine_type: n2-standard-8 subnetwork: name name: elasticsearch service_account: email: scopes: - - - - - - zone: c


03/21/2024, 1:42 PM
I don't have experience importing resources, but from the people I talked to before getting into pulumi, they said to avoid importing if you can as it caused them a similar problem. I know this doesn't help accomplish what you set out to do. For this reason I have not imported anything.