Skip to content

Commit 372e00d

Browse files
authored
Doc fix 4.5.b (#552)
* doc fix * fix example * doc fix
1 parent 95f4023 commit 372e00d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/resources/role.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ resource "spectrocloud_role" "custom_role" {
6060
### Optional
6161

6262
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
63-
- `type` (String) The role type. Allowed values are `project` or `tenant` or `project`
63+
- `type` (String) The role type. Allowed values are `project` or `tenant` or `resource`
6464

6565
### Read-Only
6666

examples/resources/spectrocloud_role/resource.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ resource "spectrocloud_role" "custom_role" {
1717
}
1818

1919
// set permission with data source permission
20-
2120
variable "perms" {
2221
type = list(string)
23-
default = ["App Profile", "App Deployment"]
22+
default = ["User", "Team", "Role"]
2423
}
2524

2625
data "spectrocloud_permission" "app_permissions" {
2726
for_each = toset(var.perms)
2827
name = each.key
28+
scope = "tenant"
2929
}
3030

3131
resource "spectrocloud_role" "custom_role_permission" {
32-
name = "Test Cluster Role"
33-
type = "project"
32+
name = "Test Cluster Role With Custom Permission"
33+
type = "tenant"
3434
permissions = flatten([for p in data.spectrocloud_permission.app_permissions : p.permissions])
3535
}

spectrocloud/resource_role.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func resourceRole() *schema.Resource {
3939
Optional: true,
4040
Default: "project",
4141
ValidateFunc: validation.StringInSlice([]string{"project", "tenant", "resource"}, false),
42-
Description: "The role type. Allowed values are `project` or `tenant` or `project`",
42+
Description: "The role type. Allowed values are `project` or `tenant` or `resource`",
4343
},
4444
"permissions": {
4545
Type: schema.TypeSet,

0 commit comments

Comments
 (0)