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

providers/google: Add google_compute_image resource #7960

Merged
merged 4 commits into from
Aug 12, 2016

Conversation

evandbrown
Copy link
Contributor

This change introduces the google_compute_image resource, which allows
Terraform users to create a bootable VM image from a raw disk tarball
stored in Google Cloud Storage. The google_compute_image resource
may be referenced as a boot image for a google_compute_instance.

Name: d.Get("name").(string),
}

if v := d.Get("description"); v != nil {
Copy link
Member

Choose a reason for hiding this comment

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

More idiomatic way to achieve the same thing may be

if v, ok := d.GetOk("description"); ok {

😉

@stack72
Copy link
Contributor

stack72 commented Aug 8, 2016

Hi @evandbrown

If you could rebase this, then we can get it tested and merged :)

Thanks

Paul

@evandbrown evandbrown force-pushed the google-image-resource branch 2 times, most recently from 5d53f18 to f558302 Compare August 8, 2016 04:36
@evandbrown
Copy link
Contributor Author

@stack72 Done!

Output of relevant acceptance tests:

$ make testacc TEST=./builtin/providers/google GOOGLE_PROJECT=redacted GOOGLE_REGION=us-central1 TESTARGS='-run=TestAccComputeImage...'
==> Checking that code complies with gofmt requirements...
/home/evanbrown/dev/go-workspaces/terraform/bin/stringer
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/08/07 21:31:24 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/google -v -run=TestAccComputeImage... -timeout 120m
=== RUN   TestAccComputeImage_basic
--- PASS: TestAccComputeImage_basic (75.34s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/google 75.466s

@stack72
Copy link
Contributor

stack72 commented Aug 8, 2016

@evandbrown looks like the build fails - looks like there are go vet issues

P.

@stack72
Copy link
Contributor

stack72 commented Aug 10, 2016

@evandbrown ping - we have some go vet errors :)

# github.com/hashicorp/terraform/builtin/providers/google
builtin/providers/google/resource_compute_image.go:118: not enough arguments in call to computeOperationWaitGlobal
builtin/providers/google/resource_compute_image.go:169: not enough arguments in call to computeOperationWaitGlobal

This change introduces the google_compute_image resource, which allows
Terraform users to create a bootable VM image from a raw disk tarball
stored in Google Cloud Storage. The google_compute_image resource
may be referenced as a boot image for a google_compute_instance.
@evandbrown
Copy link
Contributor Author

@stack72 That's embarrassing! Just rebased a fix that should fix...

@stack72
Copy link
Contributor

stack72 commented Aug 10, 2016

spot on :) Thanks! running tests now

@stack72
Copy link
Contributor

stack72 commented Aug 10, 2016

% make testacc TEST=./builtin/providers/google TESTARGS='-run=TestAccComputeImage'           1 ↵
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/08/10 17:11:13 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/google -v -run=TestAccComputeImage -timeout 120m
=== RUN   TestAccComputeImage_basic
--- PASS: TestAccComputeImage_basic (95.12s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/google 95.132s

:)

@stack72
Copy link
Contributor

stack72 commented Aug 10, 2016

Will merge when travis goes green!

@stack72 stack72 merged commit 93b2c71 into hashicorp:master Aug 12, 2016
stack72 pushed a commit that referenced this pull request Oct 6, 2016
Docs were originally added in #7960, but weren't added to the sidebar.
@ghost
Copy link

ghost commented Apr 23, 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 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants