- Notifications
You must be signed in to change notification settings - Fork4
feat: add coderd_organization data source#33
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
feat: add coderd_organization data source#33
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ethanndickson commentedJul 17, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This stack of pull requests is managed by Graphite.Learn more about stacking. Join@ethanndickson and the rest of your teammates on |
29ca20a to614c77fComparef95a970 to695f2f4Compare614c77f to393c5a9Compare695f2f4 to7dc20ebCompareethanndickson commentedJul 17, 2024
Failing CI is due to the v2.13 tag being deleted and recreated, seeSlack. |
| }, | ||
| "is_default": schema.BoolAttribute{ | ||
| MarkdownDescription: "Whether the organization is the default organization of the deployment. This field will be populated if the organization is found by ID or name.", | ||
| Optional: true, |
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.
I made a comment on the UX of this in#34
| Optional: true, | ||
| Computed: true, | ||
| }, | ||
| "is_default": schema.BoolAttribute{ |
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.
I think is_default is going to become irrelevant very shortly, so we should just stick to ID and name since those will stick around. When orgs get actually released I don't think there will be a "default org" anymore as the concept only exists for placing users into the only existing org.
For now you should just allowid = "default" (rather thanname = "default")
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.
Even though it'll be irrelevant shortly, we need to stick with it for the time being. Terraform will always complain if you try to set an attribute to a value that differs from what it was configured to. In this case, we'd need to have a special case to not write the actual ID of the org to the id attribute.
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.
I'm just going to keep theis_default for now, and we'll end up finalizing it with the rest of the organization implementation.
393c5a9 to1894bd6Compare7dc20eb to24a0fe9Compare1894bd6 to355058dCompare24a0fe9 to962336fCompare355058d tobef1946Compare962336f toadb48deComparebef1946 to62ed2beComparee313323 to63f4357Compare63f4357 toae0d572Compareae0d572 toaa86273Compare
Uh oh!
There was an error while loading.Please reload this page.
Whilst not really part of the MVP, this makes managing groups through Terraform (such as for our integration tests) a lot nicer, since we can reference the default organisation as a data source.
It does, however, require bumping the coder version to
v2.13.