Skip to content

Commit

Permalink
Merge pull request #11 from d-strobel/refactor
Browse files Browse the repository at this point in the history
Refactor
  • Loading branch information
d-strobel authored Feb 12, 2024
2 parents cccceea + 3af74d5 commit 63bc7ef
Show file tree
Hide file tree
Showing 28 changed files with 794 additions and 96 deletions.
8 changes: 0 additions & 8 deletions .github/dependabot.yml

This file was deleted.

6 changes: 3 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ WARN_COLOR=\033[33;01m
.PHONY: generate-framework
generate-framework:
@printf "$(OK_COLOR)==> Generate provider schema$(NO_COLOR)\n"
tfplugingen-framework generate provider --input ./internal/schema/provider_windows.json --output ./internal/generate/provider_windows --package provider_windows
tfplugingen-framework generate provider --input ./internal/schema/provider_windows.json --output ./internal/generate

@printf "$(OK_COLOR)==> Generate local schema$(NO_COLOR)\n"
tfplugingen-framework generate data-sources --input ./internal/schema/local_datasources.json --output ./internal/generate/local_datasources --package local_datasources
tfplugingen-framework generate resources --input ./internal/schema/local_resources.json --output ./internal/generate/local_resources --package local_resources
tfplugingen-framework generate data-sources --input ./internal/schema/local_datasources.json --output ./internal/generate
tfplugingen-framework generate resources --input ./internal/schema/local_resources.json --output ./internal/generate

# Generate documentation
.PHONY: generate-docs
Expand Down
1 change: 0 additions & 1 deletion docs/data-sources/local_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ description: |-
<!-- data-source description generated from schema -->
Retrieve information about a local security group.
You can get a group by the name or the security ID of the group.

<!-- examples generated from example files -->
## Example Usage

Expand Down
33 changes: 33 additions & 0 deletions docs/data-sources/local_groups.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
page_title: "windows_local_groups Data Source - terraform-provider-windows"
subcategory: "Local"
description: |-
Retrieve a list of all local security groups
---
# windows_local_groups (Data Source)

<!-- data-source description generated from schema -->
Retrieve a list of all local security groups.
<!-- examples generated from example files -->
## Example Usage

```terraform
data "windows_local_groups" "all" {}
```

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

### Read-Only

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

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

Read-Only:

- `description` (String) The description of the local security group.
- `id` (String) The ID of the retrieved local security group. This is the same as the SID.
- `name` (String) The name of the local security group.
- `sid` (String) The security ID of the local security group.
1 change: 0 additions & 1 deletion docs/data-sources/local_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ description: |-

<!-- data-source description generated from schema -->
Get information about a local user.

<!-- examples generated from example files -->
## Example Usage

Expand Down
2 changes: 0 additions & 2 deletions docs/resources/local_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Manage local security groups.

**Note:** The description default is a string with a space.
This is necessary because the powershell function Set-LocalGroup does not allow an empty string.

<!-- examples generated from example files -->
## Example Usage

Expand All @@ -37,7 +36,6 @@ resource "windows_local_group" "test" {

- `id` (String) The ID of the retrieved local security group. This is the same as the SID.
- `sid` (String) The security ID of the local security group.

## Import

Import a local group by the security ID (SID).
Expand Down
2 changes: 0 additions & 2 deletions docs/resources/local_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ description: |-

<!-- resource description generated from schema -->
Manage local users.

<!-- examples generated from example files -->
## Example Usage

Expand Down Expand Up @@ -44,7 +43,6 @@ resource "windows_local_user" "this" {
- `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.
- `sid` (String) The security ID of the local user.

## Import

Import a local user by the security ID (SID).
Expand Down
1 change: 1 addition & 0 deletions examples/data-sources/windows_local_groups/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data "windows_local_groups" "all" {}
29 changes: 17 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ toolchain go1.21.1

require (
github.com/d-strobel/gowindows v0.0.0-20240105224217-566c4d2dcc50
github.com/hashicorp/terraform-plugin-docs v0.16.0
github.com/hashicorp/terraform-plugin-docs v0.17.0
github.com/hashicorp/terraform-plugin-framework v1.5.0
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0
github.com/hashicorp/terraform-plugin-go v0.20.0
Expand All @@ -15,22 +15,24 @@ require (
require (
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect
github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 // indirect
github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/bodgit/ntlmssp v0.0.0-20231122144230-2b2bca29f22b // indirect
github.com/bodgit/windows v1.0.1 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/d-strobel/winrm v1.0.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/gofrs/uuid v4.4.0+incompatible // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/hashicorp/cli v1.1.6 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
Expand All @@ -39,14 +41,14 @@ require (
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.6.1 // indirect
github.com/hashicorp/terraform-exec v0.19.0 // indirect
github.com/hashicorp/terraform-json v0.18.0 // indirect
github.com/hashicorp/hc-install v0.6.2 // indirect
github.com/hashicorp/terraform-exec v0.20.0 // indirect
github.com/hashicorp/terraform-json v0.20.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
Expand All @@ -56,8 +58,8 @@ require (
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mitchellh/cli v1.1.5 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
Expand All @@ -69,14 +71,17 @@ require (
github.com/tidwall/transform v0.0.0-20201103190739-32f242e2dbde // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/yuin/goldmark v1.6.0 // indirect
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zclconf/go-cty v1.14.1 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect
google.golang.org/grpc v1.60.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
)
Loading

0 comments on commit 63bc7ef

Please sign in to comment.