google: Code formatted via gofmt
This commit is contained in:
parent
9596271b36
commit
00ad41bf7d
|
@ -10,7 +10,6 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
|
||||||
// TODO(dcunnin): Use version code from version.go
|
// TODO(dcunnin): Use version code from version.go
|
||||||
// "github.com/hashicorp/terraform"
|
// "github.com/hashicorp/terraform"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
@ -29,10 +28,10 @@ type Config struct {
|
||||||
Project string
|
Project string
|
||||||
Region string
|
Region string
|
||||||
|
|
||||||
clientCompute *compute.Service
|
clientCompute *compute.Service
|
||||||
clientContainer *container.Service
|
clientContainer *container.Service
|
||||||
clientDns *dns.Service
|
clientDns *dns.Service
|
||||||
clientStorage *storage.Service
|
clientStorage *storage.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Config) loadAndValidate() error {
|
func (c *Config) loadAndValidate() error {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"google.golang.org/api/compute/v1"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
|
"google.golang.org/api/compute/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// OperationWaitType is an enum specifying what type of operation
|
// OperationWaitType is an enum specifying what type of operation
|
||||||
|
@ -77,4 +77,3 @@ func (e OperationError) Error() string {
|
||||||
|
|
||||||
return buf.String()
|
return buf.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,22 +34,22 @@ func Provider() terraform.ResourceProvider {
|
||||||
},
|
},
|
||||||
|
|
||||||
ResourcesMap: map[string]*schema.Resource{
|
ResourcesMap: map[string]*schema.Resource{
|
||||||
"google_compute_autoscaler": resourceComputeAutoscaler(),
|
"google_compute_autoscaler": resourceComputeAutoscaler(),
|
||||||
"google_compute_address": resourceComputeAddress(),
|
"google_compute_address": resourceComputeAddress(),
|
||||||
"google_compute_disk": resourceComputeDisk(),
|
"google_compute_disk": resourceComputeDisk(),
|
||||||
"google_compute_firewall": resourceComputeFirewall(),
|
"google_compute_firewall": resourceComputeFirewall(),
|
||||||
"google_compute_forwarding_rule": resourceComputeForwardingRule(),
|
"google_compute_forwarding_rule": resourceComputeForwardingRule(),
|
||||||
"google_compute_http_health_check": resourceComputeHttpHealthCheck(),
|
"google_compute_http_health_check": resourceComputeHttpHealthCheck(),
|
||||||
"google_compute_instance": resourceComputeInstance(),
|
"google_compute_instance": resourceComputeInstance(),
|
||||||
"google_compute_instance_template": resourceComputeInstanceTemplate(),
|
"google_compute_instance_template": resourceComputeInstanceTemplate(),
|
||||||
"google_compute_network": resourceComputeNetwork(),
|
"google_compute_network": resourceComputeNetwork(),
|
||||||
"google_compute_route": resourceComputeRoute(),
|
"google_compute_route": resourceComputeRoute(),
|
||||||
"google_compute_target_pool": resourceComputeTargetPool(),
|
"google_compute_target_pool": resourceComputeTargetPool(),
|
||||||
"google_container_cluster": resourceContainerCluster(),
|
"google_container_cluster": resourceContainerCluster(),
|
||||||
"google_dns_managed_zone": resourceDnsManagedZone(),
|
"google_dns_managed_zone": resourceDnsManagedZone(),
|
||||||
"google_dns_record_set": resourceDnsRecordSet(),
|
"google_dns_record_set": resourceDnsRecordSet(),
|
||||||
"google_compute_instance_group_manager": resourceComputeInstanceGroupManager(),
|
"google_compute_instance_group_manager": resourceComputeInstanceGroupManager(),
|
||||||
"google_storage_bucket": resourceStorageBucket(),
|
"google_storage_bucket": resourceStorageBucket(),
|
||||||
},
|
},
|
||||||
|
|
||||||
ConfigureFunc: providerConfigure,
|
ConfigureFunc: providerConfigure,
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"google.golang.org/api/googleapi"
|
|
||||||
"google.golang.org/api/compute/v1"
|
|
||||||
"github.com/hashicorp/terraform/helper/schema"
|
"github.com/hashicorp/terraform/helper/schema"
|
||||||
|
"google.golang.org/api/compute/v1"
|
||||||
|
"google.golang.org/api/googleapi"
|
||||||
)
|
)
|
||||||
|
|
||||||
func resourceComputeAutoscaler() *schema.Resource {
|
func resourceComputeAutoscaler() *schema.Resource {
|
||||||
|
@ -52,7 +52,7 @@ func resourceComputeAutoscaler() *schema.Resource {
|
||||||
"cooldown_period": &schema.Schema{
|
"cooldown_period": &schema.Schema{
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Default: 60,
|
Default: 60,
|
||||||
},
|
},
|
||||||
|
|
||||||
"cpu_utilization": &schema.Schema{
|
"cpu_utilization": &schema.Schema{
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"google.golang.org/api/compute/v1"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
"github.com/hashicorp/terraform/terraform"
|
"github.com/hashicorp/terraform/terraform"
|
||||||
|
"google.golang.org/api/compute/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAccAutoscaler_basic(t *testing.T) {
|
func TestAccAutoscaler_basic(t *testing.T) {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"google.golang.org/api/googleapi"
|
|
||||||
"google.golang.org/api/compute/v1"
|
"google.golang.org/api/compute/v1"
|
||||||
|
"google.golang.org/api/googleapi"
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/hashcode"
|
"github.com/hashicorp/terraform/helper/hashcode"
|
||||||
"github.com/hashicorp/terraform/helper/schema"
|
"github.com/hashicorp/terraform/helper/schema"
|
||||||
|
@ -116,7 +116,7 @@ func resourceComputeInstanceGroupManagerCreate(d *schema.ResourceData, meta inte
|
||||||
Name: d.Get("name").(string),
|
Name: d.Get("name").(string),
|
||||||
BaseInstanceName: d.Get("base_instance_name").(string),
|
BaseInstanceName: d.Get("base_instance_name").(string),
|
||||||
InstanceTemplate: d.Get("instance_template").(string),
|
InstanceTemplate: d.Get("instance_template").(string),
|
||||||
TargetSize: target_size,
|
TargetSize: target_size,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set optional fields
|
// Set optional fields
|
||||||
|
|
|
@ -307,4 +307,3 @@ resource "google_compute_instance_group_manager" "igm-update" {
|
||||||
zone = "us-central1-c"
|
zone = "us-central1-c"
|
||||||
target_size = 3
|
target_size = 3
|
||||||
}`
|
}`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue