Skip to content

Commit

Permalink
Added master_ip to kubernetes cluster
Browse files Browse the repository at this point in the history
Upgrade civogo lib to v0.2.11
Add master ip to the result of the kubernetes cluster
Added validation to the dns record resource,
now the ttl can't be lower than 600 and the max value is 3600

Signed-off-by: Alejandro JNM <alejandrojnm@gmail.com>
  • Loading branch information
alejandrojnm committed Jul 6, 2020
1 parent 9d480c9 commit 5c1ad36
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion civo/resource_dns_domain_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func resourceDNSDomainRecord() *schema.Resource {
"ttl": {
Type: schema.TypeInt,
Required: true,
ValidateFunc: validation.NoZeroValues,
ValidateFunc: validation.IntBetween(600, 3600),
Description: "How long caching DNS servers should cache this record for, in seconds (the minimum is 600 and the default if unspecified is 600)",
},
// Computed resource
Expand Down
1 change: 1 addition & 0 deletions civo/resource_kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ func resourceKubernetesClusterRead(d *schema.ResourceData, m interface{}) error
d.Set("ready", resp.Ready)
d.Set("kubeconfig", resp.KubeConfig)
d.Set("api_endpoint", resp.APIEndPoint)
d.Set("master_ip", resp.MasterIP)
d.Set("dns_entry", resp.DNSEntry)
d.Set("built_at", resp.BuiltAt.UTC().String())
d.Set("created_at", resp.CreatedAt.UTC().String())
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/civo/terraform-provider-civo
require (
cloud.google.com/go v0.54.0 // indirect
github.com/aws/aws-sdk-go v1.29.22 // indirect
github.com/civo/civogo v0.2.10
github.com/civo/civogo v0.2.11
github.com/fatih/color v1.9.0 // indirect
github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75
github.com/hashicorp/go-getter v1.4.1 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ github.com/civo/civogo v0.2.8 h1:eKh1UchZagznUc5WibnzMrVfjXG2db8TqFqWUnGruvI=
github.com/civo/civogo v0.2.8/go.mod h1:SR0ZOhABfQHjgNQE3UyfX4gaYsrfslkPFRFMx5P29rg=
github.com/civo/civogo v0.2.10 h1:hcX3hSEzPAmH+bNwcwAorYKcl4fe81vQEyk4zR+0URg=
github.com/civo/civogo v0.2.10/go.mod h1:SR0ZOhABfQHjgNQE3UyfX4gaYsrfslkPFRFMx5P29rg=
github.com/civo/civogo v0.2.11 h1:NBWf3048YQSxwgS0+nY+77fh8xCAACUkmL0pXPwYZlw=
github.com/civo/civogo v0.2.11/go.mod h1:SR0ZOhABfQHjgNQE3UyfX4gaYsrfslkPFRFMx5P29rg=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down

0 comments on commit 5c1ad36

Please sign in to comment.