From fe47f45800c6854ec145d9453bdf6c3dfb8957aa Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Tue, 9 Dec 2014 08:44:01 -0800 Subject: [PATCH] Remove bucket_name from GCE config. Fixes #1732. Forgot to do this in 23c947acf049b734c03ff3e24530f0310475b1a5. --- builder/googlecompute/config.go | 7 ------- builder/googlecompute/config_test.go | 12 ------------ website/source/docs/builders/googlecompute.markdown | 4 ---- 3 files changed, 23 deletions(-) diff --git a/builder/googlecompute/config.go b/builder/googlecompute/config.go index 27619c9bf..96557da10 100644 --- a/builder/googlecompute/config.go +++ b/builder/googlecompute/config.go @@ -19,7 +19,6 @@ type Config struct { AccountFile string `mapstructure:"account_file"` ProjectId string `mapstructure:"project_id"` - BucketName string `mapstructure:"bucket_name"` DiskName string `mapstructure:"disk_name"` DiskSizeGb int64 `mapstructure:"disk_size"` ImageName string `mapstructure:"image_name"` @@ -109,7 +108,6 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) { templates := map[string]*string{ "account_file": &c.AccountFile, - "bucket_name": &c.BucketName, "disk_name": &c.DiskName, "image_name": &c.ImageName, "image_description": &c.ImageDescription, @@ -135,11 +133,6 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) { } // Process required parameters. - if c.BucketName == "" { - errs = packer.MultiErrorAppend( - errs, errors.New("a bucket_name must be specified")) - } - if c.ProjectId == "" { errs = packer.MultiErrorAppend( errs, errors.New("a project_id must be specified")) diff --git a/builder/googlecompute/config_test.go b/builder/googlecompute/config_test.go index 77dcca4c2..4a7a1ed67 100644 --- a/builder/googlecompute/config_test.go +++ b/builder/googlecompute/config_test.go @@ -8,7 +8,6 @@ import ( func testConfig(t *testing.T) map[string]interface{} { return map[string]interface{}{ "account_file": testAccountFile(t), - "bucket_name": "foo", "project_id": "hashicorp", "source_image": "foo", "zone": "us-east-1a", @@ -57,17 +56,6 @@ func TestConfigPrepare(t *testing.T) { true, }, - { - "bucket_name", - nil, - true, - }, - { - "bucket_name", - "good", - false, - }, - { "private_key_file", "/tmp/i/should/not/exist", diff --git a/website/source/docs/builders/googlecompute.markdown b/website/source/docs/builders/googlecompute.markdown index 56d568ac0..0481fcf8e 100644 --- a/website/source/docs/builders/googlecompute.markdown +++ b/website/source/docs/builders/googlecompute.markdown @@ -73,7 +73,6 @@ existing GCE image. The account file is obtained in the previous section. ```javascript { "type": "googlecompute", - "bucket_name": "my-project-packer-images", "account_file": "account.json", "project_id": "my-project", "source_image": "debian-7-wheezy-v20140718", @@ -88,9 +87,6 @@ each category, the available options are alphabetized and described. ### Required: -* `bucket_name` (string) - The Google Cloud Storage bucket to store the - images that are created. The bucket must already exist in your project - * `project_id` (string) - The project ID that will be used to launch instances and store images.