Skip to content

Commit

Permalink
Merge pull request #151 from terraform-routeros/vaerh/issue150
Browse files Browse the repository at this point in the history
fix: routeros_ip_dns_record - field type is missing
  • Loading branch information
vaerh authored Mar 10, 2023
2 parents 142d4a2 + 2072d14 commit 0d6e03e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions routeros/resource_ip_dns_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package routeros

import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)

/*
Expand All @@ -14,6 +15,14 @@ import (
"name": "router.lan",
"ttl": "1d"
},
{
".id": "*2",
"address": "2001:db8:1000::1",
"disabled": "false",
"dynamic": "false",
"name": "ipv6.example.com",
"ttl": "1d",
"type": "AAAA"}
{
".id": "*9",
"address": "192.168.88.1",
Expand Down Expand Up @@ -57,6 +66,14 @@ func ResourceDnsRecord() *schema.Resource {
Computed: true,
Description: "The ttl of the DNS record.",
},
"type": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Description: "Type of the DNS record. Available values are: A, AAAA, CNAME, FWD, MX, NS, NXDOMAIN, SRV, TXT",
ValidateFunc: validation.StringInSlice([]string{"A", "AAAA", "CNAME", "FWD", "MX", "NS", "NXDOMAIN",
"SRV", "TXT "}, false),
},
}
return &schema.Resource{
Description: "Creates a DNS record on the MikroTik device.",
Expand Down

0 comments on commit 0d6e03e

Please sign in to comment.