The databases this error surfaced for got manually created prior to terraform being introduced for producing them on tabular. When terraform was eventually introduced, the databases were manually deleted, then recreated using terraform without problems.
We then had a situation that resulted in manual deletion again. We considered that this wouldn't cause any problem as typically, when an AWS resource is manually deleted outside the terraform API, even though statefiles consider that the resource exist, terraform provider for AWS attempts to recreate the resource.
Testing
This issue surfaces during terraform plan
We attempted to resolve the situation considering that the plan might require statefiles to get refreshed from an apply. However, it seems like the apply still expects the databases to exist. When it determines they don't exist, they do not attempt to recreate the databases (like an AWS provider would for it's resources).
We then attempted to remove the statefiles to emulate the first time these databases got created using terraform, but the issue persists.
Given that statefiles are no longer at play, and this same exact issue persists, we are considering there's a problem or some cache in tabular/provider we're unable to clear out.
Expectation
Regardless of cache, we'd consider it standard behavior for a provider to recreate a resource that no longer exists.
Problem
When using the tabular_database resource in the following way:
We get the following Error:
Provider Information
Why Database was Manually Deleted
The databases this error surfaced for got manually created prior to terraform being introduced for producing them on tabular. When terraform was eventually introduced, the databases were manually deleted, then recreated using terraform without problems.
We then had a situation that resulted in manual deletion again. We considered that this wouldn't cause any problem as typically, when an AWS resource is manually deleted outside the terraform API, even though statefiles consider that the resource exist, terraform provider for AWS attempts to recreate the resource.
Testing
Given that statefiles are no longer at play, and this same exact issue persists, we are considering there's a problem or some cache in tabular/provider we're unable to clear out.
Expectation
Regardless of cache, we'd consider it standard behavior for a provider to recreate a resource that no longer exists.