Skip to content

Commit

Permalink
SLK-73211 - Change split separator for role mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Adi Shaull committed Dec 18, 2023
1 parent e72c4ad commit 0a91f36
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion aquasec/resource_sso.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func convertRoleMapping(m map[string]interface{}) map[string][]string {

if len(m["role_mapping"].(map[string]interface{})) > 0 {
for key, element := range m["role_mapping"].(map[string]interface{}) {
elementArry := strings.Split(element.(string), ",")
elementArry := strings.Split(element.(string), "|")
roleMapping[key] = elementArry
}
}
Expand Down
33 changes: 19 additions & 14 deletions docs/resources/role_mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@
page_title: "aquasec_role_mapping Resource - terraform-provider-aquasec"
subcategory: ""
description: |-
---

# aquasec_role_mapping (Resource)



## Example Usage

```terraform
resource "aquasec_role_mapping" "role_mapping" {
saml {
role_mapping = {
Administrator = "group1"
}
saml {
role_mapping = {
Administrator = "group1"
Scanner = "group2|group3"
}
}
}
output "role_mapping" {
Expand All @@ -27,6 +26,7 @@ output "role_mapping" {
```

<!-- schema generated by tfplugindocs -->

## Schema

### Optional
Expand All @@ -41,34 +41,39 @@ output "role_mapping" {
- `id` (String) The ID of this resource.

<a id="nestedblock--ldap"></a>

### Nested Schema for `ldap`

Required:

- `role_mapping` (Map of String) Role Mapping is used to define the IdP role that the user will assume in Aqua

- `role_mapping` (Map of String) Role Mapping is used to define the IdP role that the user will assume in Aqua. Use "|"
as a separator for multiple roles.

<a id="nestedblock--oauth2"></a>

### Nested Schema for `oauth2`

Required:

- `role_mapping` (Map of String) Role Mapping is used to define the IdP role that the user will assume in Aqua

- `role_mapping` (Map of String) Role Mapping is used to define the IdP role that the user will assume in Aqua. Use "|"
as a separator for multiple roles.

<a id="nestedblock--openid"></a>

### Nested Schema for `openid`

Required:

- `role_mapping` (Map of String) Role Mapping is used to define the IdP role that the user will assume in Aqua

- `role_mapping` (Map of String) Role Mapping is used to define the IdP role that the user will assume in Aqua. Use "|"
as a separator for multiple roles.

<a id="nestedblock--saml"></a>

### Nested Schema for `saml`

Required:

- `role_mapping` (Map of String) Role Mapping is used to define the IdP role that the user will assume in Aqua
- `role_mapping` (Map of String) Role Mapping is used to define the IdP role that the user will assume in Aqua. Use "|"
as a separator for multiple roles.


0 comments on commit 0a91f36

Please sign in to comment.