-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic on google_sql interface {} is nil, not map[string]interface {} #2220
Comments
I'm having trouble reproducing this - would you be able to post a minimal config? When I try something like the config I've posted below I don't get an error. resource "google_sql_database_instance" "primary" {
provider = "google-beta"
name = "somename-primary"
database_version = "POSTGRES_9_6"
region = "us-central1"
settings {
tier = "db-f1-micro"
disk_type = "PD_SSD"
disk_size = "50"
disk_autoresize = "false"
activation_policy = "ALWAYS"
availability_type = "REGIONAL"
replication_type = "SYNCHRONOUS"
backup_configuration {
enabled = true
}
}
}
resource "google_sql_database_instance" "secondary" {
provider = "google-beta"
name = "somename-secondary"
database_version = "POSTGRES_9_6"
master_instance_name = "${google_sql_database_instance.primary.name}"
region = "us-central1"
settings {
tier = "db-f1-micro"
disk_type = "PD_SSD"
disk_size = "50"
disk_autoresize = "false"
activation_policy = "ALWAYS"
replication_type = "SYNCHRONOUS"
}
}
provider "google-beta" {
} |
@rileykarson thanks for the fast reply. I did just try to replicate it in test config to report it here but I did not get the error anymore. Will continue to investigate this. |
I think i found the problem here. In my original code I kept
|
I believe this should be fixed with the release of v1.19.1. Please update your provider, and feel free to comment if you continue to experience problems. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Panic Output
https://gist.github.com/meyskens/be4194a44bad433060bfad952e8708ec
Expected Behavior
Should have created the resources.
Actual Behavior
Panics after creating the primary CloudSQL instance.
Steps to Reproduce
terraform plan -out plan.out
terraform apply plan.out
References
The text was updated successfully, but these errors were encountered: