{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1947","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1947/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1947/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1947/events","html_url":"https://github.com/terraform-providers/terraform-provider-google/issues/1947","id":354376452,"node_id":"MDU6SXNzdWUzNTQzNzY0NTI=","number":1947,"title":"GCE instances being created with automatic_restart set to OFF","user":{"login":"Susurrus19","id":13424575,"node_id":"MDQ6VXNlcjEzNDI0NTc1","avatar_url":"https://avatars3.githubusercontent.com/u/13424575?v=4","gravatar_id":"","url":"https://api.github.com/users/Susurrus19","html_url":"https://github.com/Susurrus19","followers_url":"https://api.github.com/users/Susurrus19/followers","following_url":"https://api.github.com/users/Susurrus19/following{/other_user}","gists_url":"https://api.github.com/users/Susurrus19/gists{/gist_id}","starred_url":"https://api.github.com/users/Susurrus19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Susurrus19/subscriptions","organizations_url":"https://api.github.com/users/Susurrus19/orgs","repos_url":"https://api.github.com/users/Susurrus19/repos","events_url":"https://api.github.com/users/Susurrus19/events{/privacy}","received_events_url":"https://api.github.com/users/Susurrus19/received_events","type":"User","site_admin":false},"labels":[{"id":620326519,"node_id":"MDU6TGFiZWw2MjAzMjY1MTk=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/labels/bug","name":"bug","color":"f7c6c7","default":true},{"id":623652366,"node_id":"MDU6TGFiZWw2MjM2NTIzNjY=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/labels/waiting-response","name":"waiting-response","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-27T15:57:01Z","updated_at":"2018-08-31T09:09:11Z","closed_at":null,"author_association":"NONE","body":"### Terraform Version\r\nTerraform v0.11.8\r\n+ provider.google v1.16.2\r\n\r\n### Affected Resource(s)\r\n- google_compute_instance\r\n\r\nAffects multiple resources.\r\n\r\n### Terraform Configuration Files\r\n```hcl\r\ndata \"google_compute_image\" \"memcache_image\" {\r\n  project = \"terraform-sandbox\"\r\n  family  = \"${ var.base_disk_image }\"\r\n}\r\n\r\ndata \"google_compute_subnetwork\" \"primary\" {\r\n  name    = \"primary\"\r\n  project = \"sharedvpc-prod\"\r\n}\r\n\r\nresource \"google_compute_instance\" \"memcache-deploy\" {\r\n  count            = \"${ var.size }\"\r\n  name             = \"${ var.keyspace }${ format(\"%03d\", count.index + 1) }\"\r\n  machine_type     = \"${ var.machine_type }\"\r\n  min_cpu_platform = \"${ var.min_cpu_platform }\"\r\n  zone             = \"${ count.index % 2 == 0 ? lookup(var.region_zone, 0) : lookup(var.region_zone, 1) }\"\r\n\r\n  tags = \"${ var.tags }\"\r\n\r\n  boot_disk {\r\n    initialize_params {\r\n      size  = \"${ var.disk_size }\"\r\n      type  = \"pd-standard\"\r\n      image = \"${ data.google_compute_image.memcache_image.self_link }\"\r\n    }\r\n  }\r\n\r\n  allow_stopping_for_update = \"true\"\r\n\r\n  lifecycle {\r\n    ignore_changes = [\"boot_disk\"]\r\n  }\r\n\r\n  network_interface {\r\n    subnetwork         = \"${ data.google_compute_subnetwork.primary.self_link }\"\r\n    access_config      = []\r\n  }\r\n}\r\n```\r\n\r\n### Debug Output\r\nNot sure how to do this\r\n\r\n### Expected Behavior\r\nNewly created instances are instantiated with \"Automatic Restart: On (true)\"\r\n\r\n### Actual Behavior\r\nNewly created instances are coming up with \"Automatic Restart: Off (false)\"\r\n\r\n### Steps to Reproduce\r\n1. `terraform apply`\r\n\r\n### Important Factoids\r\nNothing to mention, mostly vanilla Terraform\r\n\r\n### References\r\nNone\r\n"},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/comments/417603355","html_url":"https://github.com/terraform-providers/terraform-provider-google/issues/1947#issuecomment-417603355","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1947","id":417603355,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzYwMzM1NQ==","user":{"login":"Chupaka","id":3432808,"node_id":"MDQ6VXNlcjM0MzI4MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/3432808?v=4","gravatar_id":"","url":"https://api.github.com/users/Chupaka","html_url":"https://github.com/Chupaka","followers_url":"https://api.github.com/users/Chupaka/followers","following_url":"https://api.github.com/users/Chupaka/following{/other_user}","gists_url":"https://api.github.com/users/Chupaka/gists{/gist_id}","starred_url":"https://api.github.com/users/Chupaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chupaka/subscriptions","organizations_url":"https://api.github.com/users/Chupaka/orgs","repos_url":"https://api.github.com/users/Chupaka/repos","events_url":"https://api.github.com/users/Chupaka/events{/privacy}","received_events_url":"https://api.github.com/users/Chupaka/received_events","type":"User","site_admin":false},"created_at":"2018-08-31T09:09:11Z","updated_at":"2018-08-31T09:09:11Z","author_association":"CONTRIBUTOR","body":"With super-minimal config:\r\n\r\n```\r\nresource \"google_compute_instance\" \"test\" {\r\n  name         = \"test-autorestart\"\r\n  machine_type = \"g1-small\"\r\n\r\n  boot_disk {\r\n    initialize_params {\r\n      image = \"ubuntu-minimal-1804-lts\"\r\n      type  = \"pd-ssd\"\r\n      size  = \"10\"\r\n    }\r\n  }\r\n\r\n  network_interface {\r\n    network = \"default\"\r\n  }\r\n}\r\n```\r\n\r\nI have this:\r\n\r\n```\r\nTerraform v0.11.8\r\n+ provider.google v1.17.1\r\n\r\n$ terraform apply\r\n<...>\r\n  + google_compute_instance.test\r\n<...>\r\n      scheduling.#:                           <computed>\r\n<...>\r\n\r\nPlan: 1 to add, 0 to change, 0 to destroy.\r\n\r\ngoogle_compute_instance.test: Creating...\r\n<...>\r\n  scheduling.#:                           \"\" => \"<computed>\"\r\n<...>\r\ngoogle_compute_instance.test: Still creating... (10s elapsed)\r\ngoogle_compute_instance.test: Creation complete after 16s (ID: test-autorestart)\r\n\r\nApply complete! Resources: 1 added, 0 changed, 0 destroyed.\r\n\r\n$ terraform show\r\ngoogle_compute_instance.test:\r\n<...>\r\n  scheduling.# = 1\r\n  scheduling.0.automatic_restart = false\r\n  scheduling.0.on_host_maintenance = MIGRATE\r\n  scheduling.0.preemptible = false\r\n<...>\r\n```\r\n\r\nHere's the debug log if you really need it: https://gist.github.com/Chupaka/eec6bb056fff05614c6369104f78c4a9"}}
{"actor":{"display_login":"Chupaka"}}