Skip to content

Commit

Permalink
Merge pull request hashicorp#25 from sarguru/master
Browse files Browse the repository at this point in the history
New exported attribute for nsone_zone resource: dns_servers
  • Loading branch information
bobtfish committed Mar 31, 2016
2 parents 3a5fd2f + 120207c commit f7915ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions nsone/resource_zone.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package nsone

import (
"strings"

"github.com/bobtfish/go-nsone-api"
"github.com/hashicorp/terraform/helper/schema"
)
Expand Down Expand Up @@ -52,6 +54,11 @@ func zoneResource() *schema.Resource {
Optional: true,
Computed: true,
},
"dns_servers": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"primary": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Expand All @@ -73,6 +80,7 @@ func zoneToResourceData(d *schema.ResourceData, z *nsone.Zone) {
d.Set("refresh", z.Refresh)
d.Set("retry", z.Retry)
d.Set("expiry", z.Expiry)
d.Set("dns_servers", strings.Join(z.Dns_servers[:], ","))
if z.Secondary != nil && z.Secondary.Enabled {
d.Set("primary", z.Secondary.Primary_ip)
}
Expand Down

0 comments on commit f7915ea

Please sign in to comment.