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

routeros_ip_dns_record - field type is missing #150

Closed
durandguru opened this issue Mar 10, 2023 · 2 comments · Fixed by #151
Closed

routeros_ip_dns_record - field type is missing #150

durandguru opened this issue Mar 10, 2023 · 2 comments · Fixed by #151
Assignees
Labels
bug Something isn't working released

Comments

@durandguru
Copy link
Contributor

Describe the bug
When creating a record other than an A record the following message will appear after the first apply
│ Warning: Field 'type' not found in the schema

│ with routeros_dns_record.vlan-10-dns-spsw301-ipv6,
│ on dns.tf line 6, in resource "routeros_dns_record" "vlan-10-dns-spsw301-ipv6":
│ 6: resource "routeros_dns_record" "vlan-10-dns-spsw301-ipv6" {

│ [MikrotikResourceDataToTerraform] The field was lost during the Schema development: ▷ 'type': 'AAAA' ◁

To Reproduce
resource "routeros_dns_record" "ipv6record" {
address = "2001:DB8:1000::1"
name = "test.example.net"
}

Fisrt apply will work fine, any subsequent apply will display this message

Expected behavior
Able to define a type in code. In the current way defining an ipv6 record by just entrering the ipv6 address it will be set to an aaaa record by terraform or mikrotik. This will throw an error in subsequent apply.

For A records a type can be optional, for other types mandatory?

available types:
image

@durandguru durandguru added the bug Something isn't working label Mar 10, 2023
@durandguru
Copy link
Contributor Author

The JSON for all the DNS Records Types:
[{".id":"*1","address":"1.1.1.1","disabled":"false","dynamic":"false","name":"ipv4.example.com","ttl":"1d"},{".id":"*2","address":"2001:db8:1000::1","disabled":"false","dynamic":"false","name":"ipv6.example.com","ttl":"1d","type":"AAAA"},{".id":"*3","cname":"ipv6.example.com","disabled":"false","dynamic":"false","name":"cname.example.com","ttl":"1d","type":"CNAME"},{".id":"*4","disabled":"false","dynamic":"false","forward-to":"172.22.10.1","regexp":"\.22\.172\.in-addr\.arpa$","ttl":"1d","type":"FWD"},{".id":"*6","disabled":"false","dynamic":"false","mx-exchange":"smtp.google.com.","mx-preference":"10","name":"example.com","ttl":"1d","type":"MX"},{".id":"*7","disabled":"false","dynamic":"false","name":"example.com","srv-port":"5061","srv-priority":"100","srv-target":"abc.com","srv-weight":"10","ttl":"1d","type":"SRV"},{".id":"*8","disabled":"false","dynamic":"false","name":"example.com","ns":"ns1.example.com","ttl":"1d","type":"NS"},{".id":"*9","disabled":"false","dynamic":"false","name":"example.com","text":"v=spf1 include:_spf.google.com -all","ttl":"1d","type":"TXT"},{".id":"*A","disabled":"false","dynamic":"false","name":"baddomain.com","ttl":"1d","type":"NXDOMAIN"}]

@gfenn-newbury
Copy link
Collaborator

🎉 This issue has been resolved in version 1.1.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants