diff --git a/google-beta/access_context_manager_operation.go b/google-beta/access_context_manager_operation.go index e702539f07..149c94b114 100644 --- a/google-beta/access_context_manager_operation.go +++ b/google-beta/access_context_manager_operation.go @@ -1,7 +1,7 @@ package google import ( - "google.golang.org/api/accesscontextmanager/v1beta" + accesscontextmanager "google.golang.org/api/accesscontextmanager/v1beta" ) type AccessContextManagerOperationWaiter struct { diff --git a/google-beta/config.go b/google-beta/config.go index fc03681eb1..5e87907fa6 100644 --- a/google-beta/config.go +++ b/google-beta/config.go @@ -13,7 +13,7 @@ import ( "golang.org/x/oauth2" googleoauth "golang.org/x/oauth2/google" - "google.golang.org/api/accesscontextmanager/v1beta" + accesscontextmanager "google.golang.org/api/accesscontextmanager/v1beta" appengine "google.golang.org/api/appengine/v1" "google.golang.org/api/bigquery/v2" "google.golang.org/api/cloudbilling/v1" @@ -23,12 +23,12 @@ import ( "google.golang.org/api/cloudkms/v1" "google.golang.org/api/cloudresourcemanager/v1" resourceManagerV2Beta1 "google.golang.org/api/cloudresourcemanager/v2beta1" - "google.golang.org/api/composer/v1beta1" + composer "google.golang.org/api/composer/v1beta1" computeBeta "google.golang.org/api/compute/v0.beta" "google.golang.org/api/compute/v1" "google.golang.org/api/container/v1" containerBeta "google.golang.org/api/container/v1beta1" - "google.golang.org/api/dataflow/v1b3" + dataflow "google.golang.org/api/dataflow/v1b3" "google.golang.org/api/dataproc/v1" "google.golang.org/api/dns/v1" dnsBeta "google.golang.org/api/dns/v1beta2" @@ -36,14 +36,14 @@ import ( "google.golang.org/api/iam/v1" cloudlogging "google.golang.org/api/logging/v2" "google.golang.org/api/pubsub/v1" - "google.golang.org/api/redis/v1beta1" - "google.golang.org/api/runtimeconfig/v1beta1" + redis "google.golang.org/api/redis/v1beta1" + runtimeconfig "google.golang.org/api/runtimeconfig/v1beta1" "google.golang.org/api/servicemanagement/v1" - "google.golang.org/api/servicenetworking/v1beta" - "google.golang.org/api/serviceusage/v1beta1" + servicenetworking "google.golang.org/api/servicenetworking/v1beta" + serviceusage "google.golang.org/api/serviceusage/v1beta1" "google.golang.org/api/sourcerepo/v1" "google.golang.org/api/spanner/v1" - "google.golang.org/api/sqladmin/v1beta4" + sqladmin "google.golang.org/api/sqladmin/v1beta4" "google.golang.org/api/storage/v1" "google.golang.org/api/storagetransfer/v1" ) diff --git a/google-beta/resource_cloudbuild_trigger.go b/google-beta/resource_cloudbuild_trigger.go index c5b1226e1b..692d124183 100644 --- a/google-beta/resource_cloudbuild_trigger.go +++ b/google-beta/resource_cloudbuild_trigger.go @@ -102,7 +102,6 @@ func resourceCloudBuildTrigger() *schema.Resource { "ignored_files": { Type: schema.TypeList, Optional: true, - ForceNew: true, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -110,7 +109,6 @@ func resourceCloudBuildTrigger() *schema.Resource { "included_files": { Type: schema.TypeList, Optional: true, - ForceNew: true, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -347,6 +345,18 @@ func resourceCloudBuildTriggerUpdate(d *schema.ResourceData, meta interface{}) e } else if v, ok := d.GetOkExists("filename"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, filenameProp)) { obj["filename"] = filenameProp } + ignoredFilesProp, err := expandCloudBuildTriggerIgnoredFiles(d.Get("ignored_files"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("ignored_files"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, ignoredFilesProp)) { + obj["ignoredFiles"] = ignoredFilesProp + } + includedFilesProp, err := expandCloudBuildTriggerIncludedFiles(d.Get("included_files"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("included_files"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, includedFilesProp)) { + obj["includedFiles"] = includedFilesProp + } triggerTemplateProp, err := expandCloudBuildTriggerTriggerTemplate(d.Get("trigger_template"), d, config) if err != nil { return err diff --git a/google-beta/resource_composer_environment.go b/google-beta/resource_composer_environment.go index a11d329eeb..9cef7aee5e 100644 --- a/google-beta/resource_composer_environment.go +++ b/google-beta/resource_composer_environment.go @@ -7,10 +7,10 @@ import ( "strings" "time" - "github.com/hashicorp/go-version" + version "github.com/hashicorp/go-version" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - "google.golang.org/api/composer/v1beta1" + composer "google.golang.org/api/composer/v1beta1" ) const ( diff --git a/google-beta/resource_composer_environment_test.go b/google-beta/resource_composer_environment_test.go index 48e263e3f1..78b4fb38bf 100644 --- a/google-beta/resource_composer_environment_test.go +++ b/google-beta/resource_composer_environment_test.go @@ -8,11 +8,11 @@ import ( "strings" "time" - "github.com/hashicorp/go-multierror" + multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" - "google.golang.org/api/composer/v1beta1" + composer "google.golang.org/api/composer/v1beta1" "google.golang.org/api/storage/v1" ) diff --git a/google-beta/resource_compute_address.go b/google-beta/resource_compute_address.go index 4b578e09b7..e67e40857b 100644 --- a/google-beta/resource_compute_address.go +++ b/google-beta/resource_compute_address.go @@ -22,7 +22,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeAddress() *schema.Resource { diff --git a/google-beta/resource_compute_autoscaler.go b/google-beta/resource_compute_autoscaler.go index 48e5d42298..6224ee76b0 100644 --- a/google-beta/resource_compute_autoscaler.go +++ b/google-beta/resource_compute_autoscaler.go @@ -23,7 +23,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeAutoscaler() *schema.Resource { diff --git a/google-beta/resource_compute_backend_bucket.go b/google-beta/resource_compute_backend_bucket.go index 15384ea85c..e82cc69819 100644 --- a/google-beta/resource_compute_backend_bucket.go +++ b/google-beta/resource_compute_backend_bucket.go @@ -21,7 +21,7 @@ import ( "time" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeBackendBucket() *schema.Resource { diff --git a/google-beta/resource_compute_disk.go b/google-beta/resource_compute_disk.go index aa9dc3fa5e..1efc242f44 100644 --- a/google-beta/resource_compute_disk.go +++ b/google-beta/resource_compute_disk.go @@ -25,7 +25,7 @@ import ( "github.com/hashicorp/terraform/helper/customdiff" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" "google.golang.org/api/googleapi" ) diff --git a/google-beta/resource_compute_firewall.go b/google-beta/resource_compute_firewall.go index 57f74d6fe8..898e942e43 100644 --- a/google-beta/resource_compute_firewall.go +++ b/google-beta/resource_compute_firewall.go @@ -26,7 +26,7 @@ import ( "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeFirewallRuleHash(v interface{}) int { diff --git a/google-beta/resource_compute_forwarding_rule.go b/google-beta/resource_compute_forwarding_rule.go index 2a9567b99e..5b5e7cfc28 100644 --- a/google-beta/resource_compute_forwarding_rule.go +++ b/google-beta/resource_compute_forwarding_rule.go @@ -23,7 +23,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeForwardingRule() *schema.Resource { diff --git a/google-beta/resource_compute_global_address.go b/google-beta/resource_compute_global_address.go index 0bf0ad80ef..b828444bb5 100644 --- a/google-beta/resource_compute_global_address.go +++ b/google-beta/resource_compute_global_address.go @@ -23,7 +23,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeGlobalAddress() *schema.Resource { diff --git a/google-beta/resource_compute_health_check.go b/google-beta/resource_compute_health_check.go index bb96c6684f..c3e5b8e392 100644 --- a/google-beta/resource_compute_health_check.go +++ b/google-beta/resource_compute_health_check.go @@ -23,7 +23,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeHealthCheck() *schema.Resource { diff --git a/google-beta/resource_compute_http_health_check.go b/google-beta/resource_compute_http_health_check.go index 9013d339df..dab93450af 100644 --- a/google-beta/resource_compute_http_health_check.go +++ b/google-beta/resource_compute_http_health_check.go @@ -22,7 +22,7 @@ import ( "time" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeHttpHealthCheck() *schema.Resource { diff --git a/google-beta/resource_compute_https_health_check.go b/google-beta/resource_compute_https_health_check.go index 7bd24462e7..3167c32b9d 100644 --- a/google-beta/resource_compute_https_health_check.go +++ b/google-beta/resource_compute_https_health_check.go @@ -22,7 +22,7 @@ import ( "time" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeHttpsHealthCheck() *schema.Resource { diff --git a/google-beta/resource_compute_image.go b/google-beta/resource_compute_image.go index b52f30f792..f7b1cb875a 100644 --- a/google-beta/resource_compute_image.go +++ b/google-beta/resource_compute_image.go @@ -23,7 +23,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeImage() *schema.Resource { diff --git a/google-beta/resource_compute_interconnect_attachment.go b/google-beta/resource_compute_interconnect_attachment.go index f008563e1f..50a4bb9f3a 100644 --- a/google-beta/resource_compute_interconnect_attachment.go +++ b/google-beta/resource_compute_interconnect_attachment.go @@ -22,7 +22,7 @@ import ( "time" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeInterconnectAttachment() *schema.Resource { diff --git a/google-beta/resource_compute_region_autoscaler.go b/google-beta/resource_compute_region_autoscaler.go index 3f443acf57..84693f9d30 100644 --- a/google-beta/resource_compute_region_autoscaler.go +++ b/google-beta/resource_compute_region_autoscaler.go @@ -23,7 +23,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeRegionAutoscaler() *schema.Resource { diff --git a/google-beta/resource_compute_region_disk.go b/google-beta/resource_compute_region_disk.go index d2c42330b9..f4055cbec0 100644 --- a/google-beta/resource_compute_region_disk.go +++ b/google-beta/resource_compute_region_disk.go @@ -24,7 +24,7 @@ import ( "github.com/hashicorp/terraform/helper/customdiff" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" "google.golang.org/api/googleapi" ) diff --git a/google-beta/resource_compute_route.go b/google-beta/resource_compute_route.go index 724f286810..9aa2a16779 100644 --- a/google-beta/resource_compute_route.go +++ b/google-beta/resource_compute_route.go @@ -22,7 +22,7 @@ import ( "time" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeRoute() *schema.Resource { diff --git a/google-beta/resource_compute_router.go b/google-beta/resource_compute_router.go index 3cf1d85201..e72fb5d9c8 100644 --- a/google-beta/resource_compute_router.go +++ b/google-beta/resource_compute_router.go @@ -23,7 +23,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeRouter() *schema.Resource { diff --git a/google-beta/resource_compute_snapshot.go b/google-beta/resource_compute_snapshot.go index 5c56bbb0d3..3f89eb8966 100644 --- a/google-beta/resource_compute_snapshot.go +++ b/google-beta/resource_compute_snapshot.go @@ -22,7 +22,7 @@ import ( "time" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeSnapshot() *schema.Resource { diff --git a/google-beta/resource_compute_ssl_certificate.go b/google-beta/resource_compute_ssl_certificate.go index de6ee9e32d..f39c804117 100644 --- a/google-beta/resource_compute_ssl_certificate.go +++ b/google-beta/resource_compute_ssl_certificate.go @@ -23,7 +23,7 @@ import ( "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeSslCertificate() *schema.Resource { diff --git a/google-beta/resource_compute_ssl_policy.go b/google-beta/resource_compute_ssl_policy.go index 4c67d55836..766032421b 100644 --- a/google-beta/resource_compute_ssl_policy.go +++ b/google-beta/resource_compute_ssl_policy.go @@ -22,7 +22,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func sslPolicyCustomizeDiff(diff *schema.ResourceDiff, v interface{}) error { diff --git a/google-beta/resource_compute_subnetwork.go b/google-beta/resource_compute_subnetwork.go index 62a01a1124..0853ed22b5 100644 --- a/google-beta/resource_compute_subnetwork.go +++ b/google-beta/resource_compute_subnetwork.go @@ -25,7 +25,7 @@ import ( "github.com/apparentlymart/go-cidr/cidr" "github.com/hashicorp/terraform/helper/customdiff" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) // Whether the IP CIDR change shrinks the block. diff --git a/google-beta/resource_compute_target_http_proxy.go b/google-beta/resource_compute_target_http_proxy.go index c3d193c002..5a023b89ac 100644 --- a/google-beta/resource_compute_target_http_proxy.go +++ b/google-beta/resource_compute_target_http_proxy.go @@ -22,7 +22,7 @@ import ( "time" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeTargetHttpProxy() *schema.Resource { diff --git a/google-beta/resource_compute_target_https_proxy.go b/google-beta/resource_compute_target_https_proxy.go index ce55febdf7..28ad0512ba 100644 --- a/google-beta/resource_compute_target_https_proxy.go +++ b/google-beta/resource_compute_target_https_proxy.go @@ -23,7 +23,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeTargetHttpsProxy() *schema.Resource { diff --git a/google-beta/resource_compute_target_ssl_proxy.go b/google-beta/resource_compute_target_ssl_proxy.go index da9fc70645..28b7535ae9 100644 --- a/google-beta/resource_compute_target_ssl_proxy.go +++ b/google-beta/resource_compute_target_ssl_proxy.go @@ -23,7 +23,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeTargetSslProxy() *schema.Resource { diff --git a/google-beta/resource_compute_target_tcp_proxy.go b/google-beta/resource_compute_target_tcp_proxy.go index 95b56ae691..505f14cff7 100644 --- a/google-beta/resource_compute_target_tcp_proxy.go +++ b/google-beta/resource_compute_target_tcp_proxy.go @@ -23,7 +23,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeTargetTcpProxy() *schema.Resource { diff --git a/google-beta/resource_compute_url_map.go b/google-beta/resource_compute_url_map.go index 926b481477..f9c532a8bf 100644 --- a/google-beta/resource_compute_url_map.go +++ b/google-beta/resource_compute_url_map.go @@ -22,7 +22,7 @@ import ( "time" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeUrlMap() *schema.Resource { diff --git a/google-beta/resource_compute_vpn_gateway.go b/google-beta/resource_compute_vpn_gateway.go index 28ffaee5dd..c052821e55 100644 --- a/google-beta/resource_compute_vpn_gateway.go +++ b/google-beta/resource_compute_vpn_gateway.go @@ -21,7 +21,7 @@ import ( "time" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) func resourceComputeVpnGateway() *schema.Resource { diff --git a/google-beta/resource_compute_vpn_tunnel.go b/google-beta/resource_compute_vpn_tunnel.go index 2c454b6bd6..b6d96d3c1e 100644 --- a/google-beta/resource_compute_vpn_tunnel.go +++ b/google-beta/resource_compute_vpn_tunnel.go @@ -25,7 +25,7 @@ import ( "time" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" ) // validatePeerAddr returns false if a tunnel's peer_ip property diff --git a/google-beta/resource_container_cluster.go b/google-beta/resource_container_cluster.go index 4e3e817851..fa066962ac 100644 --- a/google-beta/resource_container_cluster.go +++ b/google-beta/resource_container_cluster.go @@ -8,7 +8,7 @@ import ( "time" "github.com/hashicorp/errwrap" - "github.com/hashicorp/go-version" + version "github.com/hashicorp/go-version" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" diff --git a/google-beta/resource_service_networking_connection.go b/google-beta/resource_service_networking_connection.go index 943b3039c4..372ec3a05d 100644 --- a/google-beta/resource_service_networking_connection.go +++ b/google-beta/resource_service_networking_connection.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/hashicorp/terraform/helper/schema" - "google.golang.org/api/servicenetworking/v1beta" + servicenetworking "google.golang.org/api/servicenetworking/v1beta" ) func resourceServiceNetworkingConnection() *schema.Resource { diff --git a/google-beta/resource_sql_database_instance_test.go b/google-beta/resource_sql_database_instance_test.go index 5b5a1f8521..9b866eea9c 100644 --- a/google-beta/resource_sql_database_instance_test.go +++ b/google-beta/resource_sql_database_instance_test.go @@ -9,8 +9,7 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" - - "google.golang.org/api/sqladmin/v1beta4" + sqladmin "google.golang.org/api/sqladmin/v1beta4" ) // Fields that should be ignored in import tests because they aren't returned diff --git a/google-beta/service_networking_operation.go b/google-beta/service_networking_operation.go index 66067e08c3..3ba199d698 100644 --- a/google-beta/service_networking_operation.go +++ b/google-beta/service_networking_operation.go @@ -1,7 +1,7 @@ package google import ( - "google.golang.org/api/servicenetworking/v1beta" + servicenetworking "google.golang.org/api/servicenetworking/v1beta" ) type ServiceNetworkingOperationWaiter struct {