Anyone know how to remove a resource from pulumi t...
# general
n
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
i can’t delete it if i don’t know the urn though…
w
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
it was originally defined with pulumi
w
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
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.