https://pulumi.com logo
n

nice-airport-15607

08/01/2019, 5:34 PM
Anyone know how to remove a resource from pulumi that doesn’t exist in pulumi? So I’m getting this error saying a dataSource exists already, but when I do a
pulumi stack export > stack.json
, that data source does NOT exist in the file, also in pulumi web console it does NOT exist either.
error: Plan apply failed: BadRequestException: Data source with name someLambdaDataSource already exists
, but when
n

nice-airport-15607

08/01/2019, 5:36 PM
i can’t delete it if i don’t know the urn though…
w

white-balloon-205

08/01/2019, 5:38 PM
Oh - I think
BadRequestException: Data source with name someLambdaDataSource already exists
is an error coming from AWS, not Pulumi. Are you saying you want your Pulumi program to delete a resource from AWS that was defined outside of Pulumi? That is not possible today.
n

nice-airport-15607

08/01/2019, 5:39 PM
it was originally defined with pulumi
w

white-balloon-205

08/01/2019, 5:44 PM
If it was defined within a Pulumi stack and still exists, it should be in the state file and should have a URN. If it doesn’t, something must have gone wrong somewhere. But once it’s gone from your state file, Pulumi will not know how to manage it.
n

nice-airport-15607

08/01/2019, 5:54 PM
that’s my point, its not in the stack export. i can’t find it anywhere!
i guess ill check appsync data sources and manually remove if its there. thx for the help.
@white-balloon-205 manually removing the DataSource from AppSync fixed it.
2 Views