Skip to content

Commit f654ee5

Browse files
committed
Merge branch 'main' of github.com:Moon1706/terraform-provider-gitlab into main
2 parents e919cdb + fdde2f2 commit f654ee5

File tree

110 files changed

+752
-436
lines changed

Some content is hidden

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

110 files changed

+752
-436
lines changed

.github/workflows/issue-opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
# This prevents the needs-triage label from being added.
2626
- uses: actions/checkout@v3
2727
if: ${{ failure() }}
28-
- uses: github/issue-labeler@v2.4
28+
- uses: github/issue-labeler@v2.5
2929
if: ${{ failure() }}
3030
with:
3131
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/pr-lint.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
matrix:
2929
target:
3030
- lint-golangci
31-
- lint-tfprovider
3231
- lint-examples-tf
3332
- lint-examples-sh
3433
- lint-generated

.github/workflows/push.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ jobs:
4040
matrix:
4141
target:
4242
- lint-golangci
43-
- lint-tfprovider
4443
- lint-examples-tf
4544
- lint-examples-sh
4645
- lint-generated

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.16
1+
1.17

.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ run:
44
timeout: 3m
55

66
linters-settings:
7+
custom:
8+
tfproviderlint:
9+
path: ./bin/tfproviderlint-plugin.so
10+
description: "Terraform Provider Lint Tool"
11+
original-url: https://github.com/bflad/tfproviderlint
712
errcheck:
813
exclude: errcheck_excludes.txt
914

1015
linters:
1116
enable:
1217
- gofmt
1318
- govet
19+
- tfproviderlint

