-
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
tf-provider: fix bool option on gitlab token #40283
Conversation
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
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.
Generally looks good - I'll hold off reviewing properly until this is undrafted.
36a28a0
to
b1e30bc
Compare
142085b
to
edc33fb
Compare
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
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.
YOLO
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.
Thank you for sorting this
resource.TestCheckResourceAttr(name, "metadata.name", "gitlab-test-terraform"), | ||
resource.TestCheckResourceAttr(name, "spec.roles.0", "Bot"), | ||
resource.TestCheckResourceAttr(name, "spec.join_method", "gitlab"), | ||
resource.TestCheckNoResourceAttr(name, "spec.gitlab.allow.0.environment_protected"), |
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.
Just to make sure that this is working properly for when it is set, could we add:
ref_protected = true
to the fixture, and
resource.TestCheckResourceAttr(name, "spec.gitlab.allow.0.ref_protected", "true")
to the test checks.
f7ea8ef
to
c382b14
Compare
@hugoShaka See the table below for backport results.
|
* Add BoolOptionNullable type for token * Address noah's comment * add more tests to check if we can set then unset the value * lint * lint pt.2 * lint pt.3
* tf-provider: fix bool option on gitlab token (#40283) * Add BoolOptionNullable type for token * Address noah's comment * add more tests to check if we can set then unset the value * lint * lint pt.2 * lint pt.3 * lint
Fixes the broken bool options on the provisioning token in allow rules.
This cannot be made on every resource yet because this is a breaking change for some roles.
This is a temporary fix, the proper way to fix it is doing a v16 breaking change. We need to do this hack today to unblock a large customer.
changelog: fix a bug in the Terraform provider causing the Provision Token boolean options to default to false instead of empty.