Should TestStep.Destroy prevent a deploy plan?

Should the Destroy flag: prevent a destroy being run in part of an acceptance test?

I have a resource with an API that in our local container test allows us to create and update a resource but not delete it, so i was hoping to skip the Destroy as part of the acceptance test, is this flag the way todo it as it doesn’t work in my case :frowning:

same issue here :man_facepalming:

That’s not what the flag is for, unfortunately. The usual recommendation for that case is to use a DestroyContextFunc that doesn’t make any API calls (as there aren’t any to make), removes the resource from state, and returns a warning that the resource was returned from state but was not actually deleted.

Sometimes you can also refactor the resource to be part of another resource that does support delete–for example, if your resource belongs to a “project”, making it a sub-block within a project that uses the project’s lifecycle can work and accurately reflects that the resource will stick around until the project is deleted. This isn’t always a good idea, though, and depends on the user experience.