Skip to content

Commit 6356bb5

Browse files
committed
Add resource role, role_mapping, index_template and index_lifecycle_policy
1 parent e4a33aa commit 6356bb5

File tree

50 files changed

+2152
-4808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2152
-4808
lines changed

Makefile

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
TEST?=./...
2+
PKG_NAME=es
3+
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
4+
WEBSITE_REPO=github.com/hashicorp/terraform-website
5+
6+
default: build
7+
8+
build: fmtcheck
9+
go install
10+
11+
gen:
12+
rm -f aws/internal/keyvaluetags/*_gen.go
13+
go generate ./...
14+
15+
test: fmtcheck
16+
go test $(TEST) -timeout=30s -parallel=4
17+
18+
testacc: fmt fmtcheck
19+
TF_ACC=1 go test $(TEST) -v -count 1 -parallel 20 $(TESTARGS) -timeout 120m
20+
21+
fmt:
22+
@echo "==> Fixing source code with gofmt..."
23+
gofmt -s -w ./$(PKG_NAME)
24+
25+
# Currently required by tf-deploy compile
26+
fmtcheck:
27+
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
28+
29+
websitefmtcheck:
30+
@sh -c "'$(CURDIR)/scripts/websitefmtcheck.sh'"
31+
32+
lint:
33+
@echo "==> Checking source code against linters..."
34+
@golangci-lint run --no-config --deadline 5m --disable-all --enable staticcheck --exclude SA1019 --max-issues-per-linter 0 --max-same-issues 0 ./$(PKG_NAME)/...
35+
@golangci-lint run ./$(PKG_NAME)/...
36+
@tfproviderlint \
37+
-c 1 \
38+
-AT001 \
39+
-S001 \
40+
-S002 \
41+
-S003 \
42+
-S004 \
43+
-S005 \
44+
-S007 \
45+
-S008 \
46+
-S009 \
47+
-S010 \
48+
-S011 \
49+
-S012 \
50+
-S013 \
51+
-S014 \
52+
-S015 \
53+
-S016 \
54+
-S017 \
55+
-S019 \
56+
./$(PKG_NAME)
57+
58+
tools:
59+
GO111MODULE=on go install github.com/bflad/tfproviderlint/cmd/tfproviderlint
60+
GO111MODULE=on go install github.com/client9/misspell/cmd/misspell
61+
GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/golangci-lint
62+
63+
test-compile:
64+
@if [ "$(TEST)" = "./..." ]; then \
65+
echo "ERROR: Set TEST to a specific package. For example,"; \
66+
echo " make test-compile TEST=./$(PKG_NAME)"; \
67+
exit 1; \
68+
fi
69+
go test -c $(TEST) $(TESTARGS)
70+
71+
website:
72+
ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
73+
echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
74+
git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
75+
endif
76+
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
77+
78+
website-lint:
79+
@echo "==> Checking website against linters..."
80+
@misspell -error -source=text website/
81+
82+
website-test:
83+
ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
84+
echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
85+
git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
86+
endif
87+
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
88+
89+
.PHONY: build gen sweep test testacc fmt fmtcheck lint tools test-compile website website-lint website-test

data_source_elasticsearch_destination.go

Lines changed: 0 additions & 107 deletions
This file was deleted.

data_source_elasticsearch_destination_test.go

Lines changed: 0 additions & 67 deletions
This file was deleted.

diff_suppress_funcs.go

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)