betr-io / terraform-provider-mssql

Terraform provider for Microsoft SQL Server
https://registry.terraform.io/providers/betr-io/mssql/latest
MIT License
36 stars 29 forks source link

Empty azure_login client_id and client_secret results in "db connection failed after 30s timeout" #25

Closed teplyuska closed 8 months ago

teplyuska commented 2 years ago

While developing pipelines to run terraform, a state file was accidentally saved with empty client_id and client_secret in azure_login.

When running "terraform plan" the refresh would result in "db connection failed after 30s timeout"

It might be helpful to others if this scenario resulted in another error message.

version 0.2.4

ramondeklein commented 2 years ago

I have the same issue after the MSSQL_CLIENT_SECRET was rotated. This resulted in the same problem. I updated the client secret in the state file (it may occur multiple times). After fixing the client secret in the state file, it all worked again.

Note that if you store the state in a remote backend (i.e. Azure storage account), then make sure you update the secret in the remote state.

gperezivo commented 8 months ago

I have the same issue after the MSSQL_CLIENT_SECRET was rotated. This resulted in the same problem. I updated the client secret in the state file (it may occur multiple times). After fixing the client secret in the state file, it all worked again.

Note that if you store the state in a remote backend (i.e. Azure storage account), then make sure you update the secret in the remote state.

Thanks, you save my day!