https://pulumi.com logo
#general
Title
# general
l

late-journalist-61387

09/27/2023, 7:58 PM
Problem in destroying the resources: my workflow is like this: 1. create an Fargate Service, and run some containers on it 2. get the apiKey and from container and then pass it to the fusionAuthPostSetup ( which is linked here ) ( THE HOST NAME IS COME AS CONST, not by pulumi.output ) 3. init a fusion auth provider 4. create some resource for fusion auth now, when I want to destroy the resources by
pulumi destroy
code, it is not working, I have tried
-r
to refresh, but still I have these problems:
Copy code
fusionauth:index:FusionAuthTheme (theme-aja-uat-fusionauth):
    error: Preview failed: refreshing urn:pulumi:uat::aws-aja::fusionauth:index/fusionAuthTheme:FusionAuthTheme::theme-aja-uat-fusionauth: 1 error occurred:
        * Get "<https://auth.uat.autojobapply.com/api/theme/40243c74-3592-47b7-995e-99ef37d98b09>": dial tcp: lookup <http://auth.uat.autojobapply.com|auth.uat.autojobapply.com>: no such host

  fusionauth:index:FusionAuthEMail (email-template-uat-fusionauth-email-verification):
    error: Preview failed: refreshing urn:pulumi:uat::aws-aja::fusionauth:index/fusionAuthEMail:FusionAuthEMail::email-template-uat-fusionauth-email-verification: 1 error occurred:
        * Get "<https://auth.uat.autojobapply.com/api/email/template/0fa7aa9c-d22b-4fc5-be16-2cd562989c02>": dial tcp: lookup <http://auth.uat.autojobapply.com|auth.uat.autojobapply.com>: no such host

  fusionauth:index:FusionAuthApplication (application-aja-uat-fusionauth):
    error: Preview failed: refreshing urn:pulumi:uat::aws-aja::fusionauth:index/fusionAuthApplication:FusionAuthApplication::application-aja-uat-fusionauth: 1 error occurred:
        * Get "<https://auth.uat.autojobapply.com/api/application/4bda2edc-2f8f-4104-9589-f019d09e50bf>": dial tcp: lookup <http://auth.uat.autojobapply.com|auth.uat.autojobapply.com>: no such host

  fusionauth:index:FusionAuthKey (rsa-key-uat-fusionauth-rs256-master):
    error: Preview failed: refreshing urn:pulumi:uat::aws-aja::fusionauth:index/fusionAuthKey:FusionAuthKey::rsa-key-uat-fusionauth-rs256-master: 1 error occurred:
        * Get "<https://auth.uat.autojobapply.com/api/key/4156513f-d7f5-4548-bfd7-2903f0674d3a>": dial tcp: lookup <http://auth.uat.autojobapply.com|auth.uat.autojobapply.com>: no such host
https://gist.github.com/atazangene/988b1540513758bbedc4c5d99701af0f
it seems that the service is deleted before the fusionAuth resources
what can I do now ?
l

little-cartoon-10569

09/27/2023, 9:17 PM
Why is auth.uat.autojobapply.com not being found? Is it one of the destroyed resources? Or is the network traffic being blocked, maybe because you've destroy a security group or something?
l

late-journalist-61387

09/28/2023, 5:05 AM
yes, it was a resource that is destroyed , I have added DNS of thet wuth pulumi cloudflare
l

little-cartoon-10569

09/28/2023, 8:00 PM
If the resource has already been destroyed, why is anything trying to connect to it? I wonder if there's a provider in your code that's allowing things to be deleted in the wrong order.
Anyway, to solve the problem, you need to • identify which resources Pulumi cannot delete, • kick them out of state via
pulumi state delete
, • delete them manually, and • destroy your stack.
It seems likely that if you want to deploy this project again, you'll need to add dependencies manually that prevent the important resource from being destroyed until after all the resources that depend on it have been destroyed.