Skip to content

Commit

Permalink
Merge branch 'master' into f-db-proxy-target
Browse files Browse the repository at this point in the history
  • Loading branch information
bflad authored Sep 30, 2020
2 parents e949906 + c7c4ea1 commit cef3556
Show file tree
Hide file tree
Showing 5,048 changed files with 61,009 additions and 2,384,192 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@

/aws/*_aws_sagemaker_*.go @DrFaust92 @terraform-providers/aws-provider
/website/**/sagemaker* @DrFaust92 @terraform-providers/aws-provider

/aws/*_aws_workspaces_*.go @Tensho @terraform-providers/aws-provider
/website/**/workspaces* @Tensho @terraform-providers/aws-provider
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ contact_links:
- name: Terraform Language or Workflow Questions
url: https://discuss.hashicorp.com/c/terraform-core
about: Please ask and answer language or workflow related questions through the Terraform Core Community Forum.
- name: Security Vulnerability
url: https://www.hashicorp.com/security.html
about: Please report security vulnerabilities responsibly.
4 changes: 4 additions & 0 deletions .github/labeler-needs-triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
needs-triage:
- '**'
- '.*'
- '.*/**'
72 changes: 68 additions & 4 deletions .github/workflows/acctest-terraform-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ on:
pull_request:
paths:
- .github/workflows/acctest-terraform-lint.yml
- aws/*_test.go
- aws/core_acceptance_test.go
- aws/data_source_aws_*_test.go
- aws/resource_aws_[a-s]*_test.go

env:
GO_VERSION: "1.14"
GO111MODULE: on
TFLINT_VERSION: "v0.19.0"
TFLINT_VERSION: "v0.20.1"

jobs:
terrafmt:
Expand All @@ -35,9 +37,39 @@ jobs:
go install
# - run: terrafmt diff ./aws --check --pattern '*_test.go' --quiet --fmtcompat
- run: |
find ./aws -type f -name 'resource_aws_a*_test.go' \
find ./aws -type f \( \
-name 'core_acceptance_test.go' \
-o -name 'data_source_aws_*_test.go' \
-o -name 'resource_aws_a*_test.go' \
-o -name 'resource_aws_b*_test.go' \
-o -name 'resource_aws_c*_test.go' \
-o -name 'resource_aws_d*_test.go' \
-o -name 'resource_aws_e*_test.go' \
-o -name 'resource_aws_f*_test.go' \
-o -name 'resource_aws_g*_test.go' \
-o -name 'resource_aws_h*_test.go' \
-o -name 'resource_aws_i*_test.go' \
-o -name 'resource_aws_j*_test.go' \
-o -name 'resource_aws_k*_test.go' \
-o -name 'resource_aws_l*_test.go' \
-o -name 'resource_aws_m*_test.go' \
-o -name 'resource_aws_n*_test.go' \
-o -name 'resource_aws_o*_test.go' \
-o -name 'resource_aws_p*_test.go' \
-o -name 'resource_aws_q*_test.go' \
-o -name 'resource_aws_r*_test.go' \
-o -name 'resource_aws_s*_test.go' \
\) \
| sort -u \
| grep -v resource_aws_apigatewayv2_domain_name_test.go \
| grep -v resource_aws_dynamodb_table_test.go \
| grep -v resource_aws_ecs_capacity_provider_test.go \
| grep -v resource_aws_efs_file_system_test.go \
| grep -v resource_aws_kinesis_stream_test.go \
| grep -v resource_aws_kms_grant_test.go \
| grep -v resource_aws_quicksight_user_test.go \
| grep -v resource_aws_s3_bucket_object_test.go \
| grep -v resource_aws_sns_platform_application_test.go \
| xargs -I {} terrafmt diff --check --quiet --fmtcompat {}
validate-terraform:
Expand All @@ -60,8 +92,40 @@ jobs:
go install
- run: curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | sh
- run: |
find ./aws -type f -name 'resource_aws_a*_test.go' \
find ./aws -type f \( \
-name 'core_acceptance_test.go' \
-o -name 'data_source_aws_*_test.go' \
-o -name 'resource_aws_a*_test.go' \
-o -name 'resource_aws_b*_test.go' \
-o -name 'resource_aws_c*_test.go' \
-o -name 'resource_aws_d*_test.go' \
-o -name 'resource_aws_e*_test.go' \
-o -name 'resource_aws_f*_test.go' \
-o -name 'resource_aws_g*_test.go' \
-o -name 'resource_aws_h*_test.go' \
-o -name 'resource_aws_i*_test.go' \
-o -name 'resource_aws_j*_test.go' \
-o -name 'resource_aws_k*_test.go' \
-o -name 'resource_aws_l*_test.go' \
-o -name 'resource_aws_m*_test.go' \
-o -name 'resource_aws_n*_test.go' \
-o -name 'resource_aws_o*_test.go' \
-o -name 'resource_aws_p*_test.go' \
-o -name 'resource_aws_q*_test.go' \
-o -name 'resource_aws_r*_test.go' \
-o -name 'resource_aws_s*_test.go' \
\) \
| sort -u \
| grep -v resource_aws_apigatewayv2_domain_name_test.go \
| grep -v resource_aws_dynamodb_table_test.go \
| grep -v resource_aws_ecs_capacity_provider_test.go \
| grep -v resource_aws_efs_file_system_test.go \
| grep -v resource_aws_elasticache_cluster_test.go \
| grep -v resource_aws_kinesis_stream_test.go \
| grep -v resource_aws_kms_grant_test.go \
| grep -v resource_aws_lambda_permission_test.go \
| grep -v resource_aws_quicksight_user_test.go \
| grep -v resource_aws_s3_bucket_object_test.go \
| grep -v resource_aws_sns_platform_application_test.go \
| ./scripts/validate-terraform.sh
37 changes: 30 additions & 7 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,53 @@ on:
pull_request:
paths:
- CHANGELOG.md
pull_request_target:

env:
GO_VERSION: "1.14"
GO111MODULE: on

jobs:
changes:
if: github.event_name == 'pull_request_target' && !contains(fromJSON('["anGie44", "bflad", "breathingdust", "gdavison", "maryelizbeth", "YakDriver"]'), github.actor)
name: Filter Changes
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.filter.outputs.changed }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
changed:
- CHANGELOG.md
comment:
if: github.event_name == 'pull_request' && !contains(fromJSON('["bflad", "breathingdust", "ewbankkit", "gdavison", "maryelizbeth"]'), github.actor)
needs: changes
if: ${{ needs.changes.outputs.changed == 'true' }}
name: Comment
runs-on: ubuntu-latest
steps:
- name: Find Existing PR Comment
id: prc
uses: peter-evans/find-comment@v1
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: "Please note that the `CHANGELOG.md` file contents are handled by the maintainers during merge"
- run: echo ${{ steps.prc.outputs.comment-id }}
- name: PR Comment
uses: unsplash/comment-on-pr@v1.2.0
if: ${{ steps.prc.outputs.comment-id == '' }}
uses: peter-evans/create-or-update-comment@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: |-
issue-number: ${{ github.event.pull_request.number }}
body: |-
Thank you for your contribution! :rocket:
Please note that the `CHANGELOG.md` file contents are handled by the maintainers during merge. This is to prevent pull request merge conflicts, especially for contributions which may not be merged immediately. Please see the [Contributing Guide](https://github.com/terraform-providers/terraform-provider-aws/blob/master/.github/CONTRIBUTING.md) for additional pull request review items.
Please note that the `CHANGELOG.md` file contents are handled by the maintainers during merge. This is to prevent pull request merge conflicts, especially for contributions which may not be merged immediately. Please see the [Contributing Guide](https://github.com/terraform-providers/terraform-provider-aws/blob/master/docs/CONTRIBUTING.md) for additional pull request review items.
Remove any changes to the `CHANGELOG.md` file and commit them in this pull request to prevent delays with reviewing and potentially merging this pull request.
- name: Fail the check
run: exit 1
misspell:
runs-on: ubuntu-latest
steps:
Expand All @@ -44,5 +67,5 @@ jobs:
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: go install github.com/client9/misspell/cmd/misspell
- run: cd tools && go install github.com/client9/misspell/cmd/misspell
- run: misspell -error -source text CHANGELOG.md
46 changes: 31 additions & 15 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,52 @@ on:
branches:
- master
- 'release/**'
pull_request:
paths:
- awsproviderlint/** # go/analysis/analysistest requires vendoring
- go.mod
- go.sum
- vendor/**
pull_request_target:

env:
GO_VERSION: "1.14"

jobs:
changes:
if: github.event_name == 'pull_request_target' && !contains(fromJSON('["anGie44", "bflad", "breathingdust", "DrFaust92", "ewbankkit", "gdavison", "maryelizbeth", "YakDriver", "renovate[bot]"]'), github.actor)
name: Filter Changes
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.filter.outputs.changed }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
changed:
- awsproviderlint/**
- go.mod
- go.sum
comment:
if: github.event_name == 'pull_request' && !contains(fromJSON('["anGie44", "bflad", "breathingdust", "DrFaust92", "ewbankkit", "gdavison", "maryelizbeth", "YakDriver", "renovate[bot]"]'), github.actor)
needs: changes
if: ${{ needs.changes.outputs.changed == 'true' }}
name: Comment
runs-on: ubuntu-latest
steps:
- name: Find Existing PR Comment
id: prc
uses: peter-evans/find-comment@v1
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: "Please note that typically Go dependency changes"
- run: echo ${{ steps.prc.outputs.comment-id }}
- name: PR Comment
uses: unsplash/comment-on-pr@v1.2.0
if: ${{ steps.prc.outputs.comment-id == '' }}
uses: peter-evans/create-or-update-comment@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
check_duplicate_msg: true
msg: |-
issue-number: ${{ github.event.pull_request.number }}
body: |-
Thank you for your contribution! :rocket:
Please note that typically Go dependency changes are handled in this repository by Renovate Bot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the `go.mod`, `go.sum`, and `vendor/` files and commit them into this pull request.
Please note that typically Go dependency changes are handled in this repository by Renovate Bot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the `go.mod` or `go.sum` files and commit them into this pull request.
Additional details:
Expand All @@ -53,7 +73,3 @@ jobs:
go mod tidy
git diff --exit-code -- go.mod go.sum || \
(echo; echo "Unexpected difference in go.mod/go.sum files. Run 'go mod tidy' command or revert any go.mod/go.sum changes and commit."; exit 1)
echo "==> Checking source code with go mod vendor..."
go mod vendor
git diff --compact-summary --exit-code -- vendor || \
(echo; echo "Unexpected difference in vendor/ directory. Run 'go mod vendor' command or revert any go.mod/go.sum/vendor changes and commit."; exit 1)
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ jobs:
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: go install github.com/client9/misspell/cmd/misspell
- run: cd tools && go install github.com/client9/misspell/cmd/misspell
- run: misspell -error -source text docs/
15 changes: 15 additions & 0 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on:
- pull_request_target

name: Pull Request Triage
jobs:
NeedsTriageLabeler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Apply needs-triage Label
uses: actions/labeler@v2
if: github.event.action == 'opened' && !contains(fromJSON('["anGie44", "bflad", "breathingdust", "DrFaust92", "ewbankkit", "gdavison", "maryelizbeth", "YakDriver"]'), github.actor)
with:
configuration-path: .github/labeler-needs-triage.yml
repo-token: ${{ secrets.GITHUB_TOKEN }}
19 changes: 15 additions & 4 deletions .github/workflows/terraform_provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- .github/workflows/terraform_provider.yml
- .golangci.yml
- .goreleaser.yml
- .semgrep.yml
- aws/**
- awsproviderlint/**
- docs/index.md
Expand All @@ -20,6 +21,7 @@ on:
- GNUmakefile
- main.go
- staticcheck.conf
- tools/**
- website/**

env:
Expand Down Expand Up @@ -141,7 +143,7 @@ jobs:
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: go install ./awsproviderlint
- run: cd awsproviderlint && go install .
- name: awsproviderlint
run: make awsproviderlint

Expand Down Expand Up @@ -224,9 +226,9 @@ jobs:
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: go install github.com/golangci/golangci-lint/cmd/golangci-lint
- run: cd tools && go install github.com/golangci/golangci-lint/cmd/golangci-lint
- run: golangci-lint run ./aws/...
- run: golangci-lint run ./awsproviderlint/...
- run: cd awsproviderlint && golangci-lint run ./...

goreleaser:
needs: [go_mod_download]
Expand All @@ -252,6 +254,15 @@ jobs:
with:
args: build --snapshot --timeout 1h

semgrep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: semgrep
uses: returntocorp/semgrep-action@v1

tfproviderdocs:
needs: [terraform_providers_schema]
runs-on: ubuntu-latest
Expand All @@ -266,7 +277,7 @@ jobs:
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: go install github.com/bflad/tfproviderdocs
- run: cd tools && go install github.com/bflad/tfproviderdocs
- uses: actions/cache@v2
timeout-minutes: 2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: go install github.com/client9/misspell/cmd/misspell
- run: cd tools && go install github.com/client9/misspell/cmd/misspell
- run: misspell -error -source text website/
terrafmt:
runs-on: ubuntu-latest
Expand All @@ -76,7 +76,7 @@ jobs:
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: go install github.com/katbyte/terrafmt
- run: cd tools && go install github.com/katbyte/terrafmt
- run: terrafmt diff ./website --check --pattern '*.markdown' --quiet
validate-terraform:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ website/node_modules
*.iml
log.txt
markdown-link-check*.txt
website/vendor

# Test exclusions
!command/test-fixtures/**/*.tfstate
Expand Down
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ linters-settings:
ignore: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set,fmt:.*,io:Close

run:
modules-download-mode: vendor
timeout: 10m
Loading

0 comments on commit cef3556

Please sign in to comment.