-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: Updates examples & docs that use replicaSet clusters #2428
Changes from all commits
0e6a89f
f148ae7
6ea079e
28e4c82
47886df
c8fb713
2bffd43
837cf4f
5d918bf
164f644
3db3316
9976946
4cfb163
744f4c7
fce2f18
e53b7fa
945057e
f48f5b2
5c310e4
54a5751
87da7b7
f56d1c8
2401ec9
bb71c4a
c350caa
115180e
63c97b8
8ecaf0f
cf4327e
c5043a0
e27302a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "tflint-compact", | ||
"severity": "warning", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.+):(\\d+):(\\d+):\\s(Error|Warning|Notice)\\s-\\s(.+)\\s\\((.+)\\)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"severity": 4, | ||
"message": 5, | ||
"code": 6 | ||
} | ||
] | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,52 +15,27 @@ env: | |
jobs: | ||
tf-validate: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
terraform_version: ["${{vars.TF_VERSION_LATEST}}"] | ||
permissions: {} | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | ||
with: | ||
fetch-depth: 0 | ||
- run: echo "GO_VERSION=$(cat .go-version)" >> "${GITHUB_ENV}" | ||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: go build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. make it easier to run TF validate in local, so no magic is done in GH Actions and everything happens in the script |
||
run: go build -o terraform-plugin-dir/terraform-provider-mongodbatlas-dev_v99.99.99_x5 . | ||
- name: override plugin | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you clarify how the override of our provider is handled now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it uses the recommended way: https://developer.hashicorp.com/terraform/cli/config/config-file#development-overrides-for-provider-developers (i've also added the info in the PR description) |
||
run: | | ||
# For newer versions | ||
mkdir -p ~/.terraform.d/plugins/registry.terraform.io/hashicorp/mongodbatlas-dev/99.99.99/"$(go env GOOS)"_"$(go env GOARCH)"/ | ||
cp terraform-plugin-dir/terraform-provider-mongodbatlas-dev_v99.99.99_x5 ~/.terraform.d/plugins/registry.terraform.io/hashicorp/mongodbatlas-dev/99.99.99/"$(go env GOOS)"_"$(go env GOARCH)"/ | ||
- name: replace names of provider for local development | ||
run: grep --include=\*versions.tf -rnl './examples' -e 'source = "mongodb/mongodbatlas"' | xargs sed -i s@mongodb/mongodbatlas@hashicorp/mongodbatlas-dev@g | ||
- name: remove version of provider for local development | ||
run: grep --include=\*versions.tf -rnl './examples' -e 'version =' | xargs sed -i '/^\s*version =/d' | ||
- name: Fix format after substitutions | ||
run: grep --include=\*versions.tf -rnl './examples' -e 'source[[:space:]]\+=' | xargs sed -i 's@\(\([[:space:]]*\)source\)[[:space:]]\+=[[:space:]]*@\2source = @g' | ||
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 | ||
with: | ||
terraform_version: ${{ matrix.terraform_version }} | ||
# Needed to use the output of `terraform validate -json` | ||
terraform_version: ${{ vars.TF_VERSION_LATEST }} | ||
terraform_wrapper: false | ||
- name: tf-validate | ||
run: make tools tf-validate | ||
tflint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
terraform_version: ["${{vars.TF_VERSION_LATEST}}"] | ||
permissions: {} | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: tflint | ||
run: make tools tflint | ||
run: | | ||
echo "::add-matcher::.github/tflint-matcher.json" | ||
make tools tflint |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ terraform.tfplan | |
terraform.tfstate | ||
.terraform.lock.hcl | ||
bin/ | ||
bin-examples/ | ||
/pkg/ | ||
.vagrant/ | ||
*.backup | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to show TF linter errors in GH UI