Skip to content
This repository was archived by the owner on Oct 6, 2024. It is now read-only.

Commit e66ffd4

Browse files
committed
refactor: Import boilerplate
Signed-off-by: Justin Lecher <[email protected]>
1 parent 5f211bd commit e66ffd4

File tree

19 files changed

+1059
-65
lines changed

19 files changed

+1059
-65
lines changed

.goreleaser.yml

Lines changed: 44 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,63 @@
11
---
2-
# This is an example .goreleaser.yml file with some sensible defaults.
3-
# Make sure to check the documentation at https://goreleaser.com
2+
# Visit https://goreleaser.com for documentation on how to customize this
3+
# behavior.
44
before:
55
hooks:
6-
# You may remove this if you don't use go modules.
6+
# this is just an example and not a requirement for provider building/publishing
77
- go mod tidy
88
# you may remove this if you don't need go generate
99
- go generate ./...
1010
builds:
11-
- binary: goer
11+
- binary: "{{ .ProjectName }}_v{{ .Version }}"
1212
env:
13+
# goreleaser does not work with CGO, it could also complicate
14+
# usage by users in CI/CD systems like Terraform Cloud where
15+
# they are unable to install libraries.
1316
- CGO_ENABLED=0
17+
mod_timestamp: "{{ .CommitTimestamp }}"
18+
flags:
19+
- -trimpath
20+
ldflags:
21+
- "-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}"
1422
goarch:
1523
- amd64
16-
# - arm
24+
- "386"
25+
- arm
1726
- arm64
1827
goos:
28+
- freebsd
29+
- windows
1930
- linux
2031
- darwin
2132
ignore:
22-
- goos: linux
23-
goarch: arm64
33+
- goos: darwin
34+
goarch: "386"
2435
archives:
25-
- format: binary
26-
name_template: >-
27-
{{ .ProjectName }}_
28-
{{- if eq .Os "darwin" }}Darwin
29-
{{- else if eq .Os "linux" }}Linux
30-
{{- else if eq .Os "linux" }}Linux
31-
{{- else }}{{ .Os }}{{ end }}_
32-
{{- if eq .Arch "amd64" }}x86_64
33-
{{- else }}{{ .Arch }}{{ end }}
36+
- format: zip
37+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
3438
checksum:
35-
name_template: "checksums.txt"
36-
snapshot:
37-
name_template: "{{ incpatch .Version }}-next"
39+
extra_files:
40+
- glob: "terraform-registry-manifest.json"
41+
name_template: "{{ .ProjectName }}_{{ .Version }}_manifest.json"
42+
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
43+
algorithm: sha256
44+
signs:
45+
- artifacts: checksum
46+
args:
47+
# if you are using this in a GitHub action or some other automated pipeline, you
48+
# need to pass the batch flag to indicate its not interactive.
49+
- "--batch"
50+
- "--local-user"
51+
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
52+
- "--output"
53+
- "${signature}"
54+
- "--detach-sign"
55+
- "${artifact}"
56+
release:
57+
extra_files:
58+
- glob: "terraform-registry-manifest.json"
59+
name_template: "{{ .ProjectName }}_{{ .Version }}_manifest.json"
60+
# If you want to manually examine the release before its live, uncomment this line:
61+
# draft: true
3862
changelog:
39-
sort: asc
40-
filters:
41-
exclude:
42-
- "^docs:"
43-
- "^test:"
44-
45-
brews:
46-
- # Name template of the recipe
47-
# Default to project name
48-
name: goer
49-
50-
# GitHub/GitLab repository to push the formula to
51-
tap:
52-
owner: jlec
53-
name: homebrew-jlec
54-
55-
# Optionally a token can be provided, if it differs from the token
56-
# provided to GoReleaser
57-
# token: "{{ .Env.TAP_GITHUB_TOKEN }}"
58-
59-
# Allows you to set a custom download strategy. Note that you'll need
60-
# to implement the strategy and add it to your tap repository.
61-
# Example: https://docs.brew.sh/Formula-Cookbook#specifying-the-download-strategy-explicitly
62-
# Default is empty.
63-
download_strategy: GitHubPrivateRepositoryReleaseDownloadStrategy
64-
65-
# Allows you to add a custom require_relative at the top of the formula
66-
# template.
67-
# Default is empty
68-
custom_require: ../custom_download_strategy/private
69-
70-
# Folder inside the repository to put the formula.
71-
# Default is the root folder.
72-
folder: Formula
73-
74-
# Your app's homepage.
75-
# Default is empty.
76-
homepage: "https://github.com/{{ .Env.GITHUB_REPOSITORY }}"
77-
78-
# Your app's description.
79-
# Default is empty.
80-
description: "TF provider for Turing PI BMC"
81-
82-
# SPDX identifier of your app's license.
83-
# Default is empty.
84-
license: "Apache-2.0"
63+
skip: true

