Skip to content

Commit

Permalink
Fix attribute docs (#1)
Browse files Browse the repository at this point in the history
* fix documentation on attributes

* update generated docs
  • Loading branch information
chrnorm authored Jul 30, 2024
1 parent d12029c commit d480451
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docs/data-sources/policyset.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ Optional:

Required:

- `name` (String) The name of the @decorator, eg. @advice()
- `value` (String) The value of the @decorator, eg. @advice(value)
- `name` (String) The name of the annotation. For example, if the name is 'advice' the rendered annotation will be '@advice()'.
- `value` (String) The value of the annotation. For example, if the name is 'advice' and the value is 'test' the rendered annotation will be '@advice("test")'.


<a id="nestedatt--policy--principal"></a>
Expand Down Expand Up @@ -193,12 +193,12 @@ Optional:

Required:

- `text` (String) unless can be used with the text attribute to define the when clause in plain-text.
- `text` (String) The 'unless' condition as a string. For example, 'resource.is_private || principal in Group::"Restricted"'


<a id="nestedblock--policy--when"></a>
### Nested Schema for `policy.when`

Required:

- `text` (String) when can be used with the text attribute to define the when clause in plain-text.
- `text` (String) The 'when' condition as a string. For example, 'resource.is_public && principal in Group::"Example"'
8 changes: 4 additions & 4 deletions internal/provider/policy_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ You may also optionally provide one or more 'when' and 'unless' conditions as bl
Optional: true,
Attributes: map[string]schema.Attribute{
"name": schema.StringAttribute{
Description: "The name of the @decorator, eg. @advice()",
Description: "The name of the annotation. For example, if the name is 'advice' the rendered annotation will be '@advice()'.",
Required: true,
},
"value": schema.StringAttribute{
Description: "The value of the @decorator, eg. @advice(value)",
Description: "The value of the annotation. For example, if the name is 'advice' and the value is 'test' the rendered annotation will be '@advice(\"test\")'.",
Required: true,
},
},
Expand Down Expand Up @@ -141,7 +141,7 @@ You may also optionally provide one or more 'when' and 'unless' conditions as bl
NestedObject: schema.NestedBlockObject{
Attributes: map[string]schema.Attribute{
"text": schema.StringAttribute{
MarkdownDescription: "when can be used with the text attribute to define the when clause in plain-text.",
MarkdownDescription: "The 'when' condition as a string. For example, 'resource.is_public && principal in Group::\"Example\"'",
Required: true,
},
},
Expand All @@ -154,7 +154,7 @@ You may also optionally provide one or more 'when' and 'unless' conditions as bl
NestedObject: schema.NestedBlockObject{
Attributes: map[string]schema.Attribute{
"text": schema.StringAttribute{
MarkdownDescription: "unless can be used with the text attribute to define the when clause in plain-text.",
MarkdownDescription: "The 'unless' condition as a string. For example, 'resource.is_private || principal in Group::\"Restricted\"'",
Required: true,
},
},
Expand Down

0 comments on commit d480451

Please sign in to comment.