Skip to content

Commit edb20aa

Browse files
authored
Initial commit
0 parents  commit edb20aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2980
-0
lines changed

.copywrite.hcl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# NOTE: This file is for HashiCorp specific licensing automation and can be deleted after creating a new repo with this template.
2+
schema_version = 1
3+
4+
project {
5+
license = "MPL-2.0"
6+
copyright_year = 2021
7+
8+
header_ignore = [
9+
# internal catalog metadata (prose)
10+
"META.d/**/*.yaml",
11+
12+
# examples used within documentation (prose)
13+
"examples/**",
14+
15+
# GitHub issue template configuration
16+
".github/ISSUE_TEMPLATE/*.yml",
17+
18+
# golangci-lint tooling configuration
19+
".golangci.yml",
20+
21+
# GoReleaser tooling configuration
22+
".goreleaser.yml",
23+
]
24+
}

.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/dependabot.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# See GitHub's documentation for more information on this file:
2+
# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates
3+
version: 2
4+
updates:
5+
# Maintain dependencies for Go modules
6+
- package-ecosystem: "gomod"
7+
directory: "/"
8+
schedule:
9+
# Check for updates to Go modules every weekday
10+
interval: "daily"
11+
groups:
12+
# Group all terraform-plugin-(go|sdk|framework|testing) dependencies together
13+
"terraform-plugin":
14+
patterns:
15+
- "github.com/hashicorp/terraform-plugin-*"
16+
- package-ecosystem: "gomod"
17+
directory: "/tools"
18+
schedule:
19+
interval: "daily"
20+
- package-ecosystem: "github-actions"
21+
directory: "/"
22+
groups:
23+
"github-actions":
24+
patterns:
25+
- "*" # Group all GitHub Actions dependencies together
26+
schedule:
27+
interval: "weekly"
28+
day: "monday"
29+
time: "09:00"
30+
timezone: "Etc/UTC"

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Related Issue
2+
3+
Fixes # <!-- INSERT ISSUE NUMBER -->
4+
5+
## Description
6+
7+
In plain English, describe your approach to addressing the issue linked above. For example, if you made a particular design decision, let us know why you chose this path instead of another solution.
8+
9+
<!-- heimdall_github_prtemplate:grc-pci_dss-2024-01-05 -->
10+
## Rollback Plan
11+
12+
- [ ] If a change needs to be reverted, we will roll out an update to the code within 7 days.
13+
14+
## Changes to Security Controls
15+
16+
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# DO NOT EDIT - This GitHub Workflow is managed by automation
2+
# https://github.com/hashicorp/terraform-devex-repos
3+
name: Issue Comment Triage
4+
5+
on:
6+
issue_comment:
7+
types: [created]
8+
9+
jobs:
10+
issue_comment_triage:
11+
runs-on: ubuntu-latest
12+
env:
13+
# issue_comment events are triggered by comments on issues and pull requests. Checking the
14+
# value of github.event.issue.pull_request tells us whether the issue is an issue or is
15+
# actually a pull request, allowing us to dynamically set the gh subcommand:
16+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment-on-issues-only-or-pull-requests-only
17+
COMMAND: ${{ github.event.issue.pull_request && 'pr' || 'issue' }}
18+
GH_TOKEN: ${{ github.token }}
19+
steps:
20+
- name: 'Remove waiting-response on comment'
21+
run: gh ${{ env.COMMAND }} edit ${{ github.event.issue.html_url }} --remove-label waiting-response

.github/workflows/lock.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# DO NOT EDIT - This GitHub Workflow is managed by automation
2+
# https://github.com/hashicorp/terraform-devex-repos
3+
name: 'Lock Threads'
4+
5+
on:
6+
schedule:
7+
- cron: '43 20 * * *'
8+
9+
jobs:
10+
lock:
11+
runs-on: ubuntu-latest
12+
steps:
13+
# NOTE: When TSCCR updates the GitHub action version, update the template workflow file to avoid drift:
14+
# https://github.com/hashicorp/terraform-devex-repos/blob/main/modules/repo/workflows/lock.tftpl
15+
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
16+
with:
17+
github-token: ${{ github.token }}
18+
issue-inactive-days: '30'
19+
issue-lock-reason: resolved
20+
pr-inactive-days: '30'
21+
pr-lock-reason: resolved

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Terraform Provider release workflow.
2+
name: Release
3+
4+
# This GitHub action creates a release when a tag that matches the pattern
5+
# "v*" (e.g. v0.1.0) is created.
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
# Releases need permissions to read and write the repository contents.
12+
# GitHub considers creating releases and uploading assets as writing contents.
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
goreleaser:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
with:
22+
# Allow goreleaser to access older tag information.
23+
fetch-depth: 0
24+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
25+
with:
26+
go-version-file: 'go.mod'
27+
cache: true
28+
- name: Import GPG key
29+
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
30+
id: import_gpg
31+
with:
32+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
33+
passphrase: ${{ secrets.PASSPHRASE }}
34+
- name: Run GoReleaser
35+
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
36+
with:
37+
args: release --clean
38+
env:
39+
# GitHub sets the GITHUB_TOKEN secret automatically.
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.github/workflows/test.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Terraform Provider testing workflow.
2+
name: Tests
3+
4+
# This GitHub action runs your tests for each pull request and push.
5+
# Optionally, you can turn it on using a schedule for regular testing.
6+
on:
7+
pull_request:
8+
paths-ignore:
9+
- 'README.md'
10+
push:
11+
paths-ignore:
12+
- 'README.md'
13+
14+
# Testing only needs permissions to read the repository contents.
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
# Ensure project builds before running testing matrix
20+
build:
21+
name: Build
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 5
24+
steps:
25+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
27+
with:
28+
go-version-file: 'go.mod'
29+
cache: true
30+
- run: go mod download
31+
- run: go build -v .
32+
- name: Run linters
33+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
34+
with:
35+
version: latest
36+
37+
generate:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
42+
with:
43+
go-version-file: 'go.mod'
44+
cache: true
45+
# We need the latest version of Terraform for our documentation generation to use
46+
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
47+
with:
48+
terraform_wrapper: false
49+
- run: make generate
50+
- name: git diff
51+
run: |
52+
git diff --compact-summary --exit-code || \
53+
(echo; echo "Unexpected difference in directories after code generation. Run 'make generate' command and commit."; exit 1)
54+
55+
# Run acceptance tests in a matrix with Terraform CLI versions
56+
test:
57+
name: Terraform Provider Acceptance Tests
58+
needs: build
59+
runs-on: ubuntu-latest
60+
timeout-minutes: 15
61+
strategy:
62+
fail-fast: false
63+
matrix:
64+
# list whatever Terraform versions here you would like to support
65+
terraform:
66+
- '1.0.*'
67+
- '1.1.*'
68+
- '1.2.*'
69+
- '1.3.*'
70+
- '1.4.*'
71+
steps:
72+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
73+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
74+
with:
75+
go-version-file: 'go.mod'
76+
cache: true
77+
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
78+
with:
79+
terraform_version: ${{ matrix.terraform }}
80+
terraform_wrapper: false
81+
- run: go mod download
82+
- env:
83+
TF_ACC: "1"
84+
run: go test -v -cover ./internal/provider/
85+
timeout-minutes: 10

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
*.dll
2+
*.exe
3+
.DS_Store
4+
example.tf
5+
terraform.tfplan
6+
terraform.tfstate
7+
bin/
8+
dist/
9+
modules-dev/
10+
/pkg/
11+
website/.vagrant
12+
website/.bundle
13+
website/build
14+
website/node_modules
15+
.vagrant/
16+
*.backup
17+
./*.tfstate
18+
.terraform/
19+
*.log
20+
*.bak
21+
*~
22+
.*.swp
23+
.idea
24+
*.iml
25+
*.test
26+
*.iml
27+
28+
website/vendor
29+
30+
# Test exclusions
31+
!command/test-fixtures/**/*.tfstate
32+
!command/test-fixtures/**/.terraform/
33+
34+
# Keep windows files with windows line endings
35+
*.winfile eol=crlf

0 commit comments

Comments
 (0)