-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PRODENG-2204 convert to plugin framework
- rebase on the scaffolding project - move mirantis/mke/client to internal/client - rewrite provider & client-bundle resource ALSO - client linting fixes - ioutil deprecation - standard Mirantis provider Makefile targets Signed-off-by: James Nesbitt <[email protected]>
- Loading branch information
1 parent
77cd64f
commit b838335
Showing
94 changed files
with
1,696 additions
and
2,632 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,29 @@ | ||
*.dll | ||
*.exe | ||
.DS_Store | ||
example.tf | ||
terraform.tfplan | ||
terraform.tfstate | ||
bin/ | ||
dist/ | ||
modules-dev/ | ||
/pkg/ | ||
vendor | ||
website/.vagrant | ||
website/.bundle | ||
website/build | ||
website/node_modules | ||
.vagrant/ | ||
*.backup | ||
.git | ||
.github | ||
./*.tfstate | ||
.terraform/ | ||
*.log | ||
*.bak | ||
*~ | ||
.*.swp | ||
.idea | ||
*.iml | ||
*.test | ||
*.iml |
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,5 @@ | ||
# Code of Conduct | ||
|
||
HashiCorp Community Guidelines apply to you when interacting with the community here on GitHub and contributing code. | ||
|
||
Please read the full text at https://www.hashicorp.com/community-guidelines |
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
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
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,91 @@ | ||
# 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: | ||
paths-ignore: | ||
- 'README.md' | ||
push: | ||
paths-ignore: | ||
- 'README.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 | ||
env: | ||
GOPRIVATE: github.com/Mirantis/mcc | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Setup MCC gitub repo private access | ||
run: git config --global url."https://${{ secrets.GH_MCC_USERNAME }}:${{ secrets.GH_MCC_ACCESS_TOKEN }}@github.com/".insteadOf "https://github.com/" | ||
|
||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
- run: go mod download | ||
- run: go build -v . | ||
- name: Run linters | ||
uses: golangci/[email protected] | ||
with: | ||
version: latest | ||
|
||
generate: | ||
runs-on: ubuntu-latest | ||
env: | ||
GOPRIVATE: github.com/Mirantis/mcc | ||
steps: | ||
- name: Setup MCC gitub repo private access | ||
run: git config --global url."https://${{ secrets.GH_MCC_USERNAME }}:${{ secrets.GH_MCC_ACCESS_TOKEN }}@github.com/".insteadOf "https://github.com/" | ||
|
||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
- run: go generate ./... | ||
- name: git diff | ||
run: | | ||
git diff --compact-summary --exit-code || \ | ||
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate ./...' command 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 | ||
env: | ||
GOPRIVATE: github.com/Mirantis/mcc | ||
timeout-minutes: 15 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# list whatever Terraform versions here you would like to support | ||
terraform: | ||
- '1.4.*' | ||
steps: | ||
- name: Setup MCC gitub repo private access | ||
run: git config --global url."https://${{ secrets.GH_MCC_USERNAME }}:${{ secrets.GH_MCC_ACCESS_TOKEN }}@github.com/".insteadOf "https://github.com/" | ||
|
||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
- uses: hashicorp/[email protected] | ||
with: | ||
terraform_version: ${{ matrix.terraform }} | ||
terraform_wrapper: false | ||
- run: go mod download | ||
- name: run acceptance unit tests | ||
run: TF_ACC=1 go test -v -cover ./internal/provider/ | ||
timeout-minutes: 10 |
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,3 +1,36 @@ | ||
# Go related ignores | ||
bin | ||
*.dll | ||
*.exe | ||
.DS_Store | ||
example.tf | ||
terraform.tfplan | ||
terraform.tfstate | ||
bin/ | ||
dist/ | ||
modules-dev/ | ||
/pkg/ | ||
vendor | ||
website/.vagrant | ||
website/.bundle | ||
website/build | ||
website/node_modules | ||
.vagrant/ | ||
*.backup | ||
./*.tfstate | ||
.terraform/ | ||
*.log | ||
*.bak | ||
*~ | ||
.*.swp | ||
.idea | ||
*.iml | ||
*.test | ||
*.iml | ||
|
||
website/vendor | ||
|
||
# Test exclusions | ||
!command/test-fixtures/**/*.tfstate | ||
!command/test-fixtures/**/.terraform/ | ||
|
||
# Keep windows files with windows line endings | ||
*.winfile eol=crlf |
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 @@ | ||
# Visit https://golangci-lint.run/ for usage documentation | ||
# and information on other useful linters | ||
issues: | ||
max-per-linter: 0 | ||
max-same-issues: 0 | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- durationcheck | ||
- errcheck | ||
- exportloopref | ||
- forcetypeassert | ||
- gofmt | ||
- gosimple | ||
- ineffassign | ||
- makezero | ||
- misspell | ||
- nilerr | ||
- predeclared | ||
- staticcheck | ||
- tenv | ||
- unconvert | ||
- unparam | ||
- unused | ||
- vet |
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,6 @@ | ||
## 0.1.0 (Unreleased) | ||
|
||
FEATURES: | ||
|
||
1. Initial mke config resource. | ||
|
Oops, something went wrong.