Taskfile.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ tasks:
181181
cmds:
182182
- go vet ./...
183183

184+
go-generate:
185+
desc: Generate GO docs and stuff
186+
cmds:
187+
- go generate ./...
188+
184189
#############################################################################
185190
#
186191
# Custom options
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "scaffolding_example Data Source - terraform-provider-turing-pi-bmc"
4+
subcategory: ""
5+
description: |-
6+
Example data source
7+
---
8+
9+
# scaffolding_example (Data Source)
10+
11+
Example data source
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "scaffolding_example" "example" {
17+
configurable_attribute = "some-value"
18+
}
19+
```
20+
21+
<!-- schema generated by tfplugindocs -->
22+
## Schema
23+
24+
### Optional
25+
26+
- `configurable_attribute` (String) Example configurable attribute
27+
28+
### Read-Only
29+
30+
- `id` (String) Example identifier
31+
32+

docs/index.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "turing-pi-bmc Provider"
4+
subcategory: ""
5+
description: |-
6+
7+
---
8+
9+
# turing-pi-bmc Provider
10+
11+
12+
13+
## Example Usage
14+
15+
```terraform
16+
provider "scaffolding" {
17+
# example configuration here
18+
}
19+
```
20+
21+
<!-- schema generated by tfplugindocs -->
22+
## Schema
23+
24+
### Optional
25+
26+
- `endpoint` (String) Example provider attribute

docs/resources/scaffolding_example.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "scaffolding_example Resource - terraform-provider-turing-pi-bmc"
4+
subcategory: ""
5+
description: |-
6+
Example resource
7+
---
8+
9+
# scaffolding_example (Resource)
10+
11+
Example resource
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "scaffolding_example" "example" {
17+
configurable_attribute = "some-value"
18+
}
19+
```
20+
21+
<!-- schema generated by tfplugindocs -->
22+
## Schema
23+
24+
### Optional
25+
26+
- `configurable_attribute` (String) Example configurable attribute
27+
- `defaulted` (String) Example configurable attribute with default value
28+
29+
### Read-Only
30+
31+
- `id` (String) Example identifier
32+
33+

examples/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Examples
2+
3+
This directory contains examples that are mostly used for documentation, but can also be run/tested manually via the Terraform CLI.
4+
5+
The document generation tool looks for files in the following locations by default. All other *.tf files besides the ones mentioned below are ignored by the documentation tool. This is useful for creating examples that can run and/or ar testable even if some parts are not relevant for the documentation.
6+
7+
* **provider/provider.tf** example file for the provider index page
8+
* **data-sources/`full data source name`/data-source.tf** example file for the named data source page
9+
* **resources/`full resource name`/resource.tf** example file for the named data source page
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data "scaffolding_example" "example" {
2+
configurable_attribute = "some-value"
3+
}

examples/provider/provider.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
provider "scaffolding" {
2+
# example configuration here
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
resource "scaffolding_example" "example" {
2+
configurable_attribute = "some-value"
3+
}

go.mod

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,72 @@
11
module github.com/jlec/terraform-provider-turing-pi-bmc
22

33
go 1.19
4+
5+
require (
6+
github.com/hashicorp/terraform-plugin-framework v1.2.0
7+
github.com/hashicorp/terraform-plugin-go v0.15.0
8+
github.com/hashicorp/terraform-plugin-log v0.8.0
9+
github.com/hashicorp/terraform-plugin-testing v1.2.0
10+
)
11+
12+
require (
13+
github.com/Masterminds/goutils v1.1.1 // indirect
14+
github.com/Masterminds/semver/v3 v3.1.1 // indirect
15+
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
16+
github.com/agext/levenshtein v1.2.2 // indirect
17+
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
18+
github.com/armon/go-radix v1.0.0 // indirect
19+
github.com/bgentry/speakeasy v0.1.0 // indirect
20+
github.com/fatih/color v1.15.0 // indirect
21+
github.com/golang/protobuf v1.5.3 // indirect
22+
github.com/google/go-cmp v0.5.9 // indirect
23+
github.com/google/uuid v1.3.0 // indirect
24+
github.com/hashicorp/errwrap v1.1.0 // indirect
25+
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
26+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
27+
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
28+
github.com/hashicorp/go-hclog v1.5.0 // indirect
29+
github.com/hashicorp/go-multierror v1.1.1 // indirect
30+
github.com/hashicorp/go-plugin v1.4.9 // indirect
31+
github.com/hashicorp/go-uuid v1.0.3 // indirect
32+
github.com/hashicorp/go-version v1.6.0 // indirect
33+
github.com/hashicorp/hc-install v0.5.0 // indirect
34+
github.com/hashicorp/hcl/v2 v2.16.2 // indirect
35+
github.com/hashicorp/logutils v1.0.0 // indirect
36+
github.com/hashicorp/terraform-exec v0.18.1 // indirect
37+
github.com/hashicorp/terraform-json v0.16.0 // indirect
38+
github.com/hashicorp/terraform-plugin-docs v0.14.1 // indirect
39+
github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 // indirect
40+
github.com/hashicorp/terraform-registry-address v0.2.0 // indirect
41+
github.com/hashicorp/terraform-svchost v0.1.0 // indirect
42+
github.com/hashicorp/yamux v0.1.1 // indirect
43+
github.com/huandu/xstrings v1.3.2 // indirect
44+
github.com/imdario/mergo v0.3.13 // indirect
45+
github.com/kr/pretty v0.3.0 // indirect
46+
github.com/mattn/go-colorable v0.1.13 // indirect
47+
github.com/mattn/go-isatty v0.0.18 // indirect
48+
github.com/mitchellh/cli v1.1.5 // indirect
49+
github.com/mitchellh/copystructure v1.2.0 // indirect
50+
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
51+
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
52+
github.com/mitchellh/mapstructure v1.5.0 // indirect
53+
github.com/mitchellh/reflectwalk v1.0.2 // indirect
54+
github.com/oklog/run v1.1.0 // indirect
55+
github.com/posener/complete v1.2.3 // indirect
56+
github.com/russross/blackfriday v1.6.0 // indirect
57+
github.com/shopspring/decimal v1.3.1 // indirect
58+
github.com/spf13/cast v1.5.0 // indirect
59+
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
60+
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
61+
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
62+
github.com/zclconf/go-cty v1.13.1 // indirect
63+
golang.org/x/crypto v0.7.0 // indirect
64+
golang.org/x/mod v0.8.0 // indirect
65+
golang.org/x/net v0.9.0 // indirect
66+
golang.org/x/sys v0.7.0 // indirect
67+
golang.org/x/text v0.9.0 // indirect
68+
google.golang.org/appengine v1.6.7 // indirect
69+
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
70+
google.golang.org/grpc v1.54.0 // indirect
71+
google.golang.org/protobuf v1.30.0 // indirect
72+
)

0 commit comments

Comments
 (0)