Skip to content

Commit

Permalink
Add deprecation message to space id
Browse files Browse the repository at this point in the history
  • Loading branch information
N-lson committed Oct 9, 2024
1 parent db719e4 commit 8552c97
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data "octopusdeploy_users" "example" {
- `filter` (String) A filter search by username, display name or email
- `ids` (List of String) A filter to search by a list of IDs.
- `skip` (Number) A filter to specify the number of items to skip in the response.
- `space_id` (String) The space ID associated with this user.
- `space_id` (String, Deprecated) The space ID of this user.
- `take` (Number) A filter to specify the number of items to take (or return) in the response.

### Read-Only
Expand Down
10 changes: 9 additions & 1 deletion octopusdeploy_framework/schemas/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (u UserSchema) GetDatasourceSchema() datasourceSchema.Schema {
Attributes: map[string]datasourceSchema.Attribute{
//request
"ids": GetQueryIDsDatasourceSchema(),
"space_id": GetSpaceIdDatasourceSchema(UserResourceDescription, false),
"space_id": GetUserSpaceIdDatasourceSchema(),
"filter": GetFilterDatasourceSchema(),
"skip": GetQuerySkipDatasourceSchema(),
"take": GetQueryTakeDatasourceSchema(),
Expand Down Expand Up @@ -94,6 +94,14 @@ func (u UserSchema) GetDatasourceSchemaAttributes() map[string]datasourceSchema.
}
}

func GetUserSpaceIdDatasourceSchema() datasourceSchema.Attribute {
return datasourceSchema.StringAttribute{
Description: "The space ID of this user.",
Optional: true,
DeprecationMessage: "This attribute is deprecated and will be removed in a future release. Users are not scoped to spaces, meaning providing a space ID will not affect the result.",
}
}

func GetFilterDatasourceSchema() datasourceSchema.Attribute {
return datasourceSchema.StringAttribute{
Description: "A filter search by username, display name or email",
Expand Down

0 comments on commit 8552c97

Please sign in to comment.