Skip to content
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

feat: Updates to Go 1.21.3 #1550

Merged
merged 9 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/code-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jobs:
- name: golangci-lint
uses: golangci/[email protected]
with:
version: v1.52.2
args: --timeout 9m0s
version: v1.55.0
args: --timeout 10m
website-lint:
runs-on: ubuntu-latest
steps:
Expand Down
39 changes: 31 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,34 @@ linters-settings:
maligned:
suggest-new: true
depguard:
lantoli marked this conversation as resolved.
Show resolved Hide resolved
list-type: blacklist
packages:
# logging is allowed only by logutils.Log, logrus
# is allowed to use only in logutils package
- github.com/sirupsen/logrus
rules:
main:
files:
- $all
- "!$test"
allow:
- $gostd
- github.com/mongodb
- github.com/hashicorp
- github.com/aws
- github.com/spf13/cast
- github.com/mwielbut/pointy
- github.com/zclconf/go-cty/cty
- github.com/go-test/deep
deny:
- pkg: "github.com/sirupsen/logrus"
desc: logging is allowed only by logutils.Log, logrus is allowed to use only in logutils package
test:
files:
- $test
allow:
- $gostd
- github.com/mongodb
- github.com/hashicorp
- github.com/spf13/cast
- github.com/mwielbut/pointy
- github.com/go-test/deep
- github.com/gruntwork-io/terratest/modules
misspell:
locale: US
ignore-words:
Expand All @@ -72,7 +95,7 @@ linters-settings:
settings:
mnd:
# don't include the "operation" and "assign"
checks: [case,return]
checks: [case, return]
funlen:
lines: 360
statements: 120
Expand Down Expand Up @@ -137,10 +160,10 @@ issues:

# Exclude some staticcheck messages
- linters:
- staticcheck
- staticcheck
text: "SA1019:" # d.GetOkExists is deprecated: usage is discouraged due to undefined behaviors and may be removed in a future version of the SDK
- linters:
- gocritic
- gocritic
text: "^hugeParam: req is heavy"

run:
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
golang 1.20
golang 1.21.3
181 changes: 107 additions & 74 deletions CONTRIBUTING.md
lantoli marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GITTAG=$(shell git describe --always --tags)
VERSION=$(GITTAG:v%=%)
LINKER_FLAGS=-s -w -X 'github.com/mongodb/terraform-provider-mongodbatlas/version.ProviderVersion=${VERSION}'

GOLANGCI_VERSION=v1.52.2
GOLANGCI_VERSION=v1.55.0

export PATH := $(shell go env GOPATH)/bin:$(PATH)
export SHELL := env PATH=$(PATH) /bin/bash
Expand Down Expand Up @@ -78,7 +78,7 @@ lint:
tools: ## Install dev tools
@echo "==> Installing dependencies..."
go install github.com/client9/misspell/cmd/misspell@latest
go install github.com/terraform-linters/tflint@v0.46.1
go install github.com/terraform-linters/tflint@v0.48.0
go install github.com/rhysd/actionlint/cmd/actionlint@latest
go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin $(GOLANGCI_VERSION)
Expand Down
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# MongoDB Atlas Provider

