feat: add default_org_member_roles to coderd_organization - #398
Draft
jscottmiller wants to merge 1 commit into
Draft
feat: add default_org_member_roles to coderd_organization#398jscottmiller wants to merge 1 commit into
jscottmiller wants to merge 1 commit into
Conversation
Adds a default_org_member_roles set attribute to the coderd_organization resource and a computed field on the coderd_organization data source, backed by the default_org_member_roles field on the organizations API (coder/coder#25994, minimum-implicit-member experiment). A null attribute leaves the facet unmanaged. Older deployments that ignore the PATCH field are detected via the missing response field and reported as unsupported; an experiment-off 403 surfaces the server's message.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds support for managing an organization's default member roles (the
default_org_member_rolessetting added in coder/coder#25994, gated by theminimum-implicit-memberexperiment).Changes
coderd_organizationresource: new optionaldefault_org_member_rolesset attribute.coderd_user.roles), so deployments not using the feature see no drift.[]is meaningful and clears the org's default roles (the Gateway Accounts use case).UpdateOrganizationPATCH via the SDK's*[]stringpointer field, omitted when unmanaged.coderd_organizationdata source: new computeddefault_org_member_rolesfield; null when the deployment does not return the field.[]) in the experimental lane, withminimum-implicit-memberadded to that lane'sCODER_EXPERIMENTS.Failure modes
workspace_sharingprecedent). Experiment status is server state, so this is an apply-time failure by design.Testing
make build,go vet,gofmt,make fmt,make gen(docs clean).usetestingfindings, identical onmain.CODER_ENTERPRISE_LICENSEand were not run locally; they should run in the CI acceptance lane.No dependency bump needed — the pinned codersdk already exposes
Organization.DefaultOrgMemberRolesandUpdateOrganizationRequest.DefaultOrgMemberRoles.