-
Notifications
You must be signed in to change notification settings - Fork 61
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
DHCP and MikrotikResourceDataToTerraform #110
Comments
So just to confirm the steps to reproduce this:
Does that sound right? |
fix(#110): Add missing fields to DhcpServerLease
🎉 This issue has been resolved in version 1.0.6 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Thanks, for the quick fix! I checked again with 1.06 and we are still missing the fields active_server, active_client_id, expires_after, host_name I missed those yesterday, but I had about 60 of these messages and yesterday recreated with the gnewbury resource name, and today the devices became active again. {"@Level":"warn","@message":"Warning: Field not found","@module":"terraform.ui","@timestamp":"2023-02-17T20:39:56.350510+01:00","diagnostic":{"severity":"warning","summary":"Field not found","detail":"[MikrotikResourceDataToTerraform] The field was lost during the Schema development: active_server \u003c\u003c\u003c= vlan-108-ndi-production","address":"routeros_ip_dhcp_server_lease.vlan-108-vmix-b","range":{"filename":"vlan-108-ndi-production.tf","start":{"line":57,"column":60,"byte":1678},"end":{"line":57,"column":61,"byte":1679}},"snippet":{"context":"resource "routeros_ip_dhcp_server_lease" "vlan-108-vmix-b"","code":"resource "routeros_ip_dhcp_server_lease" "vlan-108-vmix-b" {","start_line":57,"highlight_start_offset":59,"highlight_end_offset":60,"values":[]}},"type":"diagnostic"} |
@durandguru could you check with version 1.0.7, please? I know @vaerh made some changes to the fields of the dhcp lease with #114 |
fix(#110): Typo in hostname field for dhcp lease
🎉 This issue has been resolved in version 1.0.8 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
I saw the difference in the writing of these fields, but for some reason I missed the old one?!? The RouterOS documentation sometimes disagrees with the actual names. |
In 1.0.7 I get the error: In 1.0.8 I do not get an error. But terraform wants to change the hostname. As far as i know this hostname is supplied by the client when it requests a dhcp lease. So I don't know this value beforehand. I think we need to treat it as a data source routeros_ip_dhcp_server_lease.vlan-100-cam-05 will be updated in-place~ resource "routeros_ip_dhcp_server_lease" "vlan-100-cam-05" { |
fix: #110 Added "detail" field & "host_name" set to computed.
🎉 This issue has been resolved in version 1.0.9 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Almost all the errors are gone 1.0.11. Still got this one: |
Where do you get these fileds? 😭 Synthetic tests look just fine. |
Thanks for the fixing. I just do some basic config. Some fields pop-up after others are fixed. |
And this is a very interesting idea, I have a feeling that TF does not report all the fields that are missing in the schema, although it sees them. Need to check! |
I have created a new bug for routeros_interface_list_member, for this i found 2 missing fields, but in the terraform plan -json output it is missing these fields on different resources. So it probably sees 1 and then skips all others for that resource. |
Ок, today I will try to reproduce this problem and fix it. Thank you very much! |
🎉 This issue has been resolved in version 1.0.12 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All the other errors are gone in 1.0.12 ;-) I think the default value of bootp_support must be "static", null is not accepted. Static is the default value if you create an dhcp server in winbox. routeros_dhcp_server.vlan-20-dhcp-server will be updated in-place~ resource "routeros_dhcp_server" "vlan-20-dhcp-server" { |
fix(#110) Add a default value for the "bootp_support" field
🎉 This issue has been resolved in version 1.1.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Describe the bug
Set DHCP reservations via routeros_ip_dhcp_server_lease. If the fields Active MAC Address, Active Hostname and Expires After are filled by an active reservation this error appears.
BTW I Love what you guys are doing with this provider! I find it very useful.
To Reproduce
resource "routeros_ip_dhcp_server_lease" "vlan-112-gs-cu-03" {
address = "172.22.112.103"
mac_address = "00:1D:C1:94:87:42"
server = routeros_dhcp_server.vlan-112-dhcp-server.name
comment = "GS-CU-03"
}
Additional context
Different output because of a lot of warnings:
{"@Level":"warn","@message":"Warning: Field not found","@module":"terraform.ui","@timestamp":"2023-02-16T22:24:52.168451+01:00","diagnostic":{"severity":"warning","summary":"Field not found","detail":"[MikrotikResourceDataToTerraform] The field was lost during the Schema development: active_mac_address \u003c\u003c\u003c= 00:1D:C1:94:87:42","address":"routeros_ip_dhcp_server_lease.vlan-112-gs-cu-03","range":{"filename":"vlan-112-dante.tf","start":{"line":95,"column":62,"byte":2971},"end":{"line":95,"column":63,"byte":2972}},"snippet":{"context":"resource "routeros_ip_dhcp_server_lease" "vlan-112-gs-cu-03"","code":"resource "routeros_ip_dhcp_server_lease" "vlan-112-gs-cu-03" {","start_line":95,"highlight_start_offset":61,"highlight_end_offset":62,"values":[]}},"type":"diagnostic"}
{"@Level":"warn","@message":"Warning: Field not found","@module":"terraform.ui","@timestamp":"2023-02-16T22:24:52.168451+01:00","diagnostic":{"severity":"warning","summary":"Field not found","detail":"[MikrotikResourceDataToTerraform] The field was lost during the Schema development: active_mac_address \u003c\u003c\u003c= 00:1D:C1:94:87:42","address":"routeros_ip_dhcp_server_lease.vlan-112-gs-cu-03","range":{"filename":"vlan-112-dante.tf","start":{"line":95,"column":62,"byte":2971},"end":{"line":95,"column":63,"byte":2972}},"snippet":{"context":"resource "routeros_ip_dhcp_server_lease" "vlan-112-gs-cu-03"","code":"resource "routeros_ip_dhcp_server_lease" "vlan-112-gs-cu-03" {","start_line":95,"highlight_start_offset":61,"highlight_end_offset":62,"values":[]}},"type":"diagnostic"}
The text was updated successfully, but these errors were encountered: