generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Resource to create roles (#858)
- Loading branch information
Showing
24 changed files
with
9,007 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
page_title: "btp_directory_role Resource - terraform-provider-btp" | ||
subcategory: "" | ||
description: |- | ||
Creates a role in a directory. | ||
Tip: | ||
You must be assigned to the admin role of the global account or the directory. | ||
Further documentation: | ||
https://help.sap.com/docs/btp/sap-business-technology-platform/role-collections-and-roles-in-global-accounts-directories-and-subaccounts | ||
--- | ||
|
||
# btp_directory_role (Resource) | ||
|
||
Creates a role in a directory. | ||
|
||
__Tip:__ | ||
You must be assigned to the admin role of the global account or the directory. | ||
|
||
__Further documentation:__ | ||
<https://help.sap.com/docs/btp/sap-business-technology-platform/role-collections-and-roles-in-global-accounts-directories-and-subaccounts> | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "btp_directory_role" "dirrole" { | ||
directory_id = "ddfc2206-5f11-48ed-a1ec-29010af70050" | ||
name = "DirUsageRepViewTest" | ||
role_template_name = "Directory_Usage_Reporting_Viewer" | ||
app_id = "uas!b36585" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `app_id` (String) The ID of the xsuaa application. | ||
- `directory_id` (String) The ID of the directory. | ||
- `name` (String) The name of the role. | ||
- `role_template_name` (String) The name of the role template. | ||
|
||
### Optional | ||
|
||
- `description` (String) The role description. | ||
|
||
### Read-Only | ||
|
||
- `id` (String, Deprecated) The combined unique ID of the role. | ||
- `read_only` (Boolean) Shows whether the role can be modified or not. | ||
- `scopes` (Attributes List) Scopes available with this role. (see [below for nested schema](#nestedatt--scopes)) | ||
|
||
<a id="nestedatt--scopes"></a> | ||
### Nested Schema for `scopes` | ||
|
||
Read-Only: | ||
|
||
- `custom_grant_as_authority_to_apps` (Set of String) | ||
- `custom_granted_apps` (Set of String) | ||
- `description` (String) The description of the scope. | ||
- `grant_as_authority_to_apps` (Set of String) | ||
- `granted_apps` (Set of String) | ||
- `name` (String) The name of the scope. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```terraform | ||
# terraform import btp_directory_role.<resource_name> '<directory_id>,<name>,<role_template_name>,<app_id>' | ||
terraform import btp_directory_role.directory_viewer '6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f,Directory Viewer,Directory_Viewer,cis-central!b13' | ||
``` |
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,57 @@ | ||
--- | ||
page_title: "btp_globalaccount_role Resource - terraform-provider-btp" | ||
subcategory: "" | ||
description: |- | ||
Creates a role in a global account. | ||
Tip: | ||
You must be assigned to the admin role of the global account. | ||
Further documentation: | ||
https://help.sap.com/docs/btp/sap-business-technology-platform/role-collections-and-roles-in-global-accounts-directories-and-subaccounts | ||
--- | ||
|
||
# btp_globalaccount_role (Resource) | ||
|
||
Creates a role in a global account. | ||
|
||
__Tip:__ | ||
You must be assigned to the admin role of the global account. | ||
|
||
__Further documentation:__ | ||
<https://help.sap.com/docs/btp/sap-business-technology-platform/role-collections-and-roles-in-global-accounts-directories-and-subaccounts> | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "btp_globalaccount_role" "xsuaa_admin" { | ||
name = "My Role" | ||
role_template_name = "xsuaa_admin" | ||
app_id = "xsuaa!t1" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `app_id` (String) The ID of the xsuaa application. | ||
- `name` (String) The name of the role. | ||
- `role_template_name` (String) The name of the role template. | ||
|
||
### Optional | ||
|
||
- `description` (String) The role description. | ||
|
||
### Read-Only | ||
|
||
- `read_only` (Boolean) Shows whether the role can be modified or not. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```terraform | ||
# terraform import btp_globalaccount_role.<resource_name> '<name>,<role_template_name>,<app_id>' | ||
terraform import btp_globalaccount_role.globalaccount_auditor 'User and Role Auditor,xsuaa_auditor,xsuaa!t2' | ||
``` |
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,60 @@ | ||
--- | ||
page_title: "btp_subaccount_role Resource - terraform-provider-btp" | ||
subcategory: "" | ||
description: |- | ||
Creates a role in a subaccount. | ||
Tip: | ||
You must be assigned to the admin role of the subaccount. | ||
Further documentation: | ||
https://help.sap.com/docs/btp/sap-business-technology-platform/role-collections-and-roles-in-global-accounts-directories-and-subaccounts | ||
--- | ||
|
||
# btp_subaccount_role (Resource) | ||
|
||
Creates a role in a subaccount. | ||
|
||
__Tip:__ | ||
You must be assigned to the admin role of the subaccount. | ||
|
||
__Further documentation:__ | ||
<https://help.sap.com/docs/btp/sap-business-technology-platform/role-collections-and-roles-in-global-accounts-directories-and-subaccounts> | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "btp_subaccount_role" "xsuaa_auditor" { | ||
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f" | ||
name = "XSUAA Auditor" | ||
role_template_name = "xsuaa_auditor" | ||
app_id = "xsuaa!t1" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `app_id` (String) The ID of the xsuaa application. | ||
- `name` (String) The name of the role. | ||
- `role_template_name` (String) The name of the role template. | ||
- `subaccount_id` (String) The ID of the subaccount. | ||
|
||
### Optional | ||
|
||
- `description` (String) The role description. | ||
|
||
### Read-Only | ||
|
||
- `id` (String, Deprecated) The combined unique ID of the role. | ||
- `read_only` (Boolean) Shows whether the role can be modified or not. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```terraform | ||
# terraform import btp_subaccount_role.<resource_name> '<subaccount_id>,<name>,<role_template_name>,<app_id>' | ||
terraform import btp_subaccount_role.subaccount_viewer '6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f,Subaccount Viewer,Subaccount_Viewer,cis-local!b2' | ||
``` |
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
967 changes: 967 additions & 0 deletions
967
internal/provider/fixtures/resource_directory_role.error_import.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
343 changes: 343 additions & 0 deletions
343
internal/provider/fixtures/resource_directory_role.not_security_enabled.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
1,105 changes: 1,105 additions & 0 deletions
1,105
internal/provider/fixtures/resource_directory_role.update.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
1,039 changes: 1,039 additions & 0 deletions
1,039
internal/provider/fixtures/resource_directory_role.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.