Skip to content

chore: change default_org_member_roles to set - #438

Merged
ethanndickson merged 3 commits into
mainfrom
default_org_followup
Sep 15, 2026
Merged

ethanndickson merged 3 commits into
mainfrom
default_org_followup

Conversation

@Emyrk

@Emyrk Emyrk commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Followup to #355 (comment).

Change default_org_member_roles on coderd_organization from a list to a set.

  • Duplicate role names have no meaning, and ordering does not matter.
  • Replaces the minimum-implicit-member experiment note in the attribute description with "Requires a Coder Deployment running v2.37.0 or later." The experiment was promoted to GA and removed in feat: promote MinimumImplicitMember experiment to GA coder#27472, first shipped in v2.37.0.
  • Drops minimum-implicit-member from the acceptance test's CoderExperiments(...) list, since Coder v2.37.0+ no longer recognises it.
  • Existing state migrates in place; Terraform converts list-of-string to set-of-string without a schema version bump.

Coder Agents on behalf of @Emyrk.

Duplicate role names make no sense
"requires the `minimum-implicit-member` experiment to be enabled on the Coder Deployment.",
"Changes propagate to members on their next request.",
Optional: true,
Computed: true,

@ethanndickson ethanndickson Sep 14, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally this resource should have a validator:

Validators: []validator.Set{
	setvalidator.ValueStringsAre(
		stringvalidator.OneOf("owner", "template-admin", "user-admin", "auditor"),
	),
},

and ideally we should import that list of strings from codersdk so it's not so brittle

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In saying that, we dont currently have an import for it on coderd_user.roles, which is where I copied that snippet from

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't think the session token from the provider block is available to us in the validator, so custom role validation is maybe impossible

We don't support custom roles here yet. So I can copy the list as it stands today.
We don't add roles very often, but the list is only static to a given version of coderd.

@Emyrk
Emyrk requested a review from ethanndickson September 14, 2026 16:40
@ethanndickson

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-15T01:35:25.901383Z 9de379a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9de379a2ef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/provider/organization_resource.go Outdated
@ethanndickson
ethanndickson merged commit 9b838e2 into main Sep 15, 2026
13 checks passed
@ethanndickson
ethanndickson deleted the default_org_followup branch September 15, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants