terraform-routeros / terraform-provider-routeros

Terraform Provider for Mikrotik RouterOS
Mozilla Public License 2.0
185 stars 53 forks source link

routeros_system_user_group keeps detecting changes #544

Closed Barsonax closed 2 weeks ago

Barsonax commented 3 weeks ago

Describe the bug When running terraform apply 2 times I would expect the second time to detect no changes.

To Reproduce

  1. Use routeros_system_user_group:
    resource "routeros_system_user_group" "prometheus" {
    name   = "prometheus"
    policy = ["api", "read", "winbox", "test"]
    }
  2. Run terraform apply, the group will be created
  3. Run terraform apply again and it will detect changes which shouldn't be there:
    
    Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
    ~ update in-place

Terraform will perform the following actions:

routeros_system_user_group.prometheus will be updated in-place

~ resource "routeros_system_user_group" "prometheus" { id = "*4" name = "prometheus" ~ policy = [

Plan: 0 to add, 1 to change, 0 to destroy.



**Expected behavior**
No changes detected the second time
vaerh commented 2 weeks ago

Thanks for the information! The fix will take some time as MT is returning more data than the provider expects. I don't have a quick fix for the problem yet.

Barsonax commented 2 weeks ago

Np, I did found a workaround and that is to put all values in your .tf file, so also the flags you don't enable like !write

vaerh commented 2 weeks ago

:tada: This issue has been resolved in version 1.61.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: