-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Adding support for null BoolOption
values to TF provider
#52430
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a heavily breaking change and should not be backported. If the option was not set at all, we applied the defaults. However if one of the role topion fields was set, we defaulted all the others to false
.
Doing this change will turn them back to their teleport default value, potentially changing the user's roles and allowing things like X11 forwarding. I think this is worth fixing, but we should do it in a major version, with the apropriate warnings and explanations in the changelog.
As I lacked the time to do it in v17, I only fixed the token bools. If we do fix the role bools as well, we should merge the token
tfschema back into the main one.
See #40283 for more details
67d74eb
to
ca07f50
Compare
…n schema back into the main tfschema, and marking flags with default values as computed
… state value The previous commits from Erik are fixing the role options default computation. This is great but surfaces a new issue: our TF provider doers not behave properly when default logic changes as it keeps using the value from its state. This commit makes Terraform re-compute the role.spec.options from the original user config instead of the state. This makes sure that TF options are the same regardless of which TF provider version created the resource initially.
be83200
to
c52c7ea
Compare
c52c7ea
to
92794b5
Compare
The terraform provider coerces
BoolOption
values into eithertrue
orfalse
rather than allowing for fields to benull
. This PR adds an alias calledNullBoolOption
that can be specified for fields wherenull
andfalse
are semantically different. I believe this was the original intended behavior forBoolOption
values, but I opted to add the alias to avoid changing existing behavior in a way that might not be backwards compatible.changelog: Fixed an issue preventing the use of the
ssh_port_forwarding
role option when using the terraform provider.