You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like your config sets instance_template to the instance-from-template self-link, not the actual redis-1 template resource self_link. I'm guessing this is just a typo since you named your instance (from-template) tpl.
I'm already to testing google_compute_instance_from_template to adding rrdatas google_dns_record_set already done, but I want use google_compute_instance_from_template to create instance group. I have purpose to create template instance is google_compute_instance_group_manager, I want to create many instance to one group from template instance, Is it possible to google_compute_instance_from_template to google_compute_instance_group_manager. For example
resource "google_compute_instance_from_template" "tpl" {
name = "instance-from-template"
project = "${var.project}"
zone = "asia-southeast1-a"
source_instance_template = google_compute_instance_template.redis-1.self_link
// Override fields from instance template
can_ip_forward = false
labels = {
my_key = "my_value"
}
}
resource "google_compute_instance_group_manager" "redis1" {
provider = "google-beta"
project = "${var.project}"
name = "redis1-${var.cluster_name}"
base_instance_name = "redis1-${var.cluster_name}"
zone = "${var.zone_a}"
target_size = 1
version {
name = "v1"
instance_template = "${google_compute_instance_from_template.tpl.self_link}"
}
}
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 👉 [email protected]. Thanks!
ghost
locked and limited conversation to collaborators
Jan 23, 2020
Community Note
Error creating InstanceGroupManager: googleapi: Error 400: Invalid value for field 'resource.versions[0].instanceTemplate':
Unexpected resource collection 'instances'., invalid
Terraform Version
Terraform v0.12.0
provider.google v3.2.0
provider.google-beta v3.2.0
provider.template v2.1.2
Affected Resource(s)
Terraform Configuration Files
Debug Output
Error creating InstanceGroupManager: googleapi: Error 400: Invalid value for field 'resource.versions[0].instanceTemplate':
Unexpected resource collection 'instances'., invalid
--->
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform apply
The text was updated successfully, but these errors were encountered: