Skip to content

Commit

Permalink
addded description notes for user and service accounts to indicate ad…
Browse files Browse the repository at this point in the history
…min and owner behavior (#166)
  • Loading branch information
jlacefie authored Nov 15, 2024
1 parent b847cee commit b3113b1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
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

0 comments on commit b3113b1

Please sign in to comment.