Hello everyone &amp; <@UB8C33JJG>, I am using pulu...
# general
c
Hello everyone & @echoing-match-29901, I am using pulumi to create infra on AWS in my organisation. I am using golang SDK with it. In the pulumi code, I have created a resource, which already existed before. When I try to run this code it fails with error “AlreadyExists”. I wanted to ask if there exists any such solution currently using pulumi, such that i can programatically ignore some errors such that rest of the execution still runs. Assume that it is not possible for me to currently either import it or delete it and create via Pulumi or edit the state files manually to ignore any diff.
s
I think you should be able to use
pulumi import
to import the resources so pulumi knows they already exist properly.
c
Thanks for the fast reply @steep-pager-59220
@steep-pager-59220 Are there any plans on adding this feature anytime soon to Pulumi ? i.e ignore some kind of errors programatically
s
I'm not aware of it personally.
l
That's not a Pulumi issue. That's a lanugage issue. You can try/catch in the normal way. In this case, instead of attempting to create a new copy of something that already exists, your choices are either to import the resource first, so that it is managed in Pulumi, or to check if it exists first, then either create it or use the existing. Attempting to create then handling the error isn't the correct solution.