Skip to content

Commit

Permalink
Merge pull request #18 from d-strobel/feat/local-user-time-formats
Browse files Browse the repository at this point in the history
Feat/local user time formats
  • Loading branch information
d-strobel authored Feb 13, 2024
2 parents 63bc7ef + a44dde6 commit f6f785f
Show file tree
Hide file tree
Showing 15 changed files with 1,802 additions and 331 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/local_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ data "windows_local_user" "admin" {
- `enabled` (Boolean) Get the status of the local user.
- `full_name` (String) The full name of the local user.
- `id` (String) The ID of the retrieved local user. This is the same as the SID.
- `last_login` (String) The last login time of the local user.
- `last_logon` (String) The last logon time of the local user.
- `password_changeable_date` (String) The password changeable date of the local user.
- `password_expires` (String) The time when the password of the local user expires.
- `password_last_set` (String) The last time when the password was set for the local user.
Expand Down
42 changes: 42 additions & 0 deletions docs/data-sources/local_users.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
page_title: "windows_local_users Data Source - terraform-provider-windows"
subcategory: "Local"
description: |-
Retrieve a list of all local users
---
# windows_local_users (Data Source)

<!-- data-source description generated from schema -->
Retrieve a list of all local users.

<!-- schema generated by tfplugindocs -->
## Schema

### Read-Only

- `users` (Attributes List) (see [below for nested schema](#nestedatt--users))

<a id="nestedatt--users"></a>
### Nested Schema for `users`

Required:

- `name` (String) Define the name of the local user.

Optional:

- `sid` (String) The security ID of the local user.

Read-Only:

- `account_expires` (String) Retrieve the time where the local user account expires.
- `description` (String) The description of the local user.
- `enabled` (Boolean) Get the status of the local user.
- `full_name` (String) The full name of the local user.
- `id` (String) The ID of the retrieved local user. This is the same as the SID.
- `last_logon` (String) The last logon time of the local user.
- `password_changeable_date` (String) The password changeable date of the local user.
- `password_expires` (String) The time when the password of the local user expires.
- `password_last_set` (String) The last time when the password was set for the local user.
- `password_required` (Boolean) If true a password is required login with the local user.
- `user_may_change_password` (Boolean) If true the local user can change it's password.
4 changes: 2 additions & 2 deletions docs/resources/local_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resource "windows_local_user" "this" {

### Optional

- `account_expires` (String) Define when the local user account expires (UTC). If not specified, the user account never expires.<br>The string time format is the following: `yyyy-MM-dd hh:mm:ss` (see [go time package](https://pkg.go.dev/time#pkg-constants) `DateTime`).
- `account_expires` (String) Define when the local user account expires. If not specified, the user account never expires.<br>The string time format is the following: `2023-07-25T20:43:16Z` (see [Terraform timetypes](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework-timetypes@v0.3.0/timetypes#RFC3339)).
- `description` (String) Define a description for the local user. The maximum length is 48 characters.
- `enabled` (Boolean) (Default: `true`)<br>Define whether the local user is enabled.
- `full_name` (String) Define the full name of the local user. The full name differs from the user name of the user account.
Expand All @@ -37,7 +37,7 @@ resource "windows_local_user" "this" {
### Read-Only

- `id` (String) The ID of the retrieved local security group. This is the same as the SID.
- `last_login` (String) The last login time of the local user.
- `last_logon` (String) The last logon time of the local user.
- `password_changeable_date` (String) The password changeable date of the local user.
- `password_expires` (String) The time when the password of the local user expires.
- `password_last_set` (String) The last time when the password was set for the local user.
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require (
github.com/d-strobel/gowindows v0.0.0-20240105224217-566c4d2dcc50
github.com/hashicorp/terraform-plugin-docs v0.17.0
github.com/hashicorp/terraform-plugin-framework v1.5.0
github.com/hashicorp/terraform-plugin-framework-timetypes v0.3.0
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0
github.com/hashicorp/terraform-plugin-go v0.20.0
)
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ github.com/hashicorp/terraform-plugin-docs v0.17.0 h1:H1Yc+bgB//Geau5g7YKkhG5v9t
github.com/hashicorp/terraform-plugin-docs v0.17.0/go.mod h1:cKC8GSLE+0a0bi7LtlpXgrqnlRDCGoGDn15PTEA+Ang=
github.com/hashicorp/terraform-plugin-framework v1.5.0 h1:8kcvqJs/x6QyOFSdeAyEgsenVOUeC/IyKpi2ul4fjTg=
github.com/hashicorp/terraform-plugin-framework v1.5.0/go.mod h1:6waavirukIlFpVpthbGd2PUNYaFedB0RwW3MDzJ/rtc=
github.com/hashicorp/terraform-plugin-framework-timetypes v0.3.0 h1:egR4InfakWkgepZNUATWGwkrPhaAYOTEybPfEol+G/I=
github.com/hashicorp/terraform-plugin-framework-timetypes v0.3.0/go.mod h1:9vjvl36aY1p6KltaA5QCvGC5hdE/9t4YuhGftw6WOgE=
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc=
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg=
github.com/hashicorp/terraform-plugin-go v0.20.0 h1:oqvoUlL+2EUbKNsJbIt3zqqZ7wi6lzn4ufkn/UA51xQ=
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f6f785f

Please sign in to comment.