Skip to content

Commit 325f93b

Browse files
committed
Initial commit
0 parents  commit 325f93b

24 files changed

+1243
-0
lines changed

.changelog-note.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{- define "note" -}}
2+
{{.Body}} ([#{{- .Issue -}}](https://github.com/hashicorp/terraform-plugin-framework-validators/issues/{{- .Issue -}}))
3+
{{- end -}}

.changelog.tmpl

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{{- if .NotesByType.note -}}
2+
NOTES:
3+
{{range .NotesByType.note -}}
4+
* {{ template "note" .}}
5+
{{ end -}}
6+
{{- end -}}
7+
8+
{{- if .NotesByType.deprecation -}}
9+
DEPRECATIONS:
10+
{{range .NotesByType.deprecation -}}
11+
* {{ template "note" .}}
12+
{{ end -}}
13+
{{- end -}}
14+
15+
{{- if index .NotesByType "breaking-change" -}}
16+
BREAKING CHANGES:
17+
{{range index .NotesByType "breaking-change" -}}
18+
* {{ template "note" .}}
19+
{{ end -}}
20+
{{- end -}}
21+
22+
{{- if .NotesByType.feature }}
23+
FEATURES:
24+
{{range .NotesByType.feature | sort -}}
25+
* {{ template "note" . }}
26+
{{ end -}}
27+
{{- end -}}
28+
29+
{{- if .NotesByType.enhancement}}
30+
ENHANCEMENTS:
31+
{{range .NotesByType.enhancement | sort -}}
32+
* {{ template "note" . }}
33+
{{ end -}}
34+
{{- end -}}
35+
36+
{{- if .NotesByType.bug }}
37+
BUG FIXES:
38+
{{range .NotesByType.bug -}}
39+
* {{ template "note" . }}
40+
{{ end -}}
41+
{{- end -}}
42+

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @hashicorp/terraform-devex

.github/CODE_OF_CONDUCT.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Code of Conduct
2+
3+
HashiCorp Community Guidelines apply to you when interacting with the community here on GitHub and contributing code.
4+
5+
Please read the full text at https://www.hashicorp.com/community-guidelines

.github/CONTRIBUTING.md

Lines changed: 330 additions & 0 deletions
Large diffs are not rendered by default.

.github/ISSUE_TEMPLATE/Bug_Report.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Bug Report
2+
description: Something is incorrect or not working as expected.
3+
labels: ["bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thank you for taking the time to fill out this bug report! Please note that this issue tracker is only used for bug reports and feature requests. Other issues will be closed.
9+
10+
If you have a question, please go back to the issue chooser and select one of the question links.
11+
- type: textarea
12+
id: versions
13+
attributes:
14+
label: Terraform CLI and Framework Versions
15+
description: What versions of Terraform CLI and terraform-plugin-framework?
16+
placeholder: Output of `terraform version` from configuration directory and `go list -m github.com/hashicorp/terraform-plugin-framework`
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: terraform-plugin-framework-code
21+
attributes:
22+
label: Terraform Plugin Framework Code
23+
description: Please copy and paste any relevant Terraform Plugin Framework code. This will be automatically formatted into code, so no need for backticks.
24+
render: golang
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: terraform-configuration
29+
attributes:
30+
label: Terraform Configuration
31+
description: Please copy and paste any relevant Terraform configuration. This will be automatically formatted into code, so no need for backticks.
32+
render: terraform
33+
validations:
34+
required: true
35+
- type: textarea
36+
id: expected-behavior
37+
attributes:
38+
label: Expected Behavior
39+
description: What did you expect to happen?
40+
placeholder: Description of what should have happened.
41+
validations:
42+
required: true
43+
- type: textarea
44+
id: actual-behavior
45+
attributes:
46+
label: Actual Behavior
47+
description: What actually happened?
48+
placeholder: Description of what actually happened.
49+
validations:
50+
required: true
51+
- type: textarea
52+
id: reproduction-steps
53+
attributes:
54+
label: Steps to Reproduce
55+
description: List of steps to reproduce the issue.
56+
value: |
57+
1. `terraform apply`
58+
validations:
59+
required: true
60+
- type: input
61+
id: logs
62+
attributes:
63+
label: Logs
64+
description: Please provide a link to a [GitHub Gist](https://gist.github.com) containing TRACE log output. [Terraform Provider Logging Documentation](https://www.terraform.io/plugin/log/managing)
65+
placeholder: https://gist.github.com/example/12345678
66+
validations:
67+
required: false
68+
- type: textarea
69+
id: additional-information
70+
attributes:
71+
label: Additional Information
72+
description: Are there any additional details about your environment, workflow, or recent changes that might be relevant? Have you discovered a workaround? Are there links to other related issues?
73+
validations:
74+
required: false
75+
- type: checkboxes
76+
id: terms
77+
attributes:
78+
label: Code of Conduct
79+
description: By submitting this issue, you agree to follow our [Community Guidelines](https://www.hashicorp.com/community-guidelines).
80+
options:
81+
- label: I agree to follow this project's Code of Conduct
82+
required: true
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Feature Request
2+
description: Something is missing or could be improved.
3+
labels: ["enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thank you for taking the time to fill out this feature request! Please note that this issue tracker is only used for bug reports and feature requests. Other issues will be closed.
9+
10+
If you have a question, please go back to the issue chooser and select one of the question links.
11+
- type: textarea
12+
id: versions
13+
attributes:
14+
label: Terraform CLI and Framework Versions
15+
description: What versions of Terraform CLI and terraform-plugin-framework?
16+
placeholder: Output of `terraform version` from configuration directory and `go list -m github.com/hashicorp/terraform-plugin-framework`
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: use-case
21+
attributes:
22+
label: Use Cases or Problem Statement
23+
description: What use cases or problems are you trying to solve?
24+
placeholder: Description of use cases or problems. Please note that feature requests that would be satisfied by creating a custom type (implementing the `attr.TypeWithValidators` interface), such as Base64, JSON, RFC 3339, or other string-specific validation will be closed.
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: proposal
29+
attributes:
30+
label: Proposal
31+
description: What solutions would you prefer?
32+
placeholder: Description of proposed solutions.
33+
validations:
34+
required: true
35+
- type: textarea
36+
id: additional-information
37+
attributes:
38+
label: Additional Information
39+
description: Are there any additional details about your environment, workflow, or recent changes that might be relevant? Have you discovered a workaround? Are there links to other related issues?
40+
validations:
41+
required: false
42+
- type: checkboxes
43+
id: terms
44+
attributes:
45+
label: Code of Conduct
46+
description: By submitting this issue, you agree to follow our [Community Guidelines](https://www.hashicorp.com/community-guidelines).
47+
options:
48+
- label: I agree to follow this project's Code of Conduct
49+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Terraform Plugin Framework Bug Reports and Feature Requests
4+
url: https://github.com/hashicorp/terraform-plugin-framework/issues
5+
about: GitHub issues in this repository are only intended for bug reports and feature requests of common use case validators. Submit bug reports and feature request for the Terraform Plugin Framework to its separate repository issue tracker.
6+
- name: Terraform Plugin Framework Questions
7+
url: https://discuss.hashicorp.com/c/terraform-providers/tf-plugin-sdk
8+
about: Please ask and answer SDK related questions through the Terraform Plugin SDK section of HashiCorp Discuss.
9+
- name: Terraform Provider Questions
10+
url: https://discuss.hashicorp.com/c/terraform-providers/31
11+
about: Please ask and answer questions through the Terraform Provider section of HashiCorp Discuss.
12+
- name: Terraform Language or Workflow Questions
13+
url: https://discuss.hashicorp.com/c/terraform-core
14+
about: Please ask and answer language or workflow related questions through the Terraform Core section of HashiCorp Discuss.

.github/SUPPORT.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Support
2+
3+
Terraform is a mature project with a growing community. There are active, dedicated people willing to help you through various mediums.
4+
5+
Take a look at those mediums listed at https://www.terraform.io/community.html

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
- package-ecosystem: "gomod"
8+
directory: "/"
9+
schedule:
10+
interval: "daily"
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Based on https://github.com/leonsteinhaeuser/project-beta-automations
2+
3+
name: "Add Issues/PRs to TF Provider DevEx team board"
4+
5+
on:
6+
issues:
7+
types: [opened, reopened]
8+
pull_request_target:
9+
# NOTE: The way content is added to project board is equivalent to an "upsert".
10+
# Calling it multiple times will be idempotent.
11+
#
12+
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
13+
# to see the reasoning behind using `pull_request_target` instead of `pull_request`
14+
types: [opened, reopened, ready_for_review]
15+
16+
jobs:
17+
add-content-to-project:
18+
name: "Add Content to project"
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: "Set Issue to 'Priority = Triage Next'"
22+
uses: leonsteinhaeuser/[email protected]
23+
if: github.event_name == 'issues'
24+
with:
25+
gh_token: ${{ secrets.TF_DEVEX_PROJECT_GITHUB_TOKEN }}
26+
organization: "hashicorp"
27+
project_id: 99 #< https://github.com/orgs/hashicorp/projects/99
28+
resource_node_id: ${{ github.event.issue.node_id }}
29+
operation_mode: custom_field
30+
custom_field_values: '[{\"name\":\"Priority\",\"type\":\"single_select\",\"value\":\"Triage Next\"}]'
31+
- name: "Set Pull Request to 'Priority = Triage Next'"
32+
uses: leonsteinhaeuser/[email protected]
33+
if: github.event_name == 'pull_request_target'
34+
with:
35+
gh_token: ${{ secrets.TF_DEVEX_PROJECT_GITHUB_TOKEN }}
36+
organization: "hashicorp"
37+
project_id: 99 #< https://github.com/orgs/hashicorp/projects/99
38+
resource_node_id: ${{ github.event.pull_request.node_id }}
39+
operation_mode: custom_field
40+
custom_field_values: '[{\"name\":\"Priority\",\"type\":\"single_select\",\"value\":\"Triage Next\"}]'
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Continuous integration handling for GitHub Actions workflows
2+
name: ci-github-actions
3+
4+
on:
5+
pull_request:
6+
paths:
7+
- .github/workflows/*.yml
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
actionlint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- id: go-version
18+
# Reference: https://github.com/actions/setup-go/issues/23
19+
run: echo "::set-output name=version::$(cat ./.go-version)"
20+
- uses: actions/setup-go@v3
21+
with:
22+
go-version: ${{ steps.go-version.outputs.version }}
23+
- run: go install github.com/rhysd/actionlint/cmd/actionlint@latest
24+
- run: actionlint

.github/workflows/ci-go.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Continuous integration handling for Go
2+
name: ci-go
3+
4+
on:
5+
pull_request:
6+
paths:
7+
- .github/workflows/ci-go.yml
8+
- .golangci.yml
9+
- go.mod
10+
- '**.go'
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
golangci-lint:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- uses: actions/setup-go@v3
21+
with:
22+
go-version-file: 'go.mod'
23+
- run: go mod download
24+
- uses: golangci/[email protected]
25+
with:
26+
skip-go-installation: true
27+
terraform-provider-corner:
28+
defaults:
29+
run:
30+
working-directory: terraform-provider-corner
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v3
35+
with:
36+
path: terraform-provider-corner
37+
repository: hashicorp/terraform-provider-corner
38+
- uses: actions/setup-go@v3
39+
with:
40+
go-version-file: 'go.mod'
41+
- run: go mod edit -replace=github.com/hashicorp/terraform-plugin-framework-validators=../
42+
- run: go mod tidy
43+
- run: go test -v ./internal/frameworkprovider
44+
test:
45+
name: test (Go v${{ matrix.go-version }})
46+
runs-on: ubuntu-latest
47+
strategy:
48+
matrix:
49+
go-version: [ '1.18', '1.17' ]
50+
steps:
51+
- uses: actions/checkout@v3
52+
- uses: actions/setup-go@v3
53+
with:
54+
go-version: ${{ matrix.go-version }}
55+
- run: go mod download
56+
- run: go test -coverprofile=coverage.out ./...
57+
- run: go tool cover -html=coverage.out -o coverage.html
58+
- uses: actions/upload-artifact@v3
59+
with:
60+
name: go-${{ matrix.go-version }}-coverage
61+
path: coverage.html

.github/workflows/ci-goreleaser.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Continuous integration handling for GoReleaser
2+
name: ci-goreleaser
3+
4+
on:
5+
pull_request:
6+
paths:
7+
- .goreleaser.yml
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
check:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- id: go-version
18+
# Reference: https://github.com/actions/setup-go/issues/23
19+
run: echo "::set-output name=version::$(cat ./.go-version)"
20+
- uses: actions/setup-go@v3
21+
with:
22+
go-version: ${{ steps.go-version.outputs.version }}
23+
- uses: goreleaser/goreleaser-action@v2
24+
with:
25+
args: check
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Issue Comment Created Triage
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
issue_comment_triage:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions-ecosystem/action-remove-labels@v1
12+
with:
13+
labels: |
14+
stale
15+
waiting-response

0 commit comments

Comments
 (0)