Commit 534b8d23 authored by Eric Johnson's avatar Eric Johnson

Merge pull request #1738 from dcarlino/no_gce_bucket

Remove bucket_name from GCE config.
parents 20d040dc fe47f458
......@@ -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"))
......
......@@ -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",
......
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment