Skip to content
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

addded description notes for user and service accounts to indicate admin and owner behavior #166

Merged
merged 2 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions docs/resources/service_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ resource "temporalcloud_service_account" "namespace_admin" {

### Required

- `account_access` (String) The role on the account. Must be one of [admin, developer, read] (case-insensitive)
- `account_access` (String) The role on the account. Must be one of [admin, developer, read] (case-insensitive).
- `name` (String) The name associated with the service account.

### Optional

- `namespace_accesses` (Attributes List) The list of namespace accesses. (see [below for nested schema](#nestedatt--namespace_accesses))
- `namespace_accesses` (Attributes List) The list of namespace accesses. Service Accounts with an account_access role of admin cannot be assigned explicit permissions to namespaces. admins implicitly receive access to all Namespaces. (see [below for nested schema](#nestedatt--namespace_accesses))
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ resource "temporalcloud_user" "namespace_admin" {

### Required

- `account_access` (String) The role on the account. Must be one of [owner, admin, developer, read] (case-insensitive). owner is only valid for import.
- `account_access` (String) The role on the account. Must be one of [owner, admin, developer, read] (case-insensitive). owner is only valid for import and cannot be created, updated or deleted without Temporal support.
- `email` (String) The email address for the user.

### Optional

- `namespace_accesses` (Attributes List) The list of namespace accesses. (see [below for nested schema](#nestedatt--namespace_accesses))
- `namespace_accesses` (Attributes List) The list of namespace accesses. Users with account_access roles of owner or admin cannot be assigned explicit permissions to namespaces. They implicitly receive access to all Namespaces. (see [below for nested schema](#nestedatt--namespace_accesses))
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/service_account_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ func (r *serviceAccountResource) Schema(ctx context.Context, _ resource.SchemaRe
},
"account_access": schema.StringAttribute{
CustomType: internaltypes.CaseInsensitiveStringType{},
Description: "The role on the account. Must be one of [admin, developer, read] (case-insensitive)",
Description: "The role on the account. Must be one of [admin, developer, read] (case-insensitive).",
Required: true,
Validators: []validator.String{
stringvalidator.OneOfCaseInsensitive("admin", "developer", "read"),
},
},
"namespace_accesses": schema.ListNestedAttribute{
Description: "The list of namespace accesses.",
Description: "The list of namespace accesses. Service Accounts with an account_access role of admin cannot be assigned explicit permissions to namespaces. admins implicitly receive access to all Namespaces.",
Optional: true,
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/user_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ func (r *userResource) Schema(ctx context.Context, _ resource.SchemaRequest, res
},
"account_access": schema.StringAttribute{
CustomType: internaltypes.CaseInsensitiveStringType{},
Description: "The role on the account. Must be one of [owner, admin, developer, read] (case-insensitive). owner is only valid for import.",
Description: "The role on the account. Must be one of [owner, admin, developer, read] (case-insensitive). owner is only valid for import and cannot be created, updated or deleted without Temporal support.",
Required: true,
Validators: []validator.String{
stringvalidator.OneOfCaseInsensitive("owner", "admin", "developer", "read"),
},
},
"namespace_accesses": schema.ListNestedAttribute{
Description: "The list of namespace accesses.",
Description: "The list of namespace accesses. Users with account_access roles of owner or admin cannot be assigned explicit permissions to namespaces. They implicitly receive access to all Namespaces.",
Optional: true,
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
Expand Down
Loading