.vscode/settings.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"go.testEnvVars": {
3-
"TF_ACC": "1",
4-
"GITLAB_TOKEN": "ACCTEST1234567890123",
5-
"GITLAB_BASE_URL": "http://127.0.0.1:8080"
6-
},
7-
"go.testFlags": ["-count=1", "-v", "-timeout=30m"]
2+
"go.testEnvVars": {
3+
"TF_ACC": "1",
4+
"GITLAB_TOKEN": "ACCTEST1234567890123",
5+
"GITLAB_BASE_URL": "http://127.0.0.1:8080"
6+
},
7+
"go.testFlags": ["-count=1", "-v", "-tags=acceptance", "-tags=acceptance"]
88
}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Documentation in [/docs](/docs) is auto-generated by [terraform-plugin-docs](htt
6262

6363
### Set Up Your Local Environment
6464

65-
You'll first need [Go](http://www.golang.org) installed on your machine (version 1.16+ is *required*).
65+
You'll first need [Go](http://www.golang.org) installed on your machine (version 1.17+ is *required*).
6666

6767
1. Clone the git repository.
6868

GNUmakefile

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,14 @@ endif
2121
test: ## Run unit tests.
2222
go test $(TESTARGS) $(PROVIDER_SRC_DIR)
2323

24-
TFPROVIDERLINTX_CHECKS = -XAT001=false -XR003=false -XS002=false
25-
26-
fmt: tool-golangci-lint tool-tfproviderlintx tool-terraform tool-shfmt ## Format files and fix issues.
24+
fmt: tool-golangci-lint tool-terraform tool-shfmt tfproviderlint-plugin ## Format files and fix issues.
2725
gofmt -w -s .
28-
$(GOBIN)/golangci-lint run --fix
29-
$(GOBIN)/tfproviderlintx $(TFPROVIDERLINTX_CHECKS) --fix ./...
26+
$(GOBIN)/golangci-lint run --build-tags acceptance --fix
3027
$(GOBIN)/terraform fmt -recursive -list ./examples
3128
$(GOBIN)/shfmt -l -s -w ./examples
3229

33-
lint-golangci: tool-golangci-lint ## Run golangci-lint linter (same as fmt but without modifying files).
34-
$(GOBIN)/golangci-lint run
35-
36-
lint-tfprovider: tool-tfproviderlintx ## Run tfproviderlintx linter (same as fmt but without modifying files).
37-
$(GOBIN)/tfproviderlintx $(TFPROVIDERLINTX_CHECKS) ./...
30+
lint-golangci: tool-golangci-lint tfproviderlint-plugin ## Run golangci-lint linter (same as fmt but without modifying files).
31+
$(GOBIN)/golangci-lint run --build-tags acceptance
3832

3933
lint-examples-tf: tool-terraform ## Run terraform linter on examples (same as fmt but without modifying files).
4034
$(GOBIN)/terraform fmt -recursive -check ./examples
@@ -73,7 +67,7 @@ testacc-down: ## Teardown a GitLab instance.
7367
docker-compose down --volumes
7468

7569
testacc: ## Run acceptance tests against a GitLab instance.
76-
TF_ACC=1 GITLAB_TOKEN=$(GITLAB_TOKEN) GITLAB_BASE_URL=$(GITLAB_BASE_URL) go test -v $(PROVIDER_SRC_DIR) $(TESTARGS) -timeout 40m
70+
TF_ACC=1 GITLAB_TOKEN=$(GITLAB_TOKEN) GITLAB_BASE_URL=$(GITLAB_BASE_URL) go test --tags acceptance -v $(PROVIDER_SRC_DIR) $(TESTARGS) -timeout 40m
7771

7872
certs: ## Generate certs for the GitLab container registry
7973
mkdir -p certs
@@ -85,9 +79,6 @@ certs: ## Generate certs for the GitLab container registry
8579
tool-golangci-lint:
8680
@$(call install-tool, github.com/golangci/golangci-lint/cmd/golangci-lint)
8781

88-
tool-tfproviderlintx:
89-
@$(call install-tool, github.com/bflad/tfproviderlint/cmd/tfproviderlintx)
90-
9182
tool-tfplugindocs:
9283
@$(call install-tool, github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs)
9384

@@ -110,4 +101,7 @@ tool-terraform:
110101
@[ -f $(GOBIN)/terraform ] || { mkdir -p tmp; cd tmp; rm -rf terraform; git clone --branch $(TERRAFORM_VERSION) --depth 1 https://github.com/hashicorp/terraform.git; cd terraform; GOBIN=$(GOBIN) go install; cd ..; rm -rf terraform; }
111102

112103
clean: testacc-down
113-
@rm -rf certs/
104+
@rm -rf certs/
105+
106+
tfproviderlint-plugin:
107+
@cd tools && go build -buildmode=plugin -o $(GOBIN)/tfproviderlint-plugin.so ./cmd/tfproviderlint-plugin

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@ GitLab resources, like users, groups and projects.
1717
## Contributing
1818

1919
Check out the [CONTRIBUTING.md](/CONTRIBUTING.md) guide for tips on how to contribute and develop the provider.
20+
21+
## Community
22+
23+
You are welcome to join our [Discord Server](https://discord.gg/CCc6Pe5EYy) or the monthly community hours:
24+
25+
- [Google Calendar signup](https://calendar.google.com/event?action=TEMPLATE&tmeid=MnZyN2owdmYxaDdiMWdjNGdoMzQ3bWM0dDlfMjAyMjA0MjdUMTQzMDAwWiBjXzh0bjczaDNjYW5mam1zY2pwamJqNjFpNDVrQGc&tmsrc=c_8tn73h3canfjmscjpjbj61i45k%40group.calendar.google.com&scp=ALL )
26+
- [Recordings](https://www.youtube.com/playlist?list=PL05JrBw4t0KrMncKb6v9S0wB_liBky39P)
27+
- [Notes](https://docs.google.com/document/d/1-rgmylTUlO2lPRmbmGk0aB-mktg8nYu0NxOkFw9bo_M/edit#)

docs/data-sources/group_variable.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,21 @@ The `gitlab_group_variable` data source allows to retrieve details about a group
1313

1414
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html)
1515

16-
16+
## Example Usage
17+
18+
```terraform
19+
data "gitlab_group_variable" "foo" {
20+
group = "my/example/group"
21+
key = "foo"
22+
}
23+
24+
# Using an environment scope
25+
data "gitlab_group_variable" "bar" {
26+
group = "my/example/group"
27+
key = "bar"
28+
environment_scope = "staging/*"
29+
}
30+
```
1731

1832
<!-- schema generated by tfplugindocs -->
1933
## Schema

0 commit comments

Comments
 (0)