-
Notifications
You must be signed in to change notification settings - Fork 157
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
[#TF-720] Add allow_force_delete_workspaces organization setting to the tfe provider #661
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.
Looks good to me!
We will just need to wait until the go-tfe changes are merged and released, and update this to point at the released version!
55cf568
to
6530068
Compare
5896a70
to
8bb4cf7
Compare
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.
Looks good to me! I don't know that I have approval permissions on this repo, though, let's see...
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.
Code review. Smoke test forthcoming
"allow_force_delete_workspaces": { | ||
Type: schema.TypeBool, | ||
Optional: true, | ||
Default: false, |
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.
Since the API produces the default value, you may want to remove Default and set Computed to true. My understanding of Default is that we use it when we want the provider to set a state value, perhaps to backfill a new required field? I'm going to smoke test both cases, but the other settings in this schema seem to rely on the API defaults so it would be strange to have a new argument with slightly different behavior.
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.
OK so I tested 3 scenarios and found some interesting behavior differences:
Optional: true, Default: false
did not show the field in the plan but stored false in stateOptional: true, Computed: true
showed the field in the plan as (known after apply) and stored false in state.Optional: true
with no other options had the same behavior asOptional: true, Default: false
I expected something different!
Description
This change adds the
allow_force_delete_workspaces
setting to the TFE provider.External links
Include any links here that might be helpful for people reviewing your PR. If there are none, feel free to delete this section.
Output from acceptance tests
Please run applicable acceptance tests locally and include the output here. See TESTS.md to learn how to run acceptance tests.
If you are an external contributor, your contribution(s) will first be reviewed before running them against the project's CI pipeline.