Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add coderd_group resource#31

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

Merged
ethanndickson merged 1 commit intomainfromethan/group-resource
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletionsdocs/index.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,5 +23,6 @@ provider "coderd" {

###Optional

-`default_organization_id` (String) Default organization ID to use when creating resources. Defaults to the first organization the token has access to.
-`token` (String) API token for communicating with the deployment. Most resource types require elevated permissions. Defaults to $CODER_SESSION_TOKEN.
-`url` (String) URL to the Coder deployment. Defaults to $CODER_URL.
32 changes: 32 additions & 0 deletionsdocs/resources/group.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "coderd_group Resource - coderd"
subcategory: ""
description: |-
A group on the Coder deployment. If you want to have a group resource with unmanaged members, but still want to read the members in Terraform, use the data.coderd_group data source.
---

# coderd_group (Resource)

A group on the Coder deployment. If you want to have a group resource with unmanaged members, but still want to read the members in Terraform, use the `data.coderd_group` data source.



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) The unique name of the group.

### Optional

- `avatar_url` (String) The URL of the group's avatar.
- `display_name` (String) The display name of the group. Defaults to the group name.
- `members` (Set of String) Members of the group, by ID. If null, members will not be added or removed.
- `organization_id` (String) The organization ID that the group belongs to. Defaults to the provider default organization ID.
- `quota_allowance` (Number) The number of quota credits to allocate to each user in the group.

### Read-Only

- `id` (String) Group ID.
7 changes: 4 additions & 3 deletionsintegration/integration.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ import (
"github.com/stretchr/testify/require"
)

func StartCoder(ctx context.Context, t *testing.T, name string) *codersdk.Client {
func StartCoder(ctx context.Context, t *testing.T, name string, useTrial bool) *codersdk.Client {
coderImg := os.Getenv("CODER_IMAGE")
if coderImg == "" {
coderImg = "ghcr.io/coder/coder"
Expand DownExpand Up@@ -75,9 +75,9 @@ func StartCoder(ctx context.Context, t *testing.T, name string) *codersdk.Client

// nolint:gosec // For testing only.
var (
testEmail = "testing@coder.com"
testEmail = "admin@coder.com"
testPassword = "InsecurePassw0rd!"
testUsername = "testing"
testUsername = "admin"
)

// Perform first time setup
Expand All@@ -96,6 +96,7 @@ func StartCoder(ctx context.Context, t *testing.T, name string) *codersdk.Client
Email: testEmail,
Username: testUsername,
Password: testPassword,
Trial: useTrial,
})
require.NoError(t, err, "create first user")
resp, err := client.LoginWithPassword(ctx, codersdk.LoginWithPasswordRequest{
Expand Down
2 changes: 1 addition & 1 deletionintegration/integration_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,7 +90,7 @@ func TestIntegration(t *testing.T) {
},
} {
t.Run(tt.name,func(t*testing.T) {
client:=StartCoder(ctx,t,tt.name)
client:=StartCoder(ctx,t,tt.name,true)
wd,err:=os.Getwd()
require.NoError(t,err)
srcDir:=filepath.Join(wd,tt.name)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp