Skip to content
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

Should be able to manually add instances to a google_compute_instance_group #15024

Closed
oppegard opened this issue Jun 2, 2017 · 1 comment · Fixed by #15025
Closed

Should be able to manually add instances to a google_compute_instance_group #15024

oppegard opened this issue Jun 2, 2017 · 1 comment · Fixed by #15025

Comments

@oppegard
Copy link

oppegard commented Jun 2, 2017

Terraform Version

0.9.6

Affected Resource(s)

  • google_compute_instance_group

Terraform Configuration Files

resource "google_compute_instance_group" "solr_cloud" {
  name = "solr-central1-a"
  zone = "us-central1-a"
}

Expected Behavior

After manually adding VMs to the Instance Group, no diff is shown when running terraform plan.

Actual Behavior

Terraform plans to remove the manually-added VMs on the google_compute_instance_group. Example output:

~ google_compute_instance_group.solr_cloud
    instances.#:          "1" => "0"
    instances.3628955265: "https://www.googleapis.com/compute/v1/projects/production-services/zones/us-central1-a/instances/solr-dummy-instance" => ""

Steps to Reproduce

  1. Create an Instance Group per the Terraform Config File above via terraform apply
  2. Manually add a VM to the Instance Group
  3. Run terraform plan and see that it plans to remove the instance

Important Factoids

We are using BOSH to provision the VMs and add them to the terraformed google_compute_instance_group, using the BOSH Google CPI option backend_service.

We currently accomplish the same setup on AWS using the aws_elb terraform resource, with BOSH creating the VMs and attaching them to the ELB.

stack72 added a commit that referenced this issue Jun 2, 2017
Fixes: #15024

```
% make testacc TEST=./builtin/providers/google TESTARGS='-run=TestAccComputeInstanceGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/06/02 20:48:54 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/google -v -run=TestAccComputeInstanceGroup_ -timeout 120m
=== RUN   TestAccComputeInstanceGroup_basic
--- PASS: TestAccComputeInstanceGroup_basic (123.64s)
=== RUN   TestAccComputeInstanceGroup_update
--- PASS: TestAccComputeInstanceGroup_update (150.37s)
=== RUN   TestAccComputeInstanceGroup_outOfOrderInstances
--- PASS: TestAccComputeInstanceGroup_outOfOrderInstances (103.71s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/google	377.737s
```
stack72 added a commit that referenced this issue Jun 2, 2017
…15025)

Fixes: #15024

```
% make testacc TEST=./builtin/providers/google TESTARGS='-run=TestAccComputeInstanceGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/06/02 20:48:54 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/google -v -run=TestAccComputeInstanceGroup_ -timeout 120m
=== RUN   TestAccComputeInstanceGroup_basic
--- PASS: TestAccComputeInstanceGroup_basic (123.64s)
=== RUN   TestAccComputeInstanceGroup_update
--- PASS: TestAccComputeInstanceGroup_update (150.37s)
=== RUN   TestAccComputeInstanceGroup_outOfOrderInstances
--- PASS: TestAccComputeInstanceGroup_outOfOrderInstances (103.71s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/google	377.737s
```
@ghost
Copy link

ghost commented Apr 11, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants