Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: routeros_ip_dns_record - field type is missing #151

Merged
merged 1 commit into from
Mar 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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