provider: Require Go 1.11 in TravisCI and README
provider: Run go fix provider: Run go fmt
This commit is contained in:
parent
cc2cfb8156
commit
29d16d3217
|
@ -4,7 +4,7 @@ services:
|
||||||
- docker
|
- docker
|
||||||
language: go
|
language: go
|
||||||
go:
|
go:
|
||||||
- "1.9.7"
|
- "1.11.x"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
# This script is used by the Travis build to install a cookie for
|
# This script is used by the Travis build to install a cookie for
|
||||||
|
|
|
@ -11,7 +11,7 @@ Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
- [Terraform](https://www.terraform.io/downloads.html) 0.10.x
|
- [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
|
Building The Provider
|
||||||
---------------------
|
---------------------
|
||||||
|
|
|
@ -14,7 +14,7 @@ func dataSourceDigitalOceanCertificate() *schema.Resource {
|
||||||
Read: dataSourceDigitalOceanCertificateRead,
|
Read: dataSourceDigitalOceanCertificateRead,
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
|
|
||||||
"name": &schema.Schema{
|
"name": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
Description: "name of the certificate",
|
Description: "name of the certificate",
|
||||||
|
|
|
@ -14,19 +14,19 @@ func dataSourceDigitalOceanDomain() *schema.Resource {
|
||||||
Read: dataSourceDigitalOceanDomainRead,
|
Read: dataSourceDigitalOceanDomainRead,
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
|
|
||||||
"name": &schema.Schema{
|
"name": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
Description: "name of the domain",
|
Description: "name of the domain",
|
||||||
ValidateFunc: validation.NoZeroValues,
|
ValidateFunc: validation.NoZeroValues,
|
||||||
},
|
},
|
||||||
// computed attributes
|
// computed attributes
|
||||||
"ttl": &schema.Schema{
|
"ttl": {
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "ttl of the domain",
|
Description: "ttl of the domain",
|
||||||
},
|
},
|
||||||
"zone_file": &schema.Schema{
|
"zone_file": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "zone file of the domain",
|
Description: "zone file of the domain",
|
||||||
|
|
|
@ -16,14 +16,14 @@ func dataSourceDigitalOceanDroplet() *schema.Resource {
|
||||||
Read: dataSourceDigitalOceanDropletRead,
|
Read: dataSourceDigitalOceanDropletRead,
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
|
|
||||||
"name": &schema.Schema{
|
"name": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
Description: "name of the droplet",
|
Description: "name of the droplet",
|
||||||
ValidateFunc: validation.NoZeroValues,
|
ValidateFunc: validation.NoZeroValues,
|
||||||
},
|
},
|
||||||
// computed attributes
|
// computed attributes
|
||||||
"region": &schema.Schema{
|
"region": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "the region that the droplet instance is deployed in",
|
Description: "the region that the droplet instance is deployed in",
|
||||||
|
|
|
@ -14,19 +14,19 @@ func dataSourceDigitalOceanFloatingIp() *schema.Resource {
|
||||||
Read: dataSourceDigitalOceanFloatingIpRead,
|
Read: dataSourceDigitalOceanFloatingIpRead,
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
|
|
||||||
"ip_address": &schema.Schema{
|
"ip_address": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
Description: "floating ip address",
|
Description: "floating ip address",
|
||||||
ValidateFunc: validation.NoZeroValues,
|
ValidateFunc: validation.NoZeroValues,
|
||||||
},
|
},
|
||||||
// computed attributes
|
// computed attributes
|
||||||
"region": &schema.Schema{
|
"region": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "the region that the floating ip is reserved to",
|
Description: "the region that the floating ip is reserved to",
|
||||||
},
|
},
|
||||||
"droplet_id": &schema.Schema{
|
"droplet_id": {
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "the droplet id that the floating ip has been assigned to.",
|
Description: "the droplet id that the floating ip has been assigned to.",
|
||||||
|
|
|
@ -15,47 +15,47 @@ func dataSourceDigitalOceanImage() *schema.Resource {
|
||||||
Read: dataSourceDigitalOceanImageRead,
|
Read: dataSourceDigitalOceanImageRead,
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
|
|
||||||
"name": &schema.Schema{
|
"name": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Description: "name of the image",
|
Description: "name of the image",
|
||||||
ValidateFunc: validation.NoZeroValues,
|
ValidateFunc: validation.NoZeroValues,
|
||||||
ConflictsWith: []string{"slug"},
|
ConflictsWith: []string{"slug"},
|
||||||
},
|
},
|
||||||
"slug": &schema.Schema{
|
"slug": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Description: "slug of the image",
|
Description: "slug of the image",
|
||||||
ValidateFunc: validation.NoZeroValues,
|
ValidateFunc: validation.NoZeroValues,
|
||||||
},
|
},
|
||||||
// computed attributes
|
// computed attributes
|
||||||
"image": &schema.Schema{
|
"image": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "slug or id of the image",
|
Description: "slug or id of the image",
|
||||||
},
|
},
|
||||||
"distribution": &schema.Schema{
|
"distribution": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "distribution of the OS of the image",
|
Description: "distribution of the OS of the image",
|
||||||
},
|
},
|
||||||
"private": &schema.Schema{
|
"private": {
|
||||||
Type: schema.TypeBool,
|
Type: schema.TypeBool,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "Is the image private or non-private",
|
Description: "Is the image private or non-private",
|
||||||
},
|
},
|
||||||
"min_disk_size": &schema.Schema{
|
"min_disk_size": {
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "minimum disk size required by the image",
|
Description: "minimum disk size required by the image",
|
||||||
},
|
},
|
||||||
"regions": &schema.Schema{
|
"regions": {
|
||||||
Type: schema.TypeSet,
|
Type: schema.TypeSet,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "list of the regions that the image is available in",
|
Description: "list of the regions that the image is available in",
|
||||||
Elem: &schema.Schema{Type: schema.TypeString},
|
Elem: &schema.Schema{Type: schema.TypeString},
|
||||||
},
|
},
|
||||||
"type": &schema.Schema{
|
"type": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "type of the image",
|
Description: "type of the image",
|
||||||
|
|
|
@ -51,7 +51,7 @@ func dataSourceDigitalOceanKubernetesCluster() *schema.Resource {
|
||||||
|
|
||||||
"tags": tagsSchema(),
|
"tags": tagsSchema(),
|
||||||
|
|
||||||
"node_pool": &schema.Schema{
|
"node_pool": {
|
||||||
Type: schema.TypeList,
|
Type: schema.TypeList,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Elem: &schema.Resource{
|
Elem: &schema.Resource{
|
||||||
|
|
|
@ -14,14 +14,14 @@ func dataSourceDigitalOceanLoadbalancer() *schema.Resource {
|
||||||
Read: dataSourceDigitalOceanLoadbalancerRead,
|
Read: dataSourceDigitalOceanLoadbalancerRead,
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
|
|
||||||
"name": &schema.Schema{
|
"name": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
Description: "name of the load balancer",
|
Description: "name of the load balancer",
|
||||||
ValidateFunc: validation.NoZeroValues,
|
ValidateFunc: validation.NoZeroValues,
|
||||||
},
|
},
|
||||||
// computed attributes
|
// computed attributes
|
||||||
"region": &schema.Schema{
|
"region": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "the region that the load blanacer is deployed in",
|
Description: "the region that the load blanacer is deployed in",
|
||||||
|
|
|
@ -15,55 +15,55 @@ func dataSourceDigitalOceanRecord() *schema.Resource {
|
||||||
Read: dataSourceDigitalOceanRecordRead,
|
Read: dataSourceDigitalOceanRecordRead,
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
|
|
||||||
"domain": &schema.Schema{
|
"domain": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
Description: "domain of the name record",
|
Description: "domain of the name record",
|
||||||
ValidateFunc: validation.NoZeroValues,
|
ValidateFunc: validation.NoZeroValues,
|
||||||
},
|
},
|
||||||
"name": &schema.Schema{
|
"name": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
Description: "name of the record",
|
Description: "name of the record",
|
||||||
ValidateFunc: validation.NoZeroValues,
|
ValidateFunc: validation.NoZeroValues,
|
||||||
},
|
},
|
||||||
// computed attributes
|
// computed attributes
|
||||||
"type": &schema.Schema{
|
"type": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "type of the name record",
|
Description: "type of the name record",
|
||||||
},
|
},
|
||||||
"data": &schema.Schema{
|
"data": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "name record data",
|
Description: "name record data",
|
||||||
},
|
},
|
||||||
"priority": &schema.Schema{
|
"priority": {
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "priority of the name record",
|
Description: "priority of the name record",
|
||||||
},
|
},
|
||||||
"port": &schema.Schema{
|
"port": {
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "port of the name record",
|
Description: "port of the name record",
|
||||||
},
|
},
|
||||||
"ttl": &schema.Schema{
|
"ttl": {
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "ttl of the name record",
|
Description: "ttl of the name record",
|
||||||
},
|
},
|
||||||
"weight": &schema.Schema{
|
"weight": {
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "weight of the name record",
|
Description: "weight of the name record",
|
||||||
},
|
},
|
||||||
"flags": &schema.Schema{
|
"flags": {
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "flags of the name record",
|
Description: "flags of the name record",
|
||||||
},
|
},
|
||||||
"tag": &schema.Schema{
|
"tag": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "tag of the name record",
|
Description: "tag of the name record",
|
||||||
|
|
|
@ -15,19 +15,19 @@ func dataSourceDigitalOceanSSHKey() *schema.Resource {
|
||||||
Read: dataSourceDigitalOceanSSHKeyRead,
|
Read: dataSourceDigitalOceanSSHKeyRead,
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
|
|
||||||
"name": &schema.Schema{
|
"name": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
Description: "name of the ssh key",
|
Description: "name of the ssh key",
|
||||||
ValidateFunc: validation.NoZeroValues,
|
ValidateFunc: validation.NoZeroValues,
|
||||||
},
|
},
|
||||||
// computed attributes
|
// computed attributes
|
||||||
"public_key": &schema.Schema{
|
"public_key": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "public key part of the ssh key",
|
Description: "public key part of the ssh key",
|
||||||
},
|
},
|
||||||
"fingerprint": &schema.Schema{
|
"fingerprint": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "fingerprint of the ssh key",
|
Description: "fingerprint of the ssh key",
|
||||||
|
|
|
@ -13,7 +13,7 @@ func dataSourceDigitalOceanTag() *schema.Resource {
|
||||||
Read: dataSourceDigitalOceanTagRead,
|
Read: dataSourceDigitalOceanTagRead,
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
|
|
||||||
"name": &schema.Schema{
|
"name": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
Description: "name of the tag",
|
Description: "name of the tag",
|
||||||
|
|
|
@ -14,13 +14,13 @@ func dataSourceDigitalOceanVolume() *schema.Resource {
|
||||||
Read: dataSourceDigitalOceanVolumeRead,
|
Read: dataSourceDigitalOceanVolumeRead,
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
|
|
||||||
"name": &schema.Schema{
|
"name": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
Description: "name of the volume",
|
Description: "name of the volume",
|
||||||
ValidateFunc: validation.NoZeroValues,
|
ValidateFunc: validation.NoZeroValues,
|
||||||
},
|
},
|
||||||
"region": &schema.Schema{
|
"region": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Description: "the region that the volume is provisioned in",
|
Description: "the region that the volume is provisioned in",
|
||||||
|
@ -47,7 +47,7 @@ func dataSourceDigitalOceanVolume() *schema.Resource {
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "the label currently applied to the filesystem",
|
Description: "the label currently applied to the filesystem",
|
||||||
},
|
},
|
||||||
"droplet_ids": &schema.Schema{
|
"droplet_ids": {
|
||||||
Type: schema.TypeSet,
|
Type: schema.TypeSet,
|
||||||
Elem: &schema.Schema{Type: schema.TypeInt},
|
Elem: &schema.Schema{Type: schema.TypeInt},
|
||||||
Computed: true,
|
Computed: true,
|
||||||
|
|
|
@ -68,7 +68,7 @@ func resourceDigitalOceanKubernetesCluster() *schema.Resource {
|
||||||
|
|
||||||
"tags": tagsSchema(),
|
"tags": tagsSchema(),
|
||||||
|
|
||||||
"node_pool": &schema.Schema{
|
"node_pool": {
|
||||||
Type: schema.TypeList,
|
Type: schema.TypeList,
|
||||||
Required: true,
|
Required: true,
|
||||||
MinItems: 1,
|
MinItems: 1,
|
||||||
|
|
Loading…
Reference in New Issue