Skip to content

Commit

Permalink
Merge pull request #79 from jasonouellet/doc-rbac-values
Browse files Browse the repository at this point in the history
doc: Add documentation details on role valid values and warning on application deletion
  • Loading branch information
johanneswuerbach authored Apr 29, 2024
2 parents b832b94 + dc29826 commit eda48e9
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/resources/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "humanitec_application" "example" {

### Optional

- `env` (Attributes) Initial environment to create. Will be `development` by default. (see [below for nested schema](#nestedatt--env))
- `env` (Attributes) Initial environment to create. Will be `development` by default. **Warning**: Change `env` value after creation will force destroy this resource and his dependencies (include environments, values, webhook, workloads, etc.). (see [below for nested schema](#nestedatt--env))
- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts))

<a id="nestedatt--env"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/application_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resource "humanitec_application_user" "another_owner" {
### Required

- `app_id` (String) The Application ID.
- `role` (String) The role that this user holds
- `role` (String) The role that this user holds. Could be `viewer`, `developer` or `owner`.
- `user_id` (String) The user ID that hold the role

### Optional
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/environment_type_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resource "humanitec_environment_type_user" "another_deployer" {
### Required

- `env_type_id` (String) The Environment Type.
- `role` (String) The role that this user holds
- `role` (String) The role that this user holds. Could be `developer` (default) or `owner`.
- `user_id` (String) The user ID that hold the role

### Optional
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ An entity or individual who has access to the Humanitec platform.
### Required

- `name` (String) The name the user goes by.
- `role` (String) The role that the service user should have on the organization it is created in.
- `type` (String) The type of the account. Could be user, service or system.
- `role` (String) The role that the service user should have on the organization it is created in. Could be member`, `artefactcontributor`, `manager` or `administrator`.
- `type` (String) The type of the account. Could be `user`, `service` or `system`.

### Optional

Expand Down
2 changes: 1 addition & 1 deletion internal/provider/resource_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (r *ResourceApplication) Schema(ctx context.Context, req resource.SchemaReq
},
},
"env": schema.SingleNestedAttribute{
MarkdownDescription: "Initial environment to create. Will be `development` by default.",
MarkdownDescription: "Initial environment to create. Will be `development` by default. **Warning**: Change `env` value after creation will force destroy this resource and his dependencies (include environments, values, webhook, workloads, etc.).",
Optional: true,
PlanModifiers: []planmodifier.Object{
objectplanmodifier.RequiresReplace(),
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/resource_application_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (r *ResourceApplicationUser) Schema(ctx context.Context, req resource.Schem
},
},
"role": schema.StringAttribute{
MarkdownDescription: "The role that this user holds",
MarkdownDescription: "The role that this user holds. Could be `viewer`, `developer` or `owner`.",
Required: true,
},
"timeouts": timeouts.Attributes(ctx, timeouts.Opts{
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/resource_environment_type_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (r *ResourceEnvironmentTypeUser) Schema(ctx context.Context, req resource.S
},
},
"role": schema.StringAttribute{
MarkdownDescription: "The role that this user holds",
MarkdownDescription: "The role that this user holds. Could be `developer` (default) or `owner`.",
Required: true,
},
"timeouts": timeouts.Attributes(ctx, timeouts.Opts{
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/resource_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ func (r *ResourceUser) Schema(ctx context.Context, req resource.SchemaRequest, r
},
},
"role": schema.StringAttribute{
MarkdownDescription: "The role that the service user should have on the organization it is created in.",
MarkdownDescription: "The role that the service user should have on the organization it is created in. Could be member`, `artefactcontributor`, `manager` or `administrator`.",
Required: true,
},
"type": schema.StringAttribute{
MarkdownDescription: "The type of the account. Could be user, service or system.",
MarkdownDescription: "The type of the account. Could be `user`, `service` or `system`.",
Required: true,
Validators: []validator.String{
stringvalidator.OneOf("service"),
Expand Down

0 comments on commit eda48e9

Please sign in to comment.