diff --git a/README.md b/README.md index 5d7d2103..dd0f5def 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ This provider plugin is maintained by: Requirements ------------ -- [Terraform](https://www.terraform.io/downloads.html) 0.10.x -- [Go](https://golang.org/doc/install) 1.9 (to build the provider plugin) +- [Terraform](https://www.terraform.io/downloads.html) 0.10+ +- [Go](https://golang.org/doc/install) 1.11.0 or higher Building The Provider --------------------- @@ -51,7 +51,7 @@ To upgrade to the latest stable version of the Google provider run `terraform in Developing the Provider --------------------------- -If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.9+ is *required*). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`. +If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.11+ is *required*). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`. To compile the provider, run `make build`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory. diff --git a/google/image_test.go b/google/image_test.go index 6eb9cfe0..026d02e5 100644 --- a/google/image_test.go +++ b/google/image_test.go @@ -77,12 +77,12 @@ func testAccCheckComputeImageResolution(n string) resource.TestCheckFunc { "global/images/" + name: "global/images/" + name, "global/images/family/" + family: "global/images/family/" + family, - name: "global/images/" + name, - family: "global/images/family/" + family, - "family/" + family: "global/images/family/" + family, - project + "/" + name: "projects/" + project + "/global/images/" + name, - project + "/" + family: "projects/" + project + "/global/images/family/" + family, - link: link, + name: "global/images/" + name, + family: "global/images/family/" + family, + "family/" + family: "global/images/family/" + family, + project + "/" + name: "projects/" + project + "/global/images/" + name, + project + "/" + family: "projects/" + project + "/global/images/family/" + family, + link: link, } for input, expectation := range images { diff --git a/google/resource_binaryauthorization_attestor.go b/google/resource_binaryauthorization_attestor.go index 9b02f402..33a26b69 100644 --- a/google/resource_binaryauthorization_attestor.go +++ b/google/resource_binaryauthorization_attestor.go @@ -281,8 +281,8 @@ func flattenBinaryAuthorizationAttestorAttestationAuthorityNotePublicKeys(v inte for _, raw := range l { original := raw.(map[string]interface{}) transformed = append(transformed, map[string]interface{}{ - "comment": flattenBinaryAuthorizationAttestorAttestationAuthorityNotePublicKeysComment(original["comment"]), - "id": flattenBinaryAuthorizationAttestorAttestationAuthorityNotePublicKeysId(original["id"]), + "comment": flattenBinaryAuthorizationAttestorAttestationAuthorityNotePublicKeysComment(original["comment"]), + "id": flattenBinaryAuthorizationAttestorAttestationAuthorityNotePublicKeysId(original["id"]), "ascii_armored_pgp_public_key": flattenBinaryAuthorizationAttestorAttestationAuthorityNotePublicKeysAsciiArmoredPgpPublicKey(original["asciiArmoredPgpPublicKey"]), }) } diff --git a/google/resource_compute_instance_migrate_test.go b/google/resource_compute_instance_migrate_test.go index e0c8c80f..871e22b0 100644 --- a/google/resource_compute_instance_migrate_test.go +++ b/google/resource_compute_instance_migrate_test.go @@ -156,7 +156,7 @@ func TestAccComputeInstanceMigrateState_bootDisk(t *testing.T) { "disk.0.device_name": "persistent-disk-0", "disk.0.disk_encryption_key_raw": "encrypt-key", "disk.0.disk_encryption_key_sha256": "encrypt-key-sha", - "zone": zone, + "zone": zone, } expected := map[string]string{ "boot_disk.#": "1", @@ -223,7 +223,7 @@ func TestAccComputeInstanceMigrateState_v4FixBootDisk(t *testing.T) { "disk.0.device_name": "persistent-disk-0", "disk.0.disk_encryption_key_raw": "encrypt-key", "disk.0.disk_encryption_key_sha256": "encrypt-key-sha", - "zone": zone, + "zone": zone, } expected := map[string]string{ "boot_disk.#": "1", @@ -305,7 +305,7 @@ func TestAccComputeInstanceMigrateState_attachedDiskFromSource(t *testing.T) { "disk.0.device_name": "persistent-disk-1", "disk.0.disk_encryption_key_raw": "encrypt-key", "disk.0.disk_encryption_key_sha256": "encrypt-key-sha", - "zone": zone, + "zone": zone, } expected := map[string]string{ "boot_disk.#": "1", @@ -385,7 +385,7 @@ func TestAccComputeInstanceMigrateState_v4FixAttachedDiskFromSource(t *testing.T "disk.0.device_name": "persistent-disk-1", "disk.0.disk_encryption_key_raw": "encrypt-key", "disk.0.disk_encryption_key_sha256": "encrypt-key-sha", - "zone": zone, + "zone": zone, } expected := map[string]string{ "boot_disk.#": "1", @@ -452,7 +452,7 @@ func TestAccComputeInstanceMigrateState_attachedDiskFromEncryptionKey(t *testing "disk.0.image": "projects/debian-cloud/global/images/family/debian-9", "disk.0.disk_encryption_key_raw": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=", "disk.0.disk_encryption_key_sha256": "esTuF7d4eatX4cnc4JsiEiaI+Rff78JgPhA/v1zxX9E=", - "zone": zone, + "zone": zone, } expected := map[string]string{ "boot_disk.#": "1", @@ -520,7 +520,7 @@ func TestAccComputeInstanceMigrateState_v4FixAttachedDiskFromEncryptionKey(t *te "disk.0.image": "projects/debian-cloud/global/images/family/debian-9", "disk.0.disk_encryption_key_raw": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=", "disk.0.disk_encryption_key_sha256": "esTuF7d4eatX4cnc4JsiEiaI+Rff78JgPhA/v1zxX9E=", - "zone": zone, + "zone": zone, } expected := map[string]string{ "boot_disk.#": "1", @@ -600,8 +600,8 @@ func TestAccComputeInstanceMigrateState_attachedDiskFromAutoDeleteAndImage(t *te "attached_disk.0.device_name": "persistent-disk-2", "attached_disk.1.source": "https://www.googleapis.com/compute/v1/projects/" + config.Project + "/zones/" + zone + "/disks/" + instanceName + "-1", "attached_disk.1.device_name": "persistent-disk-1", - "zone": zone, - "create_timeout": "4", + "zone": zone, + "create_timeout": "4", } runInstanceMigrateTest(t, instanceName, "migrate disk to attached disk", 2 /* state version */, attributes, expected, config) @@ -672,7 +672,7 @@ func TestAccComputeInstanceMigrateState_v4FixAttachedDiskFromAutoDeleteAndImage( "attached_disk.0.device_name": "persistent-disk-2", "attached_disk.1.source": "https://www.googleapis.com/compute/v1/projects/" + config.Project + "/zones/" + zone + "/disks/" + instanceName + "-1", "attached_disk.1.device_name": "persistent-disk-1", - "zone": zone, + "zone": zone, } runInstanceMigrateTest(t, instanceName, "migrate disk to attached disk", 4 /* state version */, attributes, expected, config) @@ -735,8 +735,8 @@ func TestAccComputeInstanceMigrateState_scratchDisk(t *testing.T) { "boot_disk.#": "1", "scratch_disk.#": "1", "scratch_disk.0.interface": "SCSI", - "zone": zone, - "create_timeout": "4", + "zone": zone, + "create_timeout": "4", } runInstanceMigrateTest(t, instanceName, "migrate disk to scratch disk", 2 /* state version */, attributes, expected, config) @@ -799,7 +799,7 @@ func TestAccComputeInstanceMigrateState_v4FixScratchDisk(t *testing.T) { "boot_disk.#": "1", "scratch_disk.#": "1", "scratch_disk.0.interface": "SCSI", - "zone": zone, + "zone": zone, } runInstanceMigrateTest(t, instanceName, "migrate disk to scratch disk", 4 /* state version */, attributes, expected, config) diff --git a/google/resource_compute_network.go b/google/resource_compute_network.go index c615bc34..c30054e9 100644 --- a/google/resource_compute_network.go +++ b/google/resource_compute_network.go @@ -95,7 +95,7 @@ func resourceComputeNetworkCreate(d *schema.ResourceData, meta interface{}) erro // Build the network parameter network := &compute.Network{ - Name: d.Get("name").(string), + Name: d.Get("name").(string), AutoCreateSubnetworks: autoCreateSubnetworks, Description: d.Get("description").(string), } diff --git a/google/resource_sql_database_instance.go b/google/resource_sql_database_instance.go index 5770e92f..aa8890fc 100644 --- a/google/resource_sql_database_instance.go +++ b/google/resource_sql_database_instance.go @@ -1225,7 +1225,7 @@ func flattenAuthorizedNetworks(entries []*sqladmin.AclEntry) interface{} { func flattenLocationPreference(locationPreference *sqladmin.LocationPreference) interface{} { data := map[string]interface{}{ "follow_gae_application": locationPreference.FollowGaeApplication, - "zone": locationPreference.Zone, + "zone": locationPreference.Zone, } return []map[string]interface{}{data} diff --git a/google/validation_test.go b/google/validation_test.go index 967ee5f7..5a67a77d 100644 --- a/google/validation_test.go +++ b/google/validation_test.go @@ -247,15 +247,15 @@ func TestOrEmpty(t *testing.T) { ExpectValidationErrors bool }{ "accept empty value": { - Value: "", + Value: "", ExpectValidationErrors: false, }, "non empty value is accepted when valid": { - Value: "valid", + Value: "valid", ExpectValidationErrors: false, }, "non empty value is rejected if invalid": { - Value: "invalid", + Value: "invalid", ExpectValidationErrors: true, }, }