[![Code Health](https://github.com/mongodb/terraform-provider-mongodbatlas/actions/workflows/code-health.yml/badge.svg)](https://github.com/mongodb/terraform-provider-mongodbatlas/actions/workflows/code-health.yml)
[![Acceptance Tests](https://github.com/mongodb/terraform-provider-mongodbatlas/actions/workflows/acceptance-tests.yml/badge.svg)](https://github.com/mongodb/terraform-provider-mongodbatlas/actions/workflows/acceptance-tests.yml)


This is the repository for the Terraform MongoDB Atlas Provider, which allows one to use Terraform with MongoDB's Database as a Service offering, Atlas.
Learn more about Atlas at [https://www.mongodb.com/cloud/atlas](https://www.mongodb.com/cloud/atlas)

Expand All @@ -14,11 +14,12 @@ Support for the Terraform MongoDB Atlas Provider is provided under MongoDB Atlas

Bugs should be filed under the Issues section of this repo.

Feature requests can be submitted at https://feedback.mongodb.com/forums/924145-atlas - just select the Terraform plugin as the category or vote for an already suggested feature.
Feature requests can be submitted at <https://feedback.mongodb.com/forums/924145-atlas> - just select the Terraform plugin as the category or vote for an already suggested feature.

## Requirements

- [Terraform](https://www.terraform.io/downloads.html) 1.0+
- [Go](https://golang.org/doc/install) 1.20 (to build the provider plugin)
- [Go](https://golang.org/doc/install) 1.21.3 (to build the provider plugin)

## Using the Provider

Expand All @@ -27,20 +28,23 @@ To use a released provider in your Terraform environment, run [`terraform init`]
Documentation about the provider specific configuration options can be found on the [provider's website](https://www.terraform.io/docs/providers/).

## Beta Features
In order to use and/or test beta resources and datasources in this provider you'll need to set the environment variable `MONGODB_ATLAS_ENABLE_BETA` to true.

In order to use and/or test beta resources and datasources in this provider you'll need to set the environment variable `MONGODB_ATLAS_ENABLE_BETA` to true.

```bash
export MONGODB_ATLAS_ENABLE_BETA = true
```

## Logs
To help with issues, you can turn on Logs with `export TF_LOG=TRACE`. Note: this is very noisy.

To export logs to file, you can use `export TF_LOG_PATH=terraform.log`
To help with issues, you can turn on Logs with `export TF_LOG=TRACE`. Note: this is very noisy.

To export logs to file, you can use `export TF_LOG_PATH=terraform.log`

## Supported OS and Architectures

As per [HashiCorp's recommendations](https://developer.hashicorp.com/terraform/registry/providers/os-arch), we fully support the following operating system / architecture combinations:

- Darwin / AMD64
- Darwin / ARMv8
- Linux / AMD64
Expand All @@ -49,16 +53,18 @@ As per [HashiCorp's recommendations](https://developer.hashicorp.com/terraform/r
- Windows / AMD64

We ship binaries but do not prioritize fixes for the following operating system / architecture combinations:

- Linux / 386
- Windows / 386
- FreeBSD / 386
- FreeBSD / AMD64


## Troubleshooting

See [Troubleshooting](website/docs/troubleshooting.html.markdown).

## Developing the Provider

See [CONTRIBUTING.md](./CONTRIBUTING.md).

## Autoclose stale issues and PRs
Expand Down
15 changes: 8 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/mongodb/terraform-provider-mongodbatlas

go 1.20
go 1.21.3
lantoli marked this conversation as resolved.
Show resolved Hide resolved

require (
github.com/aws/aws-sdk-go v1.46.0
Expand Down Expand Up @@ -34,7 +34,7 @@ require (
cloud.google.com/go/compute v1.19.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.13.0 // indirect
cloud.google.com/go/storage v1.28.1 // indirect
cloud.google.com/go/storage v1.29.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.1 // indirect
Expand All @@ -44,7 +44,7 @@ require (
github.com/armon/go-radix v1.0.0 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
github.com/boombuler/barcode v1.0.1 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand Down Expand Up @@ -78,6 +78,7 @@ require (
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.19.0 // indirect
github.com/hashicorp/terraform-json v0.17.1 // indirect
Expand All @@ -93,7 +94,7 @@ require (
github.com/klauspost/compress v1.15.11 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 // indirect
github.com/mitchellh/cli v1.1.5 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
Expand All @@ -112,9 +113,9 @@ require (
github.com/pquerna/otp v1.3.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shopspring/decimal v1.2.0 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.1 // indirect
github.com/stretchr/testify v1.8.3 // indirect
github.com/tmccombs/hcl2json v0.3.3 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/urfave/cli v1.22.2 // indirect
Expand All @@ -131,7 +132,7 @@ require (
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.114.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand Down
Loading
Loading