Merge pull request #3000 from TimeIncOSS/code-formatting
Format code via gofmt + fix whitespacing
This commit is contained in:
commit
f27b0a0cf1
|
@ -10,7 +10,6 @@ import (
|
|||
"runtime"
|
||||
"strings"
|
||||
|
||||
|
||||
// TODO(dcunnin): Use version code from version.go
|
||||
// "github.com/hashicorp/terraform"
|
||||
"golang.org/x/oauth2"
|
||||
|
@ -29,10 +28,10 @@ type Config struct {
|
|||
Project string
|
||||
Region string
|
||||
|
||||
clientCompute *compute.Service
|
||||
clientCompute *compute.Service
|
||||
clientContainer *container.Service
|
||||
clientDns *dns.Service
|
||||
clientStorage *storage.Service
|
||||
clientDns *dns.Service
|
||||
clientStorage *storage.Service
|
||||
}
|
||||
|
||||
func (c *Config) loadAndValidate() error {
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"google.golang.org/api/compute/v1"
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
"google.golang.org/api/compute/v1"
|
||||
)
|
||||
|
||||
// OperationWaitType is an enum specifying what type of operation
|
||||
|
@ -77,4 +77,3 @@ func (e OperationError) Error() string {
|
|||
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
|
|
|
@ -34,22 +34,22 @@ func Provider() terraform.ResourceProvider {
|
|||
},
|
||||
|
||||
ResourcesMap: map[string]*schema.Resource{
|
||||
"google_compute_autoscaler": resourceComputeAutoscaler(),
|
||||
"google_compute_address": resourceComputeAddress(),
|
||||
"google_compute_disk": resourceComputeDisk(),
|
||||
"google_compute_firewall": resourceComputeFirewall(),
|
||||
"google_compute_forwarding_rule": resourceComputeForwardingRule(),
|
||||
"google_compute_http_health_check": resourceComputeHttpHealthCheck(),
|
||||
"google_compute_instance": resourceComputeInstance(),
|
||||
"google_compute_instance_template": resourceComputeInstanceTemplate(),
|
||||
"google_compute_network": resourceComputeNetwork(),
|
||||
"google_compute_route": resourceComputeRoute(),
|
||||
"google_compute_target_pool": resourceComputeTargetPool(),
|
||||
"google_container_cluster": resourceContainerCluster(),
|
||||
"google_dns_managed_zone": resourceDnsManagedZone(),
|
||||
"google_dns_record_set": resourceDnsRecordSet(),
|
||||
"google_compute_autoscaler": resourceComputeAutoscaler(),
|
||||
"google_compute_address": resourceComputeAddress(),
|
||||
"google_compute_disk": resourceComputeDisk(),
|
||||
"google_compute_firewall": resourceComputeFirewall(),
|
||||
"google_compute_forwarding_rule": resourceComputeForwardingRule(),
|
||||
"google_compute_http_health_check": resourceComputeHttpHealthCheck(),
|
||||
"google_compute_instance": resourceComputeInstance(),
|
||||
"google_compute_instance_template": resourceComputeInstanceTemplate(),
|
||||
"google_compute_network": resourceComputeNetwork(),
|
||||
"google_compute_route": resourceComputeRoute(),
|
||||
"google_compute_target_pool": resourceComputeTargetPool(),
|
||||
"google_container_cluster": resourceContainerCluster(),
|
||||
"google_dns_managed_zone": resourceDnsManagedZone(),
|
||||
"google_dns_record_set": resourceDnsRecordSet(),
|
||||
"google_compute_instance_group_manager": resourceComputeInstanceGroupManager(),
|
||||
"google_storage_bucket": resourceStorageBucket(),
|
||||
"google_storage_bucket": resourceStorageBucket(),
|
||||
},
|
||||
|
||||
ConfigureFunc: providerConfigure,
|
||||
|
|
|
@ -5,9 +5,9 @@ import (
|
|||
"log"
|
||||
"time"
|
||||
|
||||
"google.golang.org/api/googleapi"
|
||||
"google.golang.org/api/compute/v1"
|
||||
"github.com/hashicorp/terraform/helper/schema"
|
||||
"google.golang.org/api/compute/v1"
|
||||
"google.golang.org/api/googleapi"
|
||||
)
|
||||
|
||||
func resourceComputeAutoscaler() *schema.Resource {
|
||||
|
@ -52,7 +52,7 @@ func resourceComputeAutoscaler() *schema.Resource {
|
|||
"cooldown_period": &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
Default: 60,
|
||||
Default: 60,
|
||||
},
|
||||
|
||||
"cpu_utilization": &schema.Schema{
|
||||
|
|
|
@ -4,9 +4,9 @@ import (
|
|||
"fmt"
|
||||
"testing"
|
||||
|
||||
"google.golang.org/api/compute/v1"
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
"github.com/hashicorp/terraform/terraform"
|
||||
"google.golang.org/api/compute/v1"
|
||||
)
|
||||
|
||||
func TestAccAutoscaler_basic(t *testing.T) {
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"log"
|
||||
"time"
|
||||
|
||||
"google.golang.org/api/googleapi"
|
||||
"google.golang.org/api/compute/v1"
|
||||
"google.golang.org/api/googleapi"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/hashcode"
|
||||
"github.com/hashicorp/terraform/helper/schema"
|
||||
|
@ -116,7 +116,7 @@ func resourceComputeInstanceGroupManagerCreate(d *schema.ResourceData, meta inte
|
|||
Name: d.Get("name").(string),
|
||||
BaseInstanceName: d.Get("base_instance_name").(string),
|
||||
InstanceTemplate: d.Get("instance_template").(string),
|
||||
TargetSize: target_size,
|
||||
TargetSize: target_size,
|
||||
}
|
||||
|
||||
// Set optional fields
|
||||
|
|
|
@ -307,4 +307,3 @@ resource "google_compute_instance_group_manager" "igm-update" {
|
|||
zone = "us-central1-c"
|
||||
target_size = 3
|
||||
}`
|
||||
|
||||
|
|
|
@ -76,13 +76,13 @@ func (c *OutputCommand) Run(args []string) int {
|
|||
if name == "" {
|
||||
ks := make([]string, 0, len(mod.Outputs))
|
||||
for k, _ := range mod.Outputs {
|
||||
ks = append(ks, k)
|
||||
ks = append(ks, k)
|
||||
}
|
||||
sort.Strings(ks)
|
||||
|
||||
for _, k := range ks {
|
||||
v := mod.Outputs[k]
|
||||
c.Ui.Output(fmt.Sprintf("%s = %s", k, v))
|
||||
v := mod.Outputs[k]
|
||||
c.Ui.Output(fmt.Sprintf("%s = %s", k, v))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
@ -111,12 +111,12 @@ Usage: terraform output [options] [NAME]
|
|||
Options:
|
||||
|
||||
-state=path Path to the state file to read. Defaults to
|
||||
"terraform.tfstate".
|
||||
"terraform.tfstate".
|
||||
|
||||
-no-color If specified, output won't contain any color.
|
||||
|
||||
-module=name If specified, returns the outputs for a
|
||||
specific module
|
||||
specific module
|
||||
|
||||
`
|
||||
return strings.TrimSpace(helpText)
|
||||
|
|
Loading…
Reference in New Issue