provider: Require Go 1.11 in TravisCI and README

provider: Run go fix
provider: Run go fmt
This commit is contained in:
Alex Pilon 2019-01-07 17:05:13 -05:00
parent cc2cfb8156
commit 29d16d3217
No known key found for this signature in database
GPG Key ID: 95659F6AEFC48D7E
14 changed files with 40 additions and 40 deletions

View File

@ -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

View File

@ -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
---------------------

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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.",

View File

@ -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",

View File

@ -51,7 +51,7 @@ func dataSourceDigitalOceanKubernetesCluster() *schema.Resource {
"tags": tagsSchema(),
"node_pool": &schema.Schema{
"node_pool": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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,

View File

@ -68,7 +68,7 @@ func resourceDigitalOceanKubernetesCluster() *schema.Resource {
"tags": tagsSchema(),
"node_pool": &schema.Schema{
"node_pool": {
Type: schema.TypeList,
Required: true,
MinItems: 1,