-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
google_compute_autoscaler: Error 400: Required field 'autoscaler' not specified #15056
Comments
That autoscaler looks almost identical to my working config. Can you share more of your config, I suspect there is something else that is going on here? |
resource "google_container_cluster" "primary" {
name = "primary"
zone = "us-central1-a"
initial_node_count = 3
master_auth {
username = "${var.cluster_master_auth_username}"
password = "${var.cluster_master_auth_password}"
}
node_config {
machine_type = "n1-standard-1"
disk_size_gb = 100
}
}
resource "google_compute_instance_group_manager" "primary" {
name = "${var.google_compute_instance_group_manager_primary_name}"
zone = "${google_container_cluster.primary.zone}"
instance_template = "https://www.googleapis.com/compute/v1/projects/${var.google_project_id}/global/instanceTemplates/${replace(var.google_compute_instance_group_manager_primary_name, "/-grp$/", "")}"
base_instance_name = "${replace(var.google_compute_instance_group_manager_primary_name, "/-grp$/", "")}"
target_size = 3
named_port {
name = "http-to-https-port"
port = 31000
}
} If it's my config, maybe the |
Just tested without |
Hi @mattes, Note that both approaches will involve destroying and recreating the resource - if you have other resources that depend on it, you may want to manually edit it in the Cloud Console/with the gCloud API until updating works properly again. |
For completeness, you can also use lifecycle {
create_before_destroy = true
} although I'm not sure how well that will work with downstream resources. |
For anyone who lands here like I did, looks like a proper fix for this went out in 0.9.7 |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
Terraform v0.9.6
Affected Resource(s)
Terraform Configuration Files
Output
The text was updated successfully, but these errors were encountered: