You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After #158, when a DNS RR type is changed, the operation apparently adds/changes the new parameters but does not change (or delete) the rest of the resource data consistently, resulting in an inconsistent resource that can't be updated, as it results again in the error described in #150
│ Error: PUT 'https://my.mk/rest/ip/dns/static' returned response code: 400, message: 'Bad Request', details: 'invalid value for argument address:
│ invalid value for argument ip
│ invalid value for argument ipv6'
│
│ with routeros_ip_dns_record.new_cname,
│ on dns.tf line 14, in resource "routeros_ip_dns_record" "new_cname":
│ 14: resource "routeros_ip_dns_record" "ros" {
│
╷
│ Error: PATCH 'https://my.mk/rest/ip/dns/static/*3' returned response code: 400, message: 'Bad Request', details: 'invalid value for argument address:
│ invalid value for argument ip
│ invalid value for argument ipv6'
│
│ with routeros_ip_dns_record.a_record,
│ on dns.tf line 14, in resource "routeros_dns_record" "a_record"":
│ 14: resource "routeros_dns_record" "a_record" {
│
Check the resulting entry in the state file
$ tf state show 'routeros_ip_dns_record.a_record'
# routeros_ip_dns_record.a_record:
resource "routeros_ip_dns_record" "a_record" {
address = "111.222.333.444"
cname = "some.fqdn"
disabled = false
dynamic = false
id = "*3"
name = "a.local"
ttl = "1d"
type = "CNAME"
}
where it can be seen that the type was changed, the cname was added but the address was not removed (as it should have been)
Expected behavior
The resource should be updated consistently, according to the resource type.
The text was updated successfully, but these errors were encountered:
Thanks, I missed this moment. Please test the release and I want to draw your attention to the fact that the type field is now mandatory.
And I don't know how you could add a resource with such an interesting address :) "111.222.333.444", I did not immediately understand the reason for the refusal to add the resource and after that I added a validator that this is actually an IP address.
Re: "111.222.333.444" sorry, my bad 😄 .I usually use such notation (or www.xxx.yyy.zzz) to state that is an IP, and didn't pay much attention to the fact that it was invalid when describing the error. Glad to know you added an extra test for such things!
Describe the bug
After #158, when a DNS RR type is changed, the operation apparently adds/changes the new parameters but does not change (or delete) the rest of the resource data consistently, resulting in an inconsistent resource that can't be updated, as it results again in the error described in #150
To Reproduce
A
recordCNAME
where it can be seen that the type was changed, the cname was added but the address was not removed (as it should have been)
Expected behavior
The resource should be updated consistently, according to the resource type.
The text was updated successfully, but these errors were encountered: