Terraform tries (and fails) to recreate database on database_instance while it is stopped. #8356
Labels
bug
forward/review
In review; remove label to forward
service/sqladmin-cp
service/sqladmin-infra
waiting-response
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
0.14.5
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Terraform should identify that the instance is stopped and not try to create sub-resources.
Actual Behavior
Error creating Database: googleapi: Error 400: Invalid request: Invalid request since instance is not running.
The database actually already exists. Terraform assumes it doesn't and tries to create it on the stopped instance.
Steps to Reproduce
activation_policy = "NEVER"
terraform apply
The text was updated successfully, but these errors were encountered: