-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom doc templates for user permission and user permissions
- Loading branch information
Showing
4 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
page_title: "Resource: auth0_user_permissions" | ||
description: |- | ||
With this resource, you can manage all of a user's permissions. | ||
--- | ||
|
||
# Resource: auth0_user_permissions | ||
|
||
With this resource, you can manage all of a user's permissions. | ||
|
||
!> To prevent issues, avoid using this resource together with the `auth0_user_permission` resource. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "auth0_resource_server" "resource_server" { | ||
name = "Example Resource Server (Managed by Terraform)" | ||
identifier = "https://api.example.com" | ||
scopes { | ||
value = "create:foo" | ||
description = "Create foos" | ||
} | ||
scopes { | ||
value = "read:foo" | ||
description = "Read foos" | ||
} | ||
} | ||
resource "auth0_user" "user" { | ||
connection_name = "Username-Password-Authentication" | ||
user_id = "12345" | ||
username = "unique_username" | ||
name = "Firstname Lastname" | ||
nickname = "some.nickname" | ||
email = "[email protected]" | ||
email_verified = true | ||
password = "passpass$12$12" | ||
picture = "https://www.example.com/a-valid-picture-url.jpg" | ||
} | ||
resource "auth0_user_permissions" "all_user_permissions" { | ||
user_id = auth0_user.user.id | ||
permissions { | ||
name = tolist(auth0_resource_server.resource_server.scopes)[0] | ||
resource_server_identifier = auth0_resource_server.resource_server.identifier | ||
} | ||
permissions { | ||
name = tolist(auth0_resource_server.resource_server.scopes)[1] | ||
resource_server_identifier = auth0_resource_server.resource_server.identifier | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `permissions` (Block Set, Min: 1) List of API permissions granted to the user. (see [below for nested schema](#nestedblock--permissions)) | ||
- `user_id` (String) ID of the user to associate the permission to. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
<a id="nestedblock--permissions"></a> | ||
### Nested Schema for `permissions` | ||
|
||
Required: | ||
|
||
- `name` (String) Name of permission. | ||
- `resource_server_identifier` (String) Resource server identifier associated with the permission. | ||
|
||
Read-Only: | ||
|
||
- `description` (String) Description of the permission. | ||
- `resource_server_name` (String) Name of resource server that the permission is associated with. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# This resource can be imported by specifying the user ID | ||
|
||
# Example: | ||
terraform import auth0_user_permissions.all_user_permissions "auth0|111111111111111111111111" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
page_title: "{{.Type}}: {{.Name}}" | ||
description: |- | ||
{{ .Description | plainmarkdown | trimspace | prefixlines " " }} | ||
--- | ||
|
||
# {{.Type}}: {{.Name}} | ||
|
||
{{ .Description | trimspace }} | ||
|
||
!> To prevent issues, avoid using this resource together with the `auth0_user_permissions` resource. | ||
|
||
{{ if .HasExample -}} | ||
|
||
## Example Usage | ||
|
||
{{ tffile .ExampleFile }} | ||
|
||
{{- end }} | ||
|
||
{{ .SchemaMarkdown | trimspace }} | ||
|
||
{{ if .HasImport -}} | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
{{ codefile "shell" .ImportFile }} | ||
|
||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
page_title: "{{.Type}}: {{.Name}}" | ||
description: |- | ||
{{ .Description | plainmarkdown | trimspace | prefixlines " " }} | ||
--- | ||
|
||
# {{.Type}}: {{.Name}} | ||
|
||
{{ .Description | trimspace }} | ||
|
||
!> To prevent issues, avoid using this resource together with the `auth0_user_permission` resource. | ||
|
||
{{ if .HasExample -}} | ||
|
||
## Example Usage | ||
|
||
{{ tffile .ExampleFile }} | ||
|
||
{{- end }} | ||
|
||
{{ .SchemaMarkdown | trimspace }} | ||
|
||
{{ if .HasImport -}} | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
{{ codefile "shell" .ImportFile }} | ||
|
||
{{- end }} |