Skip to content

Commit

Permalink
Fix state drift with empty set for permission resource
Browse files Browse the repository at this point in the history
Force `users` or `groups` to be set for `actions`

Force `users` and `groups` to have at least 1 item
  • Loading branch information
alexhung committed May 6, 2024
1 parent 5010949 commit 6578b75
Show file tree
Hide file tree
Showing 3 changed files with 657 additions and 132 deletions.
30 changes: 15 additions & 15 deletions docs/resources/permission.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Required:

Optional:

- `actions` (Attributes) (see [below for nested schema](#nestedatt--artifact--actions))
- `actions` (Attributes) Either one of `users` or `groups` attribute must be set. (see [below for nested schema](#nestedatt--artifact--actions))

<a id="nestedatt--artifact--targets"></a>
### Nested Schema for `artifact.targets`
Expand All @@ -163,8 +163,8 @@ Optional:

Optional:

- `groups` (Attributes Set) (see [below for nested schema](#nestedatt--artifact--actions--groups))
- `users` (Attributes Set) (see [below for nested schema](#nestedatt--artifact--actions--users))
- `groups` (Attributes Set) Must contain at least one item. (see [below for nested schema](#nestedatt--artifact--actions--groups))
- `users` (Attributes Set) Must contain at least one item. (see [below for nested schema](#nestedatt--artifact--actions--users))

<a id="nestedatt--artifact--actions--groups"></a>
### Nested Schema for `artifact.actions.groups`
Expand Down Expand Up @@ -205,7 +205,7 @@ Required:

Optional:

- `actions` (Attributes) (see [below for nested schema](#nestedatt--build--actions))
- `actions` (Attributes) Either one of `users` or `groups` attribute must be set. (see [below for nested schema](#nestedatt--build--actions))

<a id="nestedatt--build--targets"></a>
### Nested Schema for `build.targets`
Expand All @@ -225,8 +225,8 @@ Optional:

Optional:

- `groups` (Attributes Set) (see [below for nested schema](#nestedatt--build--actions--groups))
- `users` (Attributes Set) (see [below for nested schema](#nestedatt--build--actions--users))
- `groups` (Attributes Set) Must contain at least one item. (see [below for nested schema](#nestedatt--build--actions--groups))
- `users` (Attributes Set) Must contain at least one item. (see [below for nested schema](#nestedatt--build--actions--users))

<a id="nestedatt--build--actions--groups"></a>
### Nested Schema for `build.actions.groups`
Expand Down Expand Up @@ -267,7 +267,7 @@ Required:

Optional:

- `actions` (Attributes) (see [below for nested schema](#nestedatt--destination--actions))
- `actions` (Attributes) Either one of `users` or `groups` attribute must be set. (see [below for nested schema](#nestedatt--destination--actions))

<a id="nestedatt--destination--targets"></a>
### Nested Schema for `destination.targets`
Expand All @@ -287,8 +287,8 @@ Optional:

Optional:

- `groups` (Attributes Set) (see [below for nested schema](#nestedatt--destination--actions--groups))
- `users` (Attributes Set) (see [below for nested schema](#nestedatt--destination--actions--users))
- `groups` (Attributes Set) Must contain at least one item. (see [below for nested schema](#nestedatt--destination--actions--groups))
- `users` (Attributes Set) Must contain at least one item. (see [below for nested schema](#nestedatt--destination--actions--users))

<a id="nestedatt--destination--actions--groups"></a>
### Nested Schema for `destination.actions.groups`
Expand Down Expand Up @@ -323,7 +323,7 @@ Required:

Optional:

- `actions` (Attributes) (see [below for nested schema](#nestedatt--pipeline_source--actions))
- `actions` (Attributes) Either one of `users` or `groups` attribute must be set. (see [below for nested schema](#nestedatt--pipeline_source--actions))

<a id="nestedatt--pipeline_source--targets"></a>
### Nested Schema for `pipeline_source.targets`
Expand All @@ -343,8 +343,8 @@ Optional:

Optional:

- `groups` (Attributes Set) (see [below for nested schema](#nestedatt--pipeline_source--actions--groups))
- `users` (Attributes Set) (see [below for nested schema](#nestedatt--pipeline_source--actions--users))
- `groups` (Attributes Set) Must contain at least one item. (see [below for nested schema](#nestedatt--pipeline_source--actions--groups))
- `users` (Attributes Set) Must contain at least one item. (see [below for nested schema](#nestedatt--pipeline_source--actions--users))

<a id="nestedatt--pipeline_source--actions--groups"></a>
### Nested Schema for `pipeline_source.actions.groups`
Expand Down Expand Up @@ -379,7 +379,7 @@ Required:

Optional:

- `actions` (Attributes) (see [below for nested schema](#nestedatt--release_bundle--actions))
- `actions` (Attributes) Either one of `users` or `groups` attribute must be set. (see [below for nested schema](#nestedatt--release_bundle--actions))

<a id="nestedatt--release_bundle--targets"></a>
### Nested Schema for `release_bundle.targets`
Expand All @@ -399,8 +399,8 @@ Optional:

Optional:

- `groups` (Attributes Set) (see [below for nested schema](#nestedatt--release_bundle--actions--groups))
- `users` (Attributes Set) (see [below for nested schema](#nestedatt--release_bundle--actions--users))
- `groups` (Attributes Set) Must contain at least one item. (see [below for nested schema](#nestedatt--release_bundle--actions--groups))
- `users` (Attributes Set) Must contain at least one item. (see [below for nested schema](#nestedatt--release_bundle--actions--users))

<a id="nestedatt--release_bundle--actions--groups"></a>
### Nested Schema for `release_bundle.actions.groups`
Expand Down
Loading

0 comments on commit 6578b75

Please sign in to comment.