Skip to content

Commit

Permalink
Fix typo in the reason validation field name (#129)
Browse files Browse the repository at this point in the history
* Fix typo in the reason validation field name

* Generate documentation

---------

Co-authored-by: chrnorm <[email protected]>
  • Loading branch information
chrnorm and chrnorm authored Oct 3, 2024
1 parent 9c2500b commit 3843890
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-hairs-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@common-fate/terraform-provider-commonfate": patch
---

Fix typo in the `reason_regex` field.
6 changes: 3 additions & 3 deletions docs/resources/access_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ Required:
Optional:

- `has_reason` (Boolean) Whether a reason is required for this workflow
- `regex` (Attributes List) Regex validation requirements for the reason (see [below for nested schema](#nestedatt--validation--regex))
- `reason_regex` (Attributes List) Regex validation requirements for the reason (see [below for nested schema](#nestedatt--validation--reason_regex))

<a id="nestedatt--validation--regex"></a>
### Nested Schema for `validation.regex`
<a id="nestedatt--validation--reason_regex"></a>
### Nested Schema for `validation.reason_regex`

Required:

Expand Down
4 changes: 2 additions & 2 deletions internal/access/resource_access_workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

type Validations struct {
HasReason types.Bool `tfsdk:"has_reason"`
ReasonRegex []RegexValidation `tfsdk:"regex"`
ReasonRegex []RegexValidation `tfsdk:"reason_regex"`
}

type RegexValidation struct {
Expand Down Expand Up @@ -137,7 +137,7 @@ func (r *AccessWorkflowResource) Schema(ctx context.Context, req resource.Schema
Computed: true,
Default: booldefault.StaticBool(false),
},
"regex": schema.ListNestedAttribute{
"reason_regex": schema.ListNestedAttribute{
MarkdownDescription: "Regex validation requirements for the reason",
Optional: true,

Expand Down

0 comments on commit 3843890

Please sign in to comment.