Skip to content

Commit

Permalink
docs: add grants example
Browse files Browse the repository at this point in the history
  • Loading branch information
malnick committed Jul 11, 2020
1 parent 141aa58 commit 5fc7e5e
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion website/docs/r/resource_role.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,24 @@ resource "watchtower_user" "bar" {
resource "watchtower_role" "example" {
name = "My role"
description = "My first role!"
users [watchtower_user.foo.id, watchtower_user.bar.id]
users = [watchtower_user.foo.id, watchtower_user.bar.id]
}
```

Usage with user and grants resource:

```hcl
resource "watchtower_user" "readonly" {
name = "readonly"
description = "A readonly user"
}
resource "watchtower_role" "readonly" {
name = "readonly"
description = "A readonly role"
users = [watchtower_user.readonly.id]
grants = ["id=*;action=read"]
}
```

Expand Down

0 comments on commit 5fc7e5e

Please sign in to comment.