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

Fix unintended plan diff from unspecified defaults #465

Merged
merged 1 commit into from
May 28, 2024

Conversation

OJFord
Copy link
Contributor

@OJFord OJFord commented May 26, 2024

The default value for auto_mac is false, and lease_time 30m, but if unspecified they're assumed true and 10m respectively; so a plan with them unspecified and having imported the default configuration from a freshly reset routeros wants to change them.

@OJFord OJFord requested a review from a team as a code owner May 26, 2024 21:26
Copy link
Collaborator

@vaerh vaerh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the Default values and add DiffSuppressFunc: AlwaysPresentNotUserProvided,. In the current context it is more correct (no problems with working under different ROS versions)

@OJFord
Copy link
Contributor Author

OJFord commented May 27, 2024

Hm, I just noticed in doing that that auto_mac already has it. But if I:

resource "routeros_interface_bridge" "bridge" {
  name = "bridge"

  comment = "defconf"
  #auto_mac = false
}

and terraform import it, it wants to change auto_mac = false -> true unless I uncomment that line.

routeros/resource_interface_bridge.go Outdated Show resolved Hide resolved
The default value for `auto_mac` is false, and `lease_time` 30m, but if
unspecified they're assumed true and 10m respectively; so a plan with
them unspecified and having imported the default configuration from a
freshly reset routeros wants to change them.
@vaerh vaerh merged commit d1082f1 into terraform-routeros:main May 28, 2024
3 checks passed
@vaerh
Copy link
Collaborator

vaerh commented May 28, 2024

🎉 This PR is included in version 1.52.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@vaerh vaerh added the released label May 28, 2024
@vaerh
Copy link
Collaborator

vaerh commented May 28, 2024

🎉 This PR is included in version 1.52.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@OJFord OJFord deleted the fix-defaults branch May 28, 2024 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants