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_wifi keeps detecting changes #552

Closed
Schwitzd opened this issue Aug 31, 2024 · 6 comments
Closed

routeros_wifi keeps detecting changes #552

Schwitzd opened this issue Aug 31, 2024 · 6 comments
Labels
bug Something isn't working enhancement New feature or request released

Comments

@Schwitzd
Copy link

Describe the bug
Since I added Security.management-encryption to routeros_wifi on each apply, Terraform tries to apply the change again.

To Reproduce
This is my code:

resource "routeros_wifi" "network_wifi" {
  for_each = local.wifi_settings

  arp_timeout = each.value.arp_timeout
  channel = {
    band                = lookup(each.value, "band", null)
    frequency           = lookup(each.value, "frequency", null)
    reselect_interval   = each.value.reselect_interval
    secondary_frequency = lookup(each.value, "secondary_frequency", null)
    skip_dfs_channels   = "10min-cac"
    width               = lookup(each.value, "width", null)
  }
  configuration = {
    mode    = "ap"
    ssid    = each.value.ssid
  }
  datapath = {
    vlan_id = each.value.vlan_id
  }
  disabled    = false
  l2mtu       = 1560
  mac_address = each.value.mac_address
  name        = each.value.name
  security = {
    authentication_types  = each.value.authentication_types
    connect_priority      = "0"
    ft                    = "true"
    ft_over_ds            = "true"
    passphrase            = each.value.passphrase_key
    management-encryption = each.value.management_encryption
    management_protection = each.value.management_protection
    wps                   = "disable"
  }
}

Expected behavior
I'm expecting that the change is applied only one time.

Debug Information
N/A

Stack Trace
N/A

Additional context
N/A

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

vaerh commented Aug 31, 2024

What caught my eye is that the attribute name has a dash instead of an underscore. But I can't tell without my PC if that's the cause.
I'll take a look, but probably closer to Monday.

@Schwitzd
Copy link
Author

my fault... is with underscore... but should not return an error?

@vaerh
Copy link
Collaborator

vaerh commented Aug 31, 2024

I was just thinking the same thing. We should try to add a validator, since such errors have already occurred.

@Schwitzd
Copy link
Author

Would be really great :)
Unfortunately I have no knowledge about go language :'(

@vaerh
Copy link
Collaborator

vaerh commented Aug 31, 2024

It's never too late to start enjoying syntactic sugar :)
And seriously, I need to see if I can add such a check and where to do it properly. So this is not the only resource with such attributes.

vaerh added a commit that referenced this issue Sep 1, 2024
@vaerh vaerh added the enhancement New feature or request label Sep 2, 2024
@vaerh vaerh closed this as completed in 059de30 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 enhancement New feature or request released
Projects
None yet
Development

No branches or pull requests

2 participants