|
|
# Hints
|
|
|
|
|
|
If you get errors like this
|
|
|
|
|
|
```
|
|
|
Error: module.cloudsql.google_sql_database_instance.cloudsql: 1 error(s) occurred:
|
|
|
* module.cloudsql.google_sql_database_instance.cloudsql: key "default" does not exist in map var.sql_instance_size in:
|
|
|
${var.sql_instance_size[terraform.workspace]}
|
|
|
|
|
|
Error: module.gke.google_container_cluster.primary: 1 error(s) occurred:
|
|
|
* module.gke.google_container_cluster.primary: key "default" does not exist in map var.gke_num_nodes in:
|
|
|
${var.gke_num_nodes[terraform.workspace]}
|
|
|
```
|
|
|
you are still in the default workspace. Change to dev by `terraform workspace select dev` or create it `terraform workspace new dev` if you didn't yet.
|
|
|
|
|
|
***
|
|
|
|
|
|
If a resource cannot be found by Terraform and this even prevents a `terraform refresh` with an error like
|
|
|
|
|
|
```
|
... | ... | @@ -12,4 +27,4 @@ it can be deleted by `terraform state rm google_sql_database.mydb` |
|
|
|
|
|
***
|
|
|
|
|
|
If the Cloud SQL database cannot be created because of an error like `google_sql_database_instance.cloudsql: Error, the name xxx is unavailable because it was used recently` a new ID for the instance can be created by `terraform state rm module.cloudsql.random_id.id && terraform apply -target=module.cloudsql.random_id.id` |
|
|
\ No newline at end of file |
|
|
If the Cloud SQL database cannot be created because of an error like `google_sql_database_instance.cloudsql: Error, the name xxx is unavailable because it was used recently` a new ID for the instance can be created by `terraform state rm module.cloudsql.random_id.id && terraform apply -target=module.cloudsql.random_id.id` |