Skip to content

Commit

Permalink
ttl
Browse files Browse the repository at this point in the history
  • Loading branch information
dtherhtun committed Jun 11, 2020
1 parent 12f0484 commit 291ada8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions idm/resource_idm_dns_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func resourceIDMDNSRecord() *schema.Resource {
Required: true,
// Set: schema.HashString,
},
"dnsttl": {
"ttl": {
Type: schema.TypeInt,
Optional: true,
},
Expand Down Expand Up @@ -85,7 +85,7 @@ func resourceIDMDNSRecordCreate(d *schema.ResourceData, meta interface{}) error
optArgs.Srvrecord = &records
}

if _dnsttl, ok := d.GetOkExists("dnsttl"); ok {
if _dnsttl, ok := d.GetOkExists("ttl"); ok {
dnsttl := _dnsttl.(int)
optArgs.Dnsttl = &dnsttl
}
Expand Down Expand Up @@ -136,7 +136,7 @@ func resourceIDMDNSRecordUpdate(d *schema.ResourceData, meta interface{}) error
optArgs.Srvrecord = &records
}

if _dnsttl, ok := d.GetOkExists("dnsttl"); ok {
if _dnsttl, ok := d.GetOkExists("ttl"); ok {
dnsttl := _dnsttl.(int)
optArgs.Dnsttl = &dnsttl
}
Expand Down Expand Up @@ -187,7 +187,7 @@ func resourceIDMDNSRecordRead(d *schema.ResourceData, meta interface{}) error {
}

if res.Result.Dnsttl != nil {
d.Set("dnsttl", *res.Result.Dnsttl)
d.Set("ttl", *res.Result.Dnsttl)
}

if res.Result.Dnsclass != nil {
Expand Down

0 comments on commit 291ada8

Please sign in to comment.