generated from hashicorp/terraform-provider-scaffolding-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from dstaroff/dev
Implement `units_data_size` data source
- Loading branch information
Showing
47 changed files
with
1,196 additions
and
984 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), | ||
and is generated by [Changie](https://github.com/miniscruff/changie). |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## v0.1.0 - 2024-08-08 | ||
### Added | ||
* data-source/data_size: Implemented data source for conversion of data size units. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
changesDir: .changes | ||
unreleasedDir: unreleased | ||
changelogPath: CHANGELOG.md | ||
versionExt: md | ||
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}' | ||
kindFormat: '### {{.Kind}}' | ||
changeFormat: '* {{.Body}}' | ||
kinds: | ||
- label: Added | ||
auto: minor | ||
- label: Changed | ||
auto: major | ||
- label: Enhanced | ||
auto: minor | ||
- label: Deprecated | ||
auto: minor | ||
- label: Removed | ||
auto: major | ||
- label: Fixed | ||
auto: patch | ||
- label: Security | ||
auto: patch | ||
newlines: | ||
afterKind: 1 | ||
beforeKind: 1 | ||
endOfVersion: 1 |
This file was deleted.
Oops, something went wrong.
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @hashicorp/terraform-devex | ||
* @dstaroff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Changie | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- .changes/unreleased/*.yaml | ||
- .changie.yaml | ||
- .github/workflows/changie.yml | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
check: | ||
name: Ensure no diff | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Run Changie | ||
uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0 | ||
with: | ||
version: latest | ||
args: batch patch --dry-run |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,42 @@ | ||
# Terraform Provider release workflow. | ||
name: Release | ||
|
||
# This GitHub action creates a release when a tag that matches the pattern | ||
# "v*" (e.g. v0.1.0) is created. | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- 'v*' | ||
|
||
# Releases need permissions to read and write the repository contents. | ||
# GitHub considers creating releases and uploading assets as writing contents. | ||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Check out code | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
# Allow goreleaser to access older tag information. | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
|
||
- name: Import GPG key | ||
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0 | ||
id: import_gpg | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.PASSPHRASE }} | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 | ||
with: | ||
args: release --clean | ||
env: | ||
# GitHub sets the GITHUB_TOKEN secret automatically. | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,116 @@ | ||
# Terraform Provider testing workflow. | ||
name: Tests | ||
|
||
# This GitHub action runs your tests for each pull request and push. | ||
# Optionally, you can turn it on using a schedule for regular testing. | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
paths-ignore: | ||
- 'README.md' | ||
- 'CHANGELOG.md' | ||
push: | ||
branches: [ main ] | ||
paths-ignore: | ||
- 'README.md' | ||
- 'CHANGELOG.md' | ||
|
||
# Testing only needs permissions to read the repository contents. | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
# Ensure project builds before running testing matrix | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
- name: Check out code | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
- run: go mod download | ||
- run: go build -v . | ||
|
||
- name: Run linters | ||
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1 | ||
with: | ||
version: latest | ||
|
||
- name: Build | ||
# language=shell script | ||
run: | | ||
make build | ||
generate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
- name: Check out code | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
# Temporarily download Terraform 1.8 prerelease for function documentation support. | ||
# When Terraform 1.8.0 final is released, this can be removed. | ||
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # v3.1.1 | ||
|
||
- name: Set up Terraform | ||
uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # v3.1.1 | ||
with: | ||
terraform_version: '1.8.0-alpha20240216' | ||
terraform_version: '1.9.4' | ||
terraform_wrapper: false | ||
- run: go generate ./... | ||
- name: git diff | ||
|
||
- name: Generate docs | ||
# language=shell script | ||
run: | | ||
make generate | ||
- name: Ensure no diff | ||
# language=shell script | ||
run: | | ||
git diff --compact-summary --exit-code || \ | ||
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate ./...' command and commit."; exit 1) | ||
(echo "*** Unexpected diff after code generation. Run 'make generate' and commit."; exit 1) | ||
# Run acceptance tests in a matrix with Terraform CLI versions | ||
test: | ||
name: Terraform Provider Acceptance Tests | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: 'Terraform Provider Acceptance Tests (OS: ${{ matrix.os }} / TF: ${{ matrix.terraform }})' | ||
needs: | ||
- build | ||
- generate | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 15 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# list whatever Terraform versions here you would like to support | ||
os: | ||
- macos-latest | ||
- windows-latest | ||
- ubuntu-latest | ||
terraform: | ||
- '1.0.*' | ||
- '1.1.*' | ||
- '1.2.*' | ||
- '1.3.*' | ||
- '1.4.*' | ||
- '1.5.*' | ||
- '1.6.*' | ||
- '1.7.*' | ||
- '1.8.*' | ||
- '1.9.*' | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
- name: Check out code | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # v3.1.1 | ||
|
||
- name: Set up Terraform | ||
uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # v3.1.1 | ||
with: | ||
terraform_version: ${{ matrix.terraform }} | ||
terraform_wrapper: false | ||
- run: go mod download | ||
- env: | ||
TF_ACC: "1" | ||
run: go test -v -cover ./internal/provider/ | ||
timeout-minutes: 10 | ||
|
||
- name: Run acceptance test | ||
# language=shell script | ||
run: | | ||
make test-acceptance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,8 +23,8 @@ website/node_modules | |
.idea | ||
*.iml | ||
*.test | ||
*.iml | ||
|
||
archive/*.zip | ||
website/vendor | ||
|
||
# Test exclusions | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.