Skip to content

Commit

Permalink
Merge pull request #73 from jfrog/GH-70-fix-state-drift-with-empty-gr…
Browse files Browse the repository at this point in the history
…oups-list

Fix state drift with empty set for permission resource
  • Loading branch information
alexhung authored May 7, 2024
2 parents 5010949 + 1ee4b40 commit fe79529
Show file tree
Hide file tree
Showing 4 changed files with 659 additions and 133 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
## 1.7.3 (May 6, 2024)
## 1.7.3 (May 7, 2024)

BUG FIXES:

* resource/platform_oidc_configuration: Remove trailing slash from GitHub provider URL validation. Issue: [#71](https://github.com/jfrog/terraform-provider-platform/issues/71) PR: [#72](https://github.com/jfrog/terraform-provider-platform/pull/72)
* resource/platform_permission: Fix state drift when `*.actions.users` or `*.actions.groups` are set to empty set (`[]`). These 2 attributes now must either be `null`/not set, or a set of at least 1 item. Existing Terraform state with `[]` should be migrated to `null` automatically by provider. Issue: [#70](https://github.com/jfrog/terraform-provider-platform/issues/70) PR: [#73](https://github.com/jfrog/terraform-provider-platform/pull/73)

## 1.7.2 (May 1, 2024)

Expand Down
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 fe79529

Please sign in to comment.