Skip to content

Commit

Permalink
Merge pull request #1 from terraform-providers/master
Browse files Browse the repository at this point in the history
Merge latest version
  • Loading branch information
MacTynow authored Sep 2, 2019
2 parents ffad5b7 + d10eb9c commit 18b2213
Show file tree
Hide file tree
Showing 3,754 changed files with 739,984 additions and 149,908 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Question.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ so we recommend using our other community resources instead of asking here 👍.

If you have a support request or question please submit them to one of these resources:

* [Terraform community resources](https://www.terraform.io/docs/extend/community/index.html)
* [HashiCorp Community Forums](https://discuss.hashicorp.com/c/terraform-providers)
* [HashiCorp support](https://support.hashicorp.com) (Terraform Enterprise customers)
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ examples/**/test.tf
examples/**/test.tfvars
examples/**/terraform
examples/**/terraform.zip

#never upload the build to git
terraform-provider-azurerm
11 changes: 8 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
run:
deadline: 10m10s
modules-download-mode: vendor

issues:
max-per-linter: 0
max-same-issues: 0
Expand All @@ -8,6 +12,7 @@ linters:
- deadcode
- errcheck
- gofmt
- goimports
- gosimple
- govet
- ineffassign
Expand All @@ -26,6 +31,6 @@ linters:
linters-settings:
errcheck:
ignore: github.com/hashicorp/terraform/helper/schema:ForceNew|Set,fmt:.*,io:Close

run:
modules-download-mode: vendor
misspell:
ignore-words:
- hdinsight
26 changes: 26 additions & 0 deletions .hashibot.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
queued_behavior "release_commenter" "releases" {
repo_prefix = "terraform-provider-"

message = <<-EOF
This has been released in [version ${var.release_version} of the provider](${var.changelog_link}). Please see the [Terraform documentation on provider versioning](https://www.terraform.io/docs/configuration/providers.html#provider-versions) or reach out if you need any assistance upgrading. As an example:
```hcl
provider "${var.project_name}" {
version = "~> ${var.release_version}"
}
# ... other configuration ...
```
EOF
}

poll "closed_issue_locker" "locker" {
schedule = "0 50 14 * * *"
closed_for = "720h" # 30 days
max_issues = 500
sleep_between_issues = "5s"

message = <<-EOF
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!
EOF
}
39 changes: 22 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
dist: trusty
dist: xenial
sudo: required
services:
- docker
language: go
go:
- "1.11.x"

install:
# This script is used by the Travis build to install a cookie for
# go.googlesource.com so rate limits are higher when using `go get` to fetch
# packages that live there.
# See: https://github.com/golang/go/issues/12933
- bash scripts/gogetcookie.sh
- make tools

script:
- make test
- make lint
- make website-test
- "1.12.x"

branches:
only:
- master
- master

install:
# This script is used by the Travis build to install a cookie for
# go.googlesource.com so rate limits are higher when using `go get` to fetch
# packages that live there.
# See: https://github.com/golang/go/issues/12933
- bash scripts/gogetcookie.sh
- make tools

matrix:
fast_finish: true
allow_failures:
- go: tip
- go: tip
include:
- name: "make lint"
script: GOGC=20 make lint
- name: "make test"
script: make test
- name: "make website-lint"
script: make website-lint
- name: "make website-test"
script: make website-test
497 changes: 475 additions & 22 deletions CHANGELOG.md

Large diffs are not rendered by default.

50 changes: 27 additions & 23 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TEST?=$$(go list ./... |grep -v 'vendor')
TEST?=$$(go list ./... |grep -v 'vendor'|grep -v 'examples')
WEBSITE_REPO=github.com/hashicorp/terraform-website
PKG_NAME=azurerm

Expand All @@ -9,49 +9,43 @@ GOFLAGS=-mod=vendor

default: build

tools:
@echo "==> installing required tooling..."
@sh "$(CURDIR)/scripts/gogetcookie.sh"
GO111MODULE=off go get -u github.com/client9/misspell/cmd/misspell
GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint

build: fmtcheck
go install

build-docker:
mkdir -p bin
docker run --rm -v $$(pwd)/bin:/go/bin -v $$(pwd):/go/src/github.com/terraform-providers/terraform-provider-azurerm -w /go/src/github.com/terraform-providers/terraform-provider-azurerm -e GOOS golang:1.11 make build

test-docker:
docker run --rm -v $$(pwd):/go/src/github.com/terraform-providers/terraform-provider-azurerm -w /go/src/github.com/terraform-providers/terraform-provider-azurerm golang:1.11 make test

test: fmtcheck
go test -i $(TEST) || exit 1
echo $(TEST) | \
xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4

testacc: fmtcheck
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 180m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"

debugacc: fmtcheck
TF_ACC=1 dlv test $(TEST) --headless --listen=:2345 --api-version=2 -- -test.v $(TESTARGS)
docker run --rm -v $$(pwd)/bin:/go/bin -v $$(pwd):/go/src/github.com/terraform-providers/terraform-provider-azurerm -w /go/src/github.com/terraform-providers/terraform-provider-azurerm -e GOOS golang:1.12 make build

fmt:
@echo "==> Fixing source code with gofmt..."
# This logic should match the search logic in scripts/gofmtcheck.sh
gofmt -s -w `find . -name '*.go' | grep -v vendor`
find . -name '*.go' | grep -v vendor | xargs gofmt -s -w

# Currently required by tf-deploy compile
fmtcheck:
@sh "$(CURDIR)/scripts/gofmtcheck.sh"

goimport:
goimports:
@echo "==> Fixing imports code with goimports..."
goimports -w $(PKG_NAME)/

lint:
@echo "==> Checking source code against linters..."
golangci-lint run ./...

tools:
@echo "==> installing required tooling..."
@sh "$(CURDIR)/scripts/gogetcookie.sh"
GO111MODULE=off go get -u github.com/client9/misspell/cmd/misspell
GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
test-docker:
docker run --rm -v $$(pwd):/go/src/github.com/terraform-providers/terraform-provider-azurerm -w /go/src/github.com/terraform-providers/terraform-provider-azurerm golang:1.12 make test

test: fmtcheck
go test -i $(TEST) || exit 1
echo $(TEST) | \
xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4

test-compile:
@if [ "$(TEST)" = "./..." ]; then \
Expand All @@ -61,13 +55,23 @@ test-compile:
fi
go test -c $(TEST) $(TESTARGS)

testacc: fmtcheck
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 180m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"

debugacc: fmtcheck
TF_ACC=1 dlv test $(TEST) --headless --listen=:2345 --api-version=2 -- -test.v $(TESTARGS)

website:
ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
endif
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)

website-lint:
@echo "==> Checking website against linters..."
@misspell -error -source=text -i hdinsight website/

website-test:
ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ General Requirements
------------

- [Terraform](https://www.terraform.io/downloads.html) 0.10.x
- [Go](https://golang.org/doc/install) 1.11.x (to build the provider plugin)
- [Go](https://golang.org/doc/install) 1.12.x (to build the provider plugin)

Windows Specific Requirements
-----------------------------
Expand Down Expand Up @@ -74,7 +74,7 @@ Further [usage documentation is available on the Terraform website](https://www.
Developing the Provider
---------------------------

If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.11+ is *required*). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`.
If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.12+ is **required**). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`.

To compile the provider, run `make build`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.

Expand Down Expand Up @@ -106,6 +106,7 @@ The following Environment Variables must be set in your shell prior to running a
- `ARM_ENVIRONMENT`
- `ARM_TEST_LOCATION`
- `ARM_TEST_LOCATION_ALT`
- `ARM_TEST_LOCATION_ALT2`

**Note:** Acceptance tests create real resources in Azure which often cost money to run.

Expand Down
Loading

0 comments on commit 18b2213

Please sign in to comment.