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

Field 'dynamic' not found in the schema for routeros_interfaces datasource #550

Closed
dsbibby opened this issue Aug 30, 2024 · 3 comments
Closed
Labels
bug Something isn't working Fix the schema released

Comments

@dsbibby
Copy link

dsbibby commented Aug 30, 2024

Describe the bug
routeros_interfaces datasource logs a warning when there are dynamic interfaces present (such as when using CAPsMAN).

for example with this datasource:

data "routeros_interfaces" "wlan_dynamic" {}

And dynamic interfaces present, a plan/apply includes this warning at the end of the run:

│ Warning: Field 'dynamic' not found in the schema
│ 
│   with module.rb_lounge.data.routeros_interfaces.wlan_dynamic,
│   on modules/routerboard/data.tf line 1, in data "routeros_interfaces" "wlan_dynamic":
│    1: data "routeros_interfaces" "wlan_dynamic" {
│ 
│ [MikrotikResourceDataToTerraformDatasource] the field was lost during the Schema development: ▷ 'dynamic': 'true' ◁

To Reproduce

  • enable CAPsMAN (or use some other method to create dynamic interfaces)
  • run a terraform plan that contains a data "routeros_interfaces" "wlan_dynamic" {} declaration

Expected behavior
No warnings should be thrown

Debug Information
I suspect the reason for this is that the dynamic property only exists on dynamic interfaces in the rest API. static intefaces do not have dynamic = "false" in the REST response. Example (with the tx/rx metrics removed for brevity) below:

 {
    ".about": "channel: 5220/20-Ce/ac/P(14dBm), SSID: Home, CAPsMAN forwarding",
    ".id": "*14",
    "actual-mtu": "1500",
    "default-name": "wlan2",
    "disabled": "true",
    "l2mtu": "1600",
    "link-downs": "0",
    "mac-address": "18:FD:74:87:F3:E7",
    "max-l2mtu": "2290",
    "mtu": "1500",
    "name": "wlan2",
    "running": "false",
    "type": "wlan"
  },
  {
    ".about": "SSID: Guest, CAPsMAN forwarding",
    ".id": "*1B",
    "actual-mtu": "1500",
    "disabled": "true",
    "dynamic": "true",
    "l2mtu": "1600",
    "link-downs": "0",
    "mac-address": "00:00:00:00:00:00",
    "mtu": "1500",
    "name": "wlan3",
    "running": "false",
    "type": "wlan"
  },

Stack Trace
N/A

Additional context
N/A

@dsbibby dsbibby added the bug Something isn't working label Aug 30, 2024
@vaerh
Copy link
Collaborator

vaerh commented Sep 2, 2024

Thanks a lot, fixed!

@dsbibby
Copy link
Author

dsbibby commented Sep 2, 2024

Brilliant, thank you!

@vaerh vaerh closed this as completed in f9489a2 Sep 2, 2024
@vaerh
Copy link
Collaborator

vaerh commented Sep 2, 2024

🎉 This issue has been resolved in version 1.61.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@vaerh vaerh added the released label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fix the schema released
Projects
None yet
Development

No branches or pull requests

2 participants