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

Search configured project image families #9243

Merged
merged 3 commits into from
Nov 1, 2016
Merged

Search configured project image families #9243

merged 3 commits into from
Nov 1, 2016

Conversation

cblecker
Copy link
Contributor

@cblecker cblecker commented Oct 5, 2016

Fixes #9229.

This adds a check to search image families in the configured project prior to trying to search for an alternative project.

Copy link
Contributor

@stack72 stack72 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cblecker

Thanks for this work - I would love to see an acceptance test in place to show that it works as expected

Does this also need to be documented in anyway to show the behaviour?

Paul

@stack72 stack72 added enhancement provider/google-cloud waiting-response An issue/pull request is waiting for a response from the community labels Oct 6, 2016
@cblecker
Copy link
Contributor Author

cblecker commented Oct 6, 2016

Hi @stack72 --
I created an acceptance test, but it currently fails. Once I started tugging at the thread of how to write a test to create a private image family, then provision an instance off of it, I ran into an issue where the google_compute_image resource can't be provisioned based off a google_compute_disk resource (#9262). I opened up an issue to track it.

Without that part being fixed, I'm not sure how else to write an acceptance test for this particular case. Feedback is welcome and appreciated!

Christoph

@cblecker
Copy link
Contributor Author

cblecker commented Nov 1, 2016

As #9262 was resolved by #9614, this became unblocked.

I rebased this on top of those fixes, and ran the acceptance tests. They now pass.

$ make testacc TEST=./builtin/providers/google TESTARGS='-run=TestAccComputeInstance_private_image_family'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/11/01 17:19:24 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/google -v -run=TestAccComputeInstance_private_image_family -timeout 120m
=== RUN   TestAccComputeInstance_private_image_family
--- PASS: TestAccComputeInstance_private_image_family (206.41s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/google 206.413s

@stack72 -- I think this is now ready for review and possibly merge 😄

@stack72
Copy link
Contributor

stack72 commented Nov 1, 2016

Nps - it won't make 0.7.8 as we are in a release prep right now - but i will merge it for the next version if that's ok?

@cblecker
Copy link
Contributor Author

cblecker commented Nov 1, 2016

Yeah, that's fine with me. Thanks!

@stack72
Copy link
Contributor

stack72 commented Nov 1, 2016

LGTM now @cblecker. Ran All Compute Tests just to make sure :)

% make testacc TEST=./builtin/providers/google TESTARGS='-run=TestAccComputeInstance'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/11/01 20:16:20 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/google -v -run=TestAccComputeInstance -timeout 120m
=== RUN   TestAccComputeInstanceTemplate_importBasic
--- PASS: TestAccComputeInstanceTemplate_importBasic (26.00s)
=== RUN   TestAccComputeInstanceTemplate_importIp
--- PASS: TestAccComputeInstanceTemplate_importIp (47.41s)
=== RUN   TestAccComputeInstanceTemplate_importDisks
--- PASS: TestAccComputeInstanceTemplate_importDisks (25.54s)
=== RUN   TestAccComputeInstanceTemplate_importSubnetAuto
--- PASS: TestAccComputeInstanceTemplate_importSubnetAuto (89.86s)
=== RUN   TestAccComputeInstanceTemplate_importSubnetCustom
--- PASS: TestAccComputeInstanceTemplate_importSubnetCustom (77.00s)
=== RUN   TestAccComputeInstanceGroup_basic
--- PASS: TestAccComputeInstanceGroup_basic (99.35s)
=== RUN   TestAccComputeInstanceGroup_update
--- PASS: TestAccComputeInstanceGroup_update (162.43s)
=== RUN   TestAccComputeInstanceTemplate_basic
--- PASS: TestAccComputeInstanceTemplate_basic (25.06s)
=== RUN   TestAccComputeInstanceTemplate_IP
--- PASS: TestAccComputeInstanceTemplate_IP (47.14s)
=== RUN   TestAccComputeInstanceTemplate_disks
--- PASS: TestAccComputeInstanceTemplate_disks (25.28s)
=== RUN   TestAccComputeInstanceTemplate_subnet_auto
--- PASS: TestAccComputeInstanceTemplate_subnet_auto (86.92s)
=== RUN   TestAccComputeInstanceTemplate_subnet_custom
--- PASS: TestAccComputeInstanceTemplate_subnet_custom (74.11s)
=== RUN   TestAccComputeInstance_basic_deprecated_network
--- PASS: TestAccComputeInstance_basic_deprecated_network (57.63s)
=== RUN   TestAccComputeInstance_basic1
--- PASS: TestAccComputeInstance_basic1 (57.04s)
=== RUN   TestAccComputeInstance_basic2
--- PASS: TestAccComputeInstance_basic2 (55.43s)
=== RUN   TestAccComputeInstance_basic3
--- PASS: TestAccComputeInstance_basic3 (46.87s)
=== RUN   TestAccComputeInstance_basic4
--- PASS: TestAccComputeInstance_basic4 (75.94s)
=== RUN   TestAccComputeInstance_basic5
--- PASS: TestAccComputeInstance_basic5 (65.17s)
=== RUN   TestAccComputeInstance_IP
--- PASS: TestAccComputeInstance_IP (88.23s)
=== RUN   TestAccComputeInstance_disksWithoutAutodelete
--- PASS: TestAccComputeInstance_disksWithoutAutodelete (88.93s)
=== RUN   TestAccComputeInstance_disksWithAutodelete
--- PASS: TestAccComputeInstance_disksWithAutodelete (78.29s)
=== RUN   TestAccComputeInstance_local_ssd
--- PASS: TestAccComputeInstance_local_ssd (55.76s)
=== RUN   TestAccComputeInstance_update_deprecated_network
--- PASS: TestAccComputeInstance_update_deprecated_network (71.77s)
=== RUN   TestAccComputeInstance_forceNewAndChangeMetadata
--- PASS: TestAccComputeInstance_forceNewAndChangeMetadata (140.11s)
=== RUN   TestAccComputeInstance_update
--- PASS: TestAccComputeInstance_update (114.05s)
=== RUN   TestAccComputeInstance_service_account
--- PASS: TestAccComputeInstance_service_account (55.07s)
=== RUN   TestAccComputeInstance_scheduling
--- PASS: TestAccComputeInstance_scheduling (57.15s)
=== RUN   TestAccComputeInstance_subnet_auto
--- PASS: TestAccComputeInstance_subnet_auto (119.20s)
=== RUN   TestAccComputeInstance_subnet_custom
--- PASS: TestAccComputeInstance_subnet_custom (108.64s)
=== RUN   TestAccComputeInstance_address_auto
--- PASS: TestAccComputeInstance_address_auto (123.41s)
=== RUN   TestAccComputeInstance_address_custom
--- PASS: TestAccComputeInstance_address_custom (104.17s)
=== RUN   TestAccComputeInstance_private_image_family
--- PASS: TestAccComputeInstance_private_image_family (217.44s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/google 2566.435s

@stack72 stack72 merged commit af7cd57 into hashicorp:master Nov 1, 2016
@dvianello
Copy link

Thank you guys!

@cblecker cblecker deleted the fix-9229 branch November 1, 2016 21:08
gusmat pushed a commit to gusmat/terraform that referenced this pull request Dec 6, 2016
* Search configured project image families

* Clarify documentation around google_compute_instance image families

* Acceptance test for private instance family creation
@ghost
Copy link

ghost commented Apr 20, 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 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement provider/google-cloud waiting-response An issue/pull request is waiting for a response from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google-cloud provider fails to look up family correctly
3 participants