Skip to content

Commit

Permalink
fix: do not validate json on oidc scope template (#1547)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfreeland authored Jul 23, 2022
1 parent c8de60a commit a86c4d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 3 additions & 4 deletions vault/resource_identity_oidc_scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ func identityOIDCScopeResource() *schema.Resource {
Required: true,
},
"template": {
Type: schema.TypeString,
Description: "The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.",
Optional: true,
ValidateFunc: ValidateDataJSONFunc("vault_identity_oidc_scope"),
Type: schema.TypeString,
Description: "The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.",
Optional: true,
},
"description": {
Type: schema.TypeString,
Expand Down
6 changes: 1 addition & 5 deletions website/docs/r/identity_oidc_scope.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ for more information.
```hcl
resource "vault_identity_oidc_scope" "groups" {
name = "groups"
template = jsonencode(
{
groups = "{{identity.entity.groups.names}}",
}
)
template = "{\"groups\":{{identity.entity.groups.names}}}"
description = "Vault OIDC Groups Scope"
}
```
Expand Down

0 comments on commit a86c4d2

Please sign in to comment.