From 29d16d32174967e06a74e5c9fbd97c3789551f34 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Mon, 7 Jan 2019 17:05:13 -0500 Subject: [PATCH] provider: Require Go 1.11 in TravisCI and README provider: Run go fix provider: Run go fmt --- .travis.yml | 2 +- README.md | 2 +- .../datasource_digitalocean_certificate.go | 2 +- .../datasource_digitalocean_domain.go | 6 +++--- .../datasource_digitalocean_droplet.go | 4 ++-- .../datasource_digitalocean_floating_ip.go | 6 +++--- digitalocean/datasource_digitalocean_image.go | 16 +++++++-------- ...asource_digitalocean_kubernetes_cluster.go | 2 +- .../datasource_digitalocean_loadbalancer.go | 4 ++-- .../datasource_digitalocean_record.go | 20 +++++++++---------- .../datasource_digitalocean_ssh_key.go | 6 +++--- digitalocean/datasource_digitalocean_tag.go | 2 +- .../datasource_digitalocean_volume.go | 6 +++--- ...esource_digitalocean_kubernetes_cluster.go | 2 +- 14 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.travis.yml b/.travis.yml index eaf5e44a..e85a5f22 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ services: - docker language: go go: -- "1.9.7" + - "1.11.x" install: # This script is used by the Travis build to install a cookie for diff --git a/README.md b/README.md index 6b141421..9fbc25d5 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Requirements ------------ - [Terraform](https://www.terraform.io/downloads.html) 0.10.x -- [Go](https://golang.org/doc/install) 1.9 (to build the provider plugin) +- [Go](https://golang.org/doc/install) 1.11 (to build the provider plugin) Building The Provider --------------------- diff --git a/digitalocean/datasource_digitalocean_certificate.go b/digitalocean/datasource_digitalocean_certificate.go index 241475eb..8aa8d446 100644 --- a/digitalocean/datasource_digitalocean_certificate.go +++ b/digitalocean/datasource_digitalocean_certificate.go @@ -14,7 +14,7 @@ func dataSourceDigitalOceanCertificate() *schema.Resource { Read: dataSourceDigitalOceanCertificateRead, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, Description: "name of the certificate", diff --git a/digitalocean/datasource_digitalocean_domain.go b/digitalocean/datasource_digitalocean_domain.go index 42fc4e54..a26e4d2c 100644 --- a/digitalocean/datasource_digitalocean_domain.go +++ b/digitalocean/datasource_digitalocean_domain.go @@ -14,19 +14,19 @@ func dataSourceDigitalOceanDomain() *schema.Resource { Read: dataSourceDigitalOceanDomainRead, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, Description: "name of the domain", ValidateFunc: validation.NoZeroValues, }, // computed attributes - "ttl": &schema.Schema{ + "ttl": { Type: schema.TypeInt, Computed: true, Description: "ttl of the domain", }, - "zone_file": &schema.Schema{ + "zone_file": { Type: schema.TypeString, Computed: true, Description: "zone file of the domain", diff --git a/digitalocean/datasource_digitalocean_droplet.go b/digitalocean/datasource_digitalocean_droplet.go index b2ba9299..132ad136 100644 --- a/digitalocean/datasource_digitalocean_droplet.go +++ b/digitalocean/datasource_digitalocean_droplet.go @@ -16,14 +16,14 @@ func dataSourceDigitalOceanDroplet() *schema.Resource { Read: dataSourceDigitalOceanDropletRead, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, Description: "name of the droplet", ValidateFunc: validation.NoZeroValues, }, // computed attributes - "region": &schema.Schema{ + "region": { Type: schema.TypeString, Computed: true, Description: "the region that the droplet instance is deployed in", diff --git a/digitalocean/datasource_digitalocean_floating_ip.go b/digitalocean/datasource_digitalocean_floating_ip.go index a0919c33..3bb88f00 100644 --- a/digitalocean/datasource_digitalocean_floating_ip.go +++ b/digitalocean/datasource_digitalocean_floating_ip.go @@ -14,19 +14,19 @@ func dataSourceDigitalOceanFloatingIp() *schema.Resource { Read: dataSourceDigitalOceanFloatingIpRead, Schema: map[string]*schema.Schema{ - "ip_address": &schema.Schema{ + "ip_address": { Type: schema.TypeString, Required: true, Description: "floating ip address", ValidateFunc: validation.NoZeroValues, }, // computed attributes - "region": &schema.Schema{ + "region": { Type: schema.TypeString, Computed: true, Description: "the region that the floating ip is reserved to", }, - "droplet_id": &schema.Schema{ + "droplet_id": { Type: schema.TypeInt, Computed: true, Description: "the droplet id that the floating ip has been assigned to.", diff --git a/digitalocean/datasource_digitalocean_image.go b/digitalocean/datasource_digitalocean_image.go index 18a07dd6..df3fcbb3 100644 --- a/digitalocean/datasource_digitalocean_image.go +++ b/digitalocean/datasource_digitalocean_image.go @@ -15,47 +15,47 @@ func dataSourceDigitalOceanImage() *schema.Resource { Read: dataSourceDigitalOceanImageRead, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Optional: true, Description: "name of the image", ValidateFunc: validation.NoZeroValues, ConflictsWith: []string{"slug"}, }, - "slug": &schema.Schema{ + "slug": { Type: schema.TypeString, Optional: true, Description: "slug of the image", ValidateFunc: validation.NoZeroValues, }, // computed attributes - "image": &schema.Schema{ + "image": { Type: schema.TypeString, Computed: true, Description: "slug or id of the image", }, - "distribution": &schema.Schema{ + "distribution": { Type: schema.TypeString, Computed: true, Description: "distribution of the OS of the image", }, - "private": &schema.Schema{ + "private": { Type: schema.TypeBool, Computed: true, Description: "Is the image private or non-private", }, - "min_disk_size": &schema.Schema{ + "min_disk_size": { Type: schema.TypeInt, Computed: true, Description: "minimum disk size required by the image", }, - "regions": &schema.Schema{ + "regions": { Type: schema.TypeSet, Computed: true, Description: "list of the regions that the image is available in", Elem: &schema.Schema{Type: schema.TypeString}, }, - "type": &schema.Schema{ + "type": { Type: schema.TypeString, Computed: true, Description: "type of the image", diff --git a/digitalocean/datasource_digitalocean_kubernetes_cluster.go b/digitalocean/datasource_digitalocean_kubernetes_cluster.go index 4b09930d..af79661f 100644 --- a/digitalocean/datasource_digitalocean_kubernetes_cluster.go +++ b/digitalocean/datasource_digitalocean_kubernetes_cluster.go @@ -51,7 +51,7 @@ func dataSourceDigitalOceanKubernetesCluster() *schema.Resource { "tags": tagsSchema(), - "node_pool": &schema.Schema{ + "node_pool": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ diff --git a/digitalocean/datasource_digitalocean_loadbalancer.go b/digitalocean/datasource_digitalocean_loadbalancer.go index 3820baa4..bedcf344 100644 --- a/digitalocean/datasource_digitalocean_loadbalancer.go +++ b/digitalocean/datasource_digitalocean_loadbalancer.go @@ -14,14 +14,14 @@ func dataSourceDigitalOceanLoadbalancer() *schema.Resource { Read: dataSourceDigitalOceanLoadbalancerRead, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, Description: "name of the load balancer", ValidateFunc: validation.NoZeroValues, }, // computed attributes - "region": &schema.Schema{ + "region": { Type: schema.TypeString, Computed: true, Description: "the region that the load blanacer is deployed in", diff --git a/digitalocean/datasource_digitalocean_record.go b/digitalocean/datasource_digitalocean_record.go index a6805fbf..5cdfc4ee 100644 --- a/digitalocean/datasource_digitalocean_record.go +++ b/digitalocean/datasource_digitalocean_record.go @@ -15,55 +15,55 @@ func dataSourceDigitalOceanRecord() *schema.Resource { Read: dataSourceDigitalOceanRecordRead, Schema: map[string]*schema.Schema{ - "domain": &schema.Schema{ + "domain": { Type: schema.TypeString, Required: true, Description: "domain of the name record", ValidateFunc: validation.NoZeroValues, }, - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, Description: "name of the record", ValidateFunc: validation.NoZeroValues, }, // computed attributes - "type": &schema.Schema{ + "type": { Type: schema.TypeString, Computed: true, Description: "type of the name record", }, - "data": &schema.Schema{ + "data": { Type: schema.TypeString, Computed: true, Description: "name record data", }, - "priority": &schema.Schema{ + "priority": { Type: schema.TypeInt, Computed: true, Description: "priority of the name record", }, - "port": &schema.Schema{ + "port": { Type: schema.TypeInt, Computed: true, Description: "port of the name record", }, - "ttl": &schema.Schema{ + "ttl": { Type: schema.TypeInt, Computed: true, Description: "ttl of the name record", }, - "weight": &schema.Schema{ + "weight": { Type: schema.TypeInt, Computed: true, Description: "weight of the name record", }, - "flags": &schema.Schema{ + "flags": { Type: schema.TypeInt, Computed: true, Description: "flags of the name record", }, - "tag": &schema.Schema{ + "tag": { Type: schema.TypeString, Computed: true, Description: "tag of the name record", diff --git a/digitalocean/datasource_digitalocean_ssh_key.go b/digitalocean/datasource_digitalocean_ssh_key.go index f63b0940..63d19bf3 100644 --- a/digitalocean/datasource_digitalocean_ssh_key.go +++ b/digitalocean/datasource_digitalocean_ssh_key.go @@ -15,19 +15,19 @@ func dataSourceDigitalOceanSSHKey() *schema.Resource { Read: dataSourceDigitalOceanSSHKeyRead, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, Description: "name of the ssh key", ValidateFunc: validation.NoZeroValues, }, // computed attributes - "public_key": &schema.Schema{ + "public_key": { Type: schema.TypeString, Computed: true, Description: "public key part of the ssh key", }, - "fingerprint": &schema.Schema{ + "fingerprint": { Type: schema.TypeString, Computed: true, Description: "fingerprint of the ssh key", diff --git a/digitalocean/datasource_digitalocean_tag.go b/digitalocean/datasource_digitalocean_tag.go index 2d62cc27..ec5fdb93 100644 --- a/digitalocean/datasource_digitalocean_tag.go +++ b/digitalocean/datasource_digitalocean_tag.go @@ -13,7 +13,7 @@ func dataSourceDigitalOceanTag() *schema.Resource { Read: dataSourceDigitalOceanTagRead, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, Description: "name of the tag", diff --git a/digitalocean/datasource_digitalocean_volume.go b/digitalocean/datasource_digitalocean_volume.go index ab7fc9be..48da7cef 100644 --- a/digitalocean/datasource_digitalocean_volume.go +++ b/digitalocean/datasource_digitalocean_volume.go @@ -14,13 +14,13 @@ func dataSourceDigitalOceanVolume() *schema.Resource { Read: dataSourceDigitalOceanVolumeRead, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, Description: "name of the volume", ValidateFunc: validation.NoZeroValues, }, - "region": &schema.Schema{ + "region": { Type: schema.TypeString, Optional: true, Description: "the region that the volume is provisioned in", @@ -47,7 +47,7 @@ func dataSourceDigitalOceanVolume() *schema.Resource { Computed: true, Description: "the label currently applied to the filesystem", }, - "droplet_ids": &schema.Schema{ + "droplet_ids": { Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeInt}, Computed: true, diff --git a/digitalocean/resource_digitalocean_kubernetes_cluster.go b/digitalocean/resource_digitalocean_kubernetes_cluster.go index e1218d72..f238dbdb 100644 --- a/digitalocean/resource_digitalocean_kubernetes_cluster.go +++ b/digitalocean/resource_digitalocean_kubernetes_cluster.go @@ -68,7 +68,7 @@ func resourceDigitalOceanKubernetesCluster() *schema.Resource { "tags": tagsSchema(), - "node_pool": &schema.Schema{ + "node_pool": { Type: schema.TypeList, Required: true, MinItems: 1,