Creating ns1_user with security_manage_global_2fa true even if set to false #170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Terraform set default value to false, but in some cases p.Security was not initialized, so the struct sent in the request didn't have the p.Security default values, so it was using the API default value, which is true.
Even if setting security_manage_global_2fa = false, because GetOk returns false if the value is equal to Zero-value, how Bool zero value is false, it never sets security_manage_global_2fa = false.
The change forces the p.Security to be initialized if it wasn't and change the permission to true if the parameter is passed.