Compare commits
50 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
61a5e3c8a2 | ||
![]() |
a07bd291f5 | ||
![]() |
aa450c1855 | ||
![]() |
9a338d640c | ||
![]() |
4b114faecf | ||
![]() |
fb56ad7c76 | ||
![]() |
b0585b00f1 | ||
![]() |
62e71e6fac | ||
![]() |
9101616d60 | ||
![]() |
95d0747839 | ||
![]() |
f55b8617d1 | ||
![]() |
15348d755a | ||
![]() |
c5a6da0a3d | ||
![]() |
cf8eb21ca4 | ||
![]() |
278bd943b1 | ||
![]() |
71f11fe8b9 | ||
![]() |
153af2e0ac | ||
![]() |
7cbea02973 | ||
![]() |
6614cca9d4 | ||
![]() |
af1532648a | ||
![]() |
ea942f2d3b | ||
![]() |
7c16a693a8 | ||
![]() |
c4c1edc9bd | ||
![]() |
23c9273de5 | ||
![]() |
502034af9f | ||
![]() |
b472717098 | ||
![]() |
122ec8f817 | ||
![]() |
09dbfe7ee4 | ||
![]() |
71083f9d0a | ||
![]() |
167ce6ed80 | ||
![]() |
557ea2673a | ||
![]() |
0c0ab517c0 | ||
![]() |
683696a756 | ||
![]() |
f59aab3d1f | ||
![]() |
ea7db0ab14 | ||
![]() |
8bd169d2c7 | ||
![]() |
0efcdef0b9 | ||
![]() |
c9fec94bb3 | ||
![]() |
cdc2685623 | ||
![]() |
2c1b4fdc0d | ||
![]() |
9aabc45e0b | ||
![]() |
39b6dc1a2e | ||
![]() |
f947033ba4 | ||
![]() |
c8ee538674 | ||
![]() |
cc8760c9fd | ||
![]() |
107e741625 | ||
![]() |
acf6b121c9 | ||
![]() |
019f8a6446 | ||
![]() |
91172351d7 | ||
![]() |
d71bce3232 |
30
.gitea/workflows/test.yml
Normal file
30
.gitea/workflows/test.yml
Normal file
@ -0,0 +1,30 @@
|
||||
name: 'Setup Terraform'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
terraform-versions:
|
||||
name: 'Terraform Versions'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: hashicorp/setup-terraform@v3
|
||||
|
||||
- name: Terraform fmt
|
||||
id: fmt
|
||||
run: terraform fmt -check
|
||||
continue-on-error: true
|
||||
|
||||
- name: Terraform Init
|
||||
id: init
|
||||
run: terraform init
|
||||
working-directory: examples
|
||||
|
||||
- name: Terraform Validate
|
||||
id: validate
|
||||
run: terraform validate -no-color
|
||||
working-directory: examples
|
28
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
28
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to improve the provider
|
||||
title: ''
|
||||
labels: 'bug'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Log Output**
|
||||
If applicable, add logs to help explain your problem.
|
||||
|
||||
**Additional Data**
|
||||
Important for reproducability.
|
||||
|
||||
- Terraform Version
|
||||
|
||||
- Operating System
|
||||
|
||||
- Provider Version
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this provider
|
||||
title: ''
|
||||
labels: 'enhancement'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
44
.github/workflows/release.yml
vendored
Normal file
44
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
if: github.repository == 'go-gitea/terraform-provider-gitea'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
-
|
||||
name: Unshallow
|
||||
run: git fetch --prune --unshallow
|
||||
-
|
||||
name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: 'go.mod'
|
||||
cache: true
|
||||
-
|
||||
name: Import GPG key
|
||||
uses: crazy-max/ghaction-import-gpg@v6
|
||||
id: import_gpg
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.PASSPHRASE }}
|
||||
-
|
||||
name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
version: '~> v1'
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
||||
# GitHub sets this automatically
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
.vscode
|
||||
.idea/
|
||||
dist/
|
||||
tests/terraform.tfvars
|
||||
tests/.terraform
|
||||
tests/.terraform.lock.hcl
|
60
.goreleaser.yaml
Normal file
60
.goreleaser.yaml
Normal file
@ -0,0 +1,60 @@
|
||||
# Visit https://goreleaser.com for documentation on how to customize this
|
||||
# behavior.
|
||||
before:
|
||||
hooks:
|
||||
# this is just an example and not a requirement for provider building/publishing
|
||||
- go mod tidy
|
||||
builds:
|
||||
- env:
|
||||
# goreleaser does not work with CGO, it could also complicate
|
||||
# usage by users in CI/CD systems like Terraform Cloud where
|
||||
# they are unable to install libraries.
|
||||
- CGO_ENABLED=0
|
||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
|
||||
goos:
|
||||
- freebsd
|
||||
- windows
|
||||
- linux
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- '386'
|
||||
- arm
|
||||
- arm64
|
||||
ignore:
|
||||
- goos: darwin
|
||||
goarch: '386'
|
||||
binary: '{{ .ProjectName }}_v{{ .Version }}'
|
||||
archives:
|
||||
- format: zip
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
|
||||
checksum:
|
||||
extra_files:
|
||||
- glob: 'terraform-registry-manifest.json'
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
|
||||
algorithm: sha256
|
||||
signs:
|
||||
- artifacts: checksum
|
||||
args:
|
||||
# if you are using this in a GitHub action or some other automated pipeline, you
|
||||
# need to pass the batch flag to indicate its not interactive.
|
||||
- "--batch"
|
||||
- "--local-user"
|
||||
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
|
||||
- "--output"
|
||||
- "${signature}"
|
||||
- "--detach-sign"
|
||||
- "${artifact}"
|
||||
release:
|
||||
extra_files:
|
||||
- glob: 'terraform-registry-manifest.json'
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
|
||||
# If you want to manually examine the release before its live, uncomment this line:
|
||||
# draft: true
|
||||
changelog:
|
||||
skip: true
|
23
LICENSE
Normal file
23
LICENSE
Normal file
@ -0,0 +1,23 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2022 lerentis, https://git.uploadfilter24.eu/lerentis
|
||||
Copyright (c) 2022 The Gitea Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
17
Makefile
17
Makefile
@ -1,9 +1,10 @@
|
||||
TEST?=./gitea
|
||||
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
|
||||
|
||||
GOFMT ?= gofmt -s
|
||||
ARCH?=$$(uname -m | sed 's/x86_64/amd64/g')
|
||||
KERNEL?=$$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
VERSION = 0.6.1
|
||||
VERSION = 0.2.0
|
||||
|
||||
test: fmt-check
|
||||
go test -i $(TEST) || exit 1
|
||||
@ -31,11 +32,11 @@ fmt-check:
|
||||
exit 1; \
|
||||
fi;
|
||||
build:
|
||||
go build -o terraform-provider-gitea_${VERSION}
|
||||
go build -ldflags="-X 'main.Version=${VERSION}'" -o terraform-provider-gitea_${VERSION}
|
||||
doc:
|
||||
tfplugindocs
|
||||
install: build
|
||||
@echo installing to
|
||||
@echo ~/.terraform.d/plugins/terraform.local/local/gitea/${VERSION}/linux_amd64/terraform-provider-gitea_${VERSION}
|
||||
@mkdir -p ~/.terraform.d/plugins/terraform.local/local/gitea/${VERSION}/linux_amd64
|
||||
@mv terraform-provider-gitea_${VERSION} ~/.terraform.d/plugins/terraform.local/local/gitea/${VERSION}/linux_amd64/terraform-provider-gitea_${VERSION}
|
||||
doc:
|
||||
tfplugindocs
|
||||
@echo ~/.terraform.d/plugins/terraform.local/go-gitea/gitea/${VERSION}/${KERNEL}_${ARCH}/terraform-provider-gitea_${VERSION}
|
||||
@mkdir -p ~/.terraform.d/plugins/terraform.local/go-gitea/gitea/${VERSION}/${KERNEL}_${ARCH}
|
||||
@mv terraform-provider-gitea_${VERSION} ~/.terraform.d/plugins/terraform.local/go-gitea/gitea/${VERSION}/${KERNEL}_${ARCH}/terraform-provider-gitea_${VERSION}
|
||||
|
70
README.md
70
README.md
@ -1,3 +1,73 @@
|
||||
# terraform-provider-gitea
|
||||
|
||||
Terraform Gitea Provider
|
||||
|
||||
This repo is mirrored from https://gitea.com/gitea/terraform-provider-gitea please send all issues and pull requests there.
|
||||
|
||||
## Usage
|
||||
|
||||
This is not a 1.0 release, so usage is subject to change!
|
||||
|
||||
```terraform
|
||||
terraform {
|
||||
required_providers {
|
||||
gitea = {
|
||||
source = "go-gitea/gitea"
|
||||
version = "0.3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "gitea" {
|
||||
base_url = var.gitea_url # optionally use GITEA_BASE_URL env var
|
||||
token = var.gitea_token # optionally use GITEA_TOKEN env var
|
||||
|
||||
# Username/Password authentication is mutally exclusive with token authentication
|
||||
# username = var.username # optionally use GITEA_USERNAME env var
|
||||
# password = var.password # optionally use GITEA_PASSWORD env var
|
||||
|
||||
# A file containing the ca certificate to use in case ssl certificate is not from a standard chain
|
||||
cacert_file = var.cacert_file
|
||||
|
||||
# If you are running a gitea instance with self signed TLS certificates
|
||||
# and you want to disable certificate validation you can deactivate it with this flag
|
||||
insecure = false
|
||||
}
|
||||
|
||||
resource "gitea_repository" "test" {
|
||||
username = "lerentis"
|
||||
name = "test"
|
||||
private = true
|
||||
issue_labels = "Default"
|
||||
license = "MIT"
|
||||
gitignores = "Go"
|
||||
}
|
||||
|
||||
resource "gitea_repository" "mirror" {
|
||||
username = "lerentis"
|
||||
name = "terraform-provider-gitea-mirror"
|
||||
description = "Mirror of Terraform Provider"
|
||||
mirror = true
|
||||
migration_clone_addresse = "https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git"
|
||||
migration_service = "gitea"
|
||||
migration_service_auth_token = var.gitea_mirror_token
|
||||
}
|
||||
|
||||
resource "gitea_org" "test_org" {
|
||||
name = "test-org"
|
||||
}
|
||||
|
||||
resource "gitea_repository" "org_repo" {
|
||||
username = gitea_org.test_org.name
|
||||
name = "org-test-repo"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||
|
||||
## History
|
||||
|
||||
This codebase was created at https://gitea.com/gitea/terraform-provider-gitea, was forked by @lerentis, and then their changes were merged back into the original repo. Thank you to everyone who contributed!
|
||||
|
@ -28,5 +28,3 @@ description: |-
|
||||
- `location` (String)
|
||||
- `visibility` (String)
|
||||
- `website` (String)
|
||||
|
||||
|
||||
|
@ -43,5 +43,3 @@ description: |-
|
||||
- `updated` (String)
|
||||
- `watchers` (Number)
|
||||
- `website` (String)
|
||||
|
||||
|
||||
|
@ -29,5 +29,3 @@ description: |-
|
||||
- `is_admin` (Boolean)
|
||||
- `language` (String)
|
||||
- `last_login` (String)
|
||||
|
||||
|
||||
|
@ -16,8 +16,8 @@ description: |-
|
||||
terraform {
|
||||
required_providers {
|
||||
gitea = {
|
||||
source = "gitea/gitea"
|
||||
version = "0.6.1"
|
||||
source = "go-gitea/gitea"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
59
docs/resources/fork.md
Normal file
59
docs/resources/fork.md
Normal file
@ -0,0 +1,59 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "gitea_fork Resource - terraform-provider-gitea"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
gitea_fork manages repository fork to the current user or an organisation
|
||||
Forking a repository to a dedicated user is currently unsupported
|
||||
Creating a fork using this resource without an organisation will create the fork in the executors name
|
||||
---
|
||||
|
||||
# gitea_fork (Resource)
|
||||
|
||||
`gitea_fork` manages repository fork to the current user or an organisation
|
||||
Forking a repository to a dedicated user is currently unsupported
|
||||
Creating a fork using this resource without an organisation will create the fork in the executors name
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "gitea_org" "org1" {
|
||||
name = "org1"
|
||||
}
|
||||
|
||||
resource "gitea_org" "org2" {
|
||||
name = "org2"
|
||||
}
|
||||
|
||||
resource "gitea_repository" "repo1_in_org1" {
|
||||
username = gitea_org.org1.name
|
||||
name = "repo1-in-org1"
|
||||
}
|
||||
|
||||
resource "gitea_fork" "user_fork_of_repo1_in_org1" {
|
||||
owner = gitea_org.org1.name
|
||||
repo = gitea_repository.repo1_in_org1.name
|
||||
}
|
||||
|
||||
resource "gitea_fork" "org2_fork_of_repo1_in_org1" {
|
||||
owner = gitea_org.org1.name
|
||||
repo = gitea_repository.repo1_in_org1.name
|
||||
organization = gitea_org.org2.name
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `owner` (String) The owner or owning organization of the repository to fork
|
||||
- `repo` (String) The name of the repository to fork
|
||||
|
||||
### Optional
|
||||
|
||||
- `organization` (String) The organization that owns the forked repo
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this resource.
|
53
docs/resources/git_hook.md
Normal file
53
docs/resources/git_hook.md
Normal file
@ -0,0 +1,53 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "gitea_git_hook Resource - terraform-provider-gitea"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
gitea_git_hook manages git hooks on a repository.
|
||||
import is currently not supported
|
||||
WARNING: using this resource requires to enable server side hookswhich are known to cause security issues https://github.com/go-gitea/gitea/pull/13058!
|
||||
if you want to procede, you need to enable server side hooks as stated here https://docs.gitea.io/en-us/config-cheat-sheet/#security-security
|
||||
---
|
||||
|
||||
# gitea_git_hook (Resource)
|
||||
|
||||
`gitea_git_hook` manages git hooks on a repository.
|
||||
import is currently not supported
|
||||
|
||||
WARNING: using this resource requires to enable server side hookswhich are known to cause [security issues](https://github.com/go-gitea/gitea/pull/13058)!
|
||||
|
||||
if you want to procede, you need to enable server side hooks as stated [here](https://docs.gitea.io/en-us/config-cheat-sheet/#security-security)
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "gitea_org" "test_org" {
|
||||
name = "test-org"
|
||||
}
|
||||
|
||||
resource "gitea_repository" "org_repo" {
|
||||
username = gitea_org.test_org.name
|
||||
name = "org-test-repo"
|
||||
}
|
||||
|
||||
resource "gitea_git_hook" "org_repo_post_receive" {
|
||||
name = "post-receive"
|
||||
user = gitea_org.test_org.name
|
||||
repo = gitea_repository.org_repo.name
|
||||
content = file("${path.module}/post-receive.sh")
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `content` (String) Content of the git hook
|
||||
- `name` (String) Name of the git hook to configure
|
||||
- `repo` (String) The repository that this hook belongs too.
|
||||
- `user` (String) The user (or organisation) owning the repo this hook belongs too
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this resource.
|
@ -20,10 +20,12 @@ Handling [gitea oauth application](https://docs.gitea.io/en-us/oauth2-provider/)
|
||||
- `name` (String) OAuth Application name
|
||||
- `redirect_uris` (Set of String) Accepted redirect URIs
|
||||
|
||||
### Optional
|
||||
|
||||
- `confidential_client` (Boolean) If set to false, it will be a public client (PKCE will be required)
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `client_id` (String) OAuth2 Application client id
|
||||
- `client_secret` (String, Sensitive) Oauth2 Application client secret
|
||||
- `id` (String) The ID of this resource.
|
||||
|
||||
|
||||
|
@ -46,5 +46,4 @@ resource "gitea_repository" "org_repo" {
|
||||
|
||||
- `avatar_url` (String)
|
||||
- `id` (String) The ID of this resource.
|
||||
|
||||
|
||||
- `repos` (List of String) List of all Repositories that are part of this organisation
|
||||
|
@ -48,5 +48,3 @@ resource "gitea_public_key" "test_user_key" {
|
||||
- `fingerprint` (String)
|
||||
- `id` (String) The ID of this resource.
|
||||
- `type` (String)
|
||||
|
||||
|
||||
|
@ -21,16 +21,8 @@ Repository migrations have some properties that are not available to regular rep
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "gitea_user" "test" {
|
||||
username = "test"
|
||||
login_name = "test"
|
||||
password = "Geheim1!"
|
||||
email = "test@user.dev"
|
||||
must_change_password = false
|
||||
}
|
||||
|
||||
resource "gitea_repository" "test" {
|
||||
username = resource.gitea_user.test.name
|
||||
username = "lerentis"
|
||||
name = "test"
|
||||
private = true
|
||||
issue_labels = "Default"
|
||||
@ -39,7 +31,7 @@ resource "gitea_repository" "test" {
|
||||
}
|
||||
|
||||
resource "gitea_repository" "mirror" {
|
||||
username = resource.gitea_user.test.name
|
||||
username = "lerentis"
|
||||
name = "terraform-provider-gitea-mirror"
|
||||
description = "Mirror of Terraform Provider"
|
||||
mirror = true
|
||||
@ -47,6 +39,16 @@ resource "gitea_repository" "mirror" {
|
||||
migration_service = "gitea"
|
||||
migration_service_auth_token = var.gitea_mirror_token
|
||||
}
|
||||
|
||||
resource "gitea_repository" "clone" {
|
||||
username = "lerentis"
|
||||
name = "terraform-provider-gitea-clone"
|
||||
description = "Clone of Terraform Provider"
|
||||
mirror = false
|
||||
migration_clone_address = "https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git"
|
||||
migration_service = "gitea"
|
||||
migration_service_auth_token = var.gitea_clone_token
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
@ -80,7 +82,8 @@ Need to exist in the gitea instance
|
||||
Need to exist in the gitea instance
|
||||
- `license` (String) The license under which the source code of this repository should be.
|
||||
Need to exist in the gitea instance
|
||||
- `migration_clone_addresse` (String)
|
||||
- `migration_clone_address` (String)
|
||||
- `migration_clone_addresse` (String) DEPRECATED in favor of `migration_clone_address`
|
||||
- `migration_issue_labels` (Boolean)
|
||||
- `migration_lfs` (Boolean)
|
||||
- `migration_lfs_endpoint` (String)
|
||||
@ -99,11 +102,12 @@ Need to exist in the gitea instance
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `clone_url` (String)
|
||||
- `created` (String)
|
||||
- `html_url` (String)
|
||||
- `id` (String) The ID of this resource.
|
||||
- `permission_admin` (Boolean)
|
||||
- `permission_pull` (Boolean)
|
||||
- `permission_push` (Boolean)
|
||||
- `ssh_url` (String)
|
||||
- `updated` (String)
|
||||
|
||||
|
||||
|
68
docs/resources/repository_branch_protection.md
Normal file
68
docs/resources/repository_branch_protection.md
Normal file
@ -0,0 +1,68 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "gitea_repository_branch_protection Resource - terraform-provider-gitea"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
This resource allows you to create and manage branch protections for repositories.
|
||||
---
|
||||
|
||||
# gitea_repository_branch_protection (Resource)
|
||||
|
||||
This resource allows you to create and manage branch protections for repositories.
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `name` (String) Repository name
|
||||
- `rule_name` (String) Protected Branch Name Pattern
|
||||
- `username` (String) User name or organization name
|
||||
|
||||
### Optional
|
||||
|
||||
- `approval_whitelist_teams` (List of String) Only reviews from allowlisted teams will count to the required
|
||||
approvals. Without approval allowlist, reviews from anyone with
|
||||
write access count to the required approvals.
|
||||
- `approval_whitelist_users` (List of String) Only reviews from allowlisted users will count to the required
|
||||
approvals. Without approval allowlist, reviews from anyone with
|
||||
write access count to the required approvals.
|
||||
- `block_merge_on_official_review_requests` (Boolean) Merging will not be possible when it has official
|
||||
review requests, even if there are enough approvals.
|
||||
- `block_merge_on_outdated_branch` (Boolean) Merging will not be possible when head branch is behind base branch.
|
||||
- `block_merge_on_rejected_reviews` (Boolean) Merging will not be possible when changes are
|
||||
requested by official reviewers, even if there are enough
|
||||
approvals.
|
||||
- `dismiss_stale_approvals` (Boolean) When new commits that change the content of the pull request
|
||||
are pushed to the branch, old approvals will be dismissed.
|
||||
- `enable_push` (Boolean) Anyone with write access will be allowed to push to this branch
|
||||
(but not force push), add a whitelist users or teams to limit
|
||||
access.
|
||||
- `merge_whitelist_teams` (List of String) Allow only allowlisted teams to merge pull requests into this branch.
|
||||
- `merge_whitelist_users` (List of String) Allow only allowlisted users to merge pull requests into this branch.
|
||||
- `protected_file_patterns` (String) Protected file patterns (separated using semicolon ';')
|
||||
- `push_whitelist_deploy_keys` (Boolean) Allow deploy keys with write access to push. Requires enable_push to be set to true.
|
||||
- `push_whitelist_teams` (List of String) Allowlisted teams for pushing. Requires enable_push to be set to true.
|
||||
- `push_whitelist_users` (List of String) Allowlisted users for pushing. Requires enable_push to be set to true.
|
||||
- `require_signed_commits` (Boolean) Reject pushes to this branch if they are unsigned or unverifiable.
|
||||
- `required_approvals` (Number) Allow only to merge pull request with enough positive reviews.
|
||||
- `status_check_patterns` (List of String) Enter patterns to specify which status checks must pass before
|
||||
branches can be merged into a branch that matches this rule.
|
||||
Each line specifies a pattern. Patterns cannot be empty.
|
||||
- `unprotected_file_patterns` (String) Unprotected file patterns (separated using semicolon ';')
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `created_at` (String) Webhook creation timestamp
|
||||
- `enable_approval_whitelist` (Boolean) True if a approval whitelist is used.
|
||||
- `enable_merge_whitelist` (Boolean) True if a merge whitelist is used.
|
||||
- `enable_push_whitelist` (Boolean) True if a push whitelist is used.
|
||||
- `enable_status_check` (Boolean) Require status checks to pass before merging. When enabled,
|
||||
commits must first be pushed to another branch, then merged
|
||||
or pushed directly to a branch that matches this rule after
|
||||
status checks have passed. If no contexts are matched, the
|
||||
last commit must be successful regardless of context
|
||||
- `id` (String) The ID of this resource.
|
||||
- `updated_at` (String) Webhook creation timestamp
|
61
docs/resources/repository_key.md
Normal file
61
docs/resources/repository_key.md
Normal file
@ -0,0 +1,61 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "gitea_repository_key Resource - terraform-provider-gitea"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
gitea_repository_key manages a deploy key for a single gitea_repository.
|
||||
Every key needs a unique name and unique key, i.e. no key can be added twice to the same repo
|
||||
---
|
||||
|
||||
# gitea_repository_key (Resource)
|
||||
|
||||
`gitea_repository_key` manages a deploy key for a single gitea_repository.
|
||||
|
||||
Every key needs a unique name and unique key, i.e. no key can be added twice to the same repo
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
terraform {
|
||||
required_providers {
|
||||
tls = {
|
||||
source = "hashicorp/tls"
|
||||
version = "4.0.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "tls_private_key" "example" {
|
||||
type = "RSA"
|
||||
rsa_bits = 4096
|
||||
}
|
||||
|
||||
resource "gitea_repository" "example" {
|
||||
name = "example"
|
||||
private = true
|
||||
}
|
||||
|
||||
resource "gitea_repository_key" "example" {
|
||||
repository = gitea_repository.example.id
|
||||
title = "Example Deploy Key"
|
||||
read_only = true
|
||||
key = tls_private_key.example.public_key_openssh
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `key` (String) Armored SSH key to add
|
||||
- `repository` (Number) The ID of the repository where the deploy key belongs to
|
||||
- `title` (String) Name of the deploy key
|
||||
|
||||
### Optional
|
||||
|
||||
- `read_only` (Boolean) Whether this key has read or read/write access
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this resource.
|
37
docs/resources/repository_webhook.md
Normal file
37
docs/resources/repository_webhook.md
Normal file
@ -0,0 +1,37 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "gitea_repository_webhook Resource - terraform-provider-gitea"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
This resource allows you to create and manage webhooks for repositories.
|
||||
---
|
||||
|
||||
# gitea_repository_webhook (Resource)
|
||||
|
||||
This resource allows you to create and manage webhooks for repositories.
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `active` (Boolean) Set webhook to active, e.g. `true`
|
||||
- `branch_filter` (String) Set branch filter on the webhook, e.g. `"*"`
|
||||
- `content_type` (String) The content type of the payload. It can be `json`, or `form`
|
||||
- `events` (List of String) A list of events that will trigger the webhool, e.g. `["push"]`
|
||||
- `name` (String) Repository name
|
||||
- `type` (String) Webhook type, e.g. `gitea`
|
||||
- `url` (String) Target URL of the webhook
|
||||
- `username` (String) User name or organization name
|
||||
|
||||
### Optional
|
||||
|
||||
- `authorization_header` (String) Webhook authorization header
|
||||
- `secret` (String) Webhook secret
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `created_at` (String) Webhook creation timestamp
|
||||
- `id` (String) The ID of this resource.
|
@ -34,6 +34,26 @@ resource "gitea_team" "test_team" {
|
||||
permission = "write"
|
||||
members = [gitea_user.test.username]
|
||||
}
|
||||
|
||||
|
||||
resource "gitea_repository" "test" {
|
||||
username = gitea_org.test_org.name
|
||||
name = "test"
|
||||
private = true
|
||||
issue_labels = "Default"
|
||||
license = "MIT"
|
||||
gitignores = "Go"
|
||||
}
|
||||
|
||||
resource "gitea_team" "test_team_restricted" {
|
||||
name = "Restricted Devs"
|
||||
organisation = gitea_org.test_org.name
|
||||
description = "Restricted Devs of Test Org"
|
||||
permission = "write"
|
||||
members = [gitea_user.test.username]
|
||||
include_all_repositories = false
|
||||
repositories = [gitea_repository.test.name]
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
@ -49,14 +69,12 @@ resource "gitea_team" "test_team" {
|
||||
- `can_create_repos` (Boolean) Flag if the Teams members should be able to create Rpositories in the Organisation
|
||||
- `description` (String) Description of the Team
|
||||
- `include_all_repositories` (Boolean) Flag if the Teams members should have access to all Repositories in the Organisation
|
||||
- `members` (List of String) List of Users that should be part of this team
|
||||
- `permission` (String) Permissions associated with this Team
|
||||
Can be `none`, `read`, `write`, `admin` or `owner`
|
||||
- `repositories` (List of String) List of Repositories that should be part of this team
|
||||
- `units` (String) List of types of Repositories that should be allowed to be created from Team members.
|
||||
Can be `repo.code`, `repo.issues`, `repo.ext_issues`, `repo.wiki`, `repo.pulls`, `repo.releases`, `repo.projects` and/or `repo.ext_wiki`
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this resource.
|
||||
|
||||
|
||||
|
51
docs/resources/team_members.md
Normal file
51
docs/resources/team_members.md
Normal file
@ -0,0 +1,51 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "gitea_team_members Resource - terraform-provider-gitea"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
gitea_team_members manages all members of a single team. This resource will be recreated on member changes.
|
||||
---
|
||||
|
||||
# gitea_team_members (Resource)
|
||||
|
||||
`gitea_team_members` manages all members of a single team. This resource will be recreated on member changes.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "gitea_org" "example_org" {
|
||||
name = "m_example_org"
|
||||
}
|
||||
|
||||
resource "gitea_user" "example_users" {
|
||||
count = 5
|
||||
username = "m_example_user_${count.index}"
|
||||
login_name = "m_example_user_${count.index}"
|
||||
password = "Geheim1!"
|
||||
email = "m_example_user_${count.index}@user.dev"
|
||||
}
|
||||
|
||||
resource "gitea_team" "example_team" {
|
||||
name = "m_example_team"
|
||||
organisation = gitea_org.example_org.name
|
||||
description = "An example of team membership"
|
||||
permission = "read"
|
||||
}
|
||||
|
||||
resource "gitea_team_members" "example_members" {
|
||||
team_id = gitea_team.example_team.id
|
||||
members = [for user in gitea_user.example_users : user.username]
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `members` (Set of String) The user names of the members of the team.
|
||||
- `team_id` (Number) The ID of the team.
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this resource.
|
52
docs/resources/team_membership.md
Normal file
52
docs/resources/team_membership.md
Normal file
@ -0,0 +1,52 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "gitea_team_membership Resource - terraform-provider-gitea"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
gitea_team_membership manages a single user's membership of a single team.
|
||||
---
|
||||
|
||||
# gitea_team_membership (Resource)
|
||||
|
||||
`gitea_team_membership` manages a single user's membership of a single team.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "gitea_org" "example_org" {
|
||||
name = "m_example_org"
|
||||
}
|
||||
|
||||
resource "gitea_user" "example_users" {
|
||||
count = 5
|
||||
username = "m_example_user_${count.index}"
|
||||
login_name = "m_example_user_${count.index}"
|
||||
password = "Geheim1!"
|
||||
email = "m_example_user_${count.index}@user.dev"
|
||||
}
|
||||
|
||||
resource "gitea_team" "example_team" {
|
||||
name = "m_example_team"
|
||||
organisation = gitea_org.example_org.name
|
||||
description = "An example team for membership testing"
|
||||
permission = "read"
|
||||
}
|
||||
|
||||
resource "gitea_team_membership" "example_team_memberships" {
|
||||
for_each = { for user in gitea_user.example_users : user.username => user }
|
||||
team_id = gitea_team.example_team.id
|
||||
username = each.value["username"]
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `team_id` (Number) The ID of the team.
|
||||
- `username` (String) The username of the team member.
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this resource.
|
57
docs/resources/token.md
Normal file
57
docs/resources/token.md
Normal file
@ -0,0 +1,57 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "gitea_token Resource - terraform-provider-gitea"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
gitea_token manages gitea Access Tokens.
|
||||
Due to upstream limitations (see https://gitea.com/gitea/go-sdk/issues/610) this resource
|
||||
can only be used with username/password provider configuration.
|
||||
WARNING:
|
||||
Tokens will be stored in the terraform state!
|
||||
---
|
||||
|
||||
# gitea_token (Resource)
|
||||
|
||||
`gitea_token` manages gitea Access Tokens.
|
||||
|
||||
Due to upstream limitations (see https://gitea.com/gitea/go-sdk/issues/610) this resource
|
||||
can only be used with username/password provider configuration.
|
||||
|
||||
WARNING:
|
||||
Tokens will be stored in the terraform state!
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
provider "gitea" {
|
||||
base_url = var.gitea_url
|
||||
# Token Auth can not be used with this resource
|
||||
username = var.gitea_username
|
||||
password = var.gitea_password
|
||||
}
|
||||
|
||||
// The token owner is the creator of the token
|
||||
resource "gitea_token" "test_token" {
|
||||
name = "test_token"
|
||||
scopes = ["all"]
|
||||
}
|
||||
|
||||
output "token" {
|
||||
value = resource.gitea_token.test_token.token
|
||||
sensitive = true
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `name` (String) The name of the Access Token
|
||||
- `scopes` (Set of String) List of string representations of scopes for the token
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this resource.
|
||||
- `last_eight` (String)
|
||||
- `token` (String, Sensitive) The actual Access Token
|
@ -56,5 +56,3 @@ resource "gitea_user" "test" {
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this resource.
|
||||
|
||||
|
||||
|
137
examples/main.tf
Normal file
137
examples/main.tf
Normal file
@ -0,0 +1,137 @@
|
||||
resource "gitea_repository" "test" {
|
||||
username = "lerentis"
|
||||
name = "test"
|
||||
private = true
|
||||
issue_labels = "Default"
|
||||
license = "MIT"
|
||||
gitignores = "Go"
|
||||
}
|
||||
|
||||
resource "gitea_repository" "mirror" {
|
||||
username = "lerentis"
|
||||
name = "terraform-provider-gitea-mirror"
|
||||
description = "Mirror of Terraform Provider"
|
||||
mirror = true
|
||||
migration_clone_address = "https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git"
|
||||
migration_service = "gitea"
|
||||
migration_service_auth_token = var.gitea_mirror_token
|
||||
}
|
||||
|
||||
resource "gitea_org" "test_org" {
|
||||
name = "test-org"
|
||||
description = "test description"
|
||||
}
|
||||
|
||||
resource "gitea_repository" "org_repo" {
|
||||
username = gitea_org.test_org.name
|
||||
name = "org-test-repo"
|
||||
}
|
||||
|
||||
data "gitea_user" "me" {
|
||||
username = "lerentis"
|
||||
}
|
||||
|
||||
resource "gitea_user" "test" {
|
||||
username = "test"
|
||||
login_name = "test"
|
||||
password = "Geheim1!"
|
||||
email = "test@user.dev"
|
||||
must_change_password = false
|
||||
admin = true
|
||||
}
|
||||
|
||||
|
||||
resource "gitea_public_key" "test_user_key" {
|
||||
title = "test"
|
||||
key = file("${path.module}/resources/gitea_public_key/id_ed25519.pub")
|
||||
read_only = true
|
||||
username = gitea_user.test.username
|
||||
}
|
||||
|
||||
|
||||
resource "gitea_team" "test_team" {
|
||||
name = "Devs"
|
||||
organisation = gitea_org.test_org.name
|
||||
description = "Devs of Test Org"
|
||||
permission = "write"
|
||||
members = [gitea_user.test.username]
|
||||
}
|
||||
|
||||
resource "gitea_team" "admin_team" {
|
||||
name = "Admins"
|
||||
organisation = gitea_org.test_org.name
|
||||
description = "Admins of Test Org"
|
||||
permission = "admin"
|
||||
members = [data.gitea_user.me.username]
|
||||
}
|
||||
|
||||
resource "gitea_git_hook" "org_repo_pre_receive" {
|
||||
name = "pre-receive"
|
||||
user = gitea_org.test_org.name
|
||||
repo = gitea_repository.org_repo.name
|
||||
content = file("${path.module}/pre-receive.sh")
|
||||
}
|
||||
|
||||
resource "gitea_org" "org1" {
|
||||
name = "org1"
|
||||
}
|
||||
|
||||
resource "gitea_org" "org2" {
|
||||
name = "org2"
|
||||
}
|
||||
|
||||
resource "gitea_repository" "repo1_in_org1" {
|
||||
username = gitea_org.org1.name
|
||||
name = "repo1-in-org1"
|
||||
}
|
||||
|
||||
resource "gitea_fork" "user_fork_of_repo1_in_org1" {
|
||||
owner = gitea_org.org1.name
|
||||
repo = gitea_repository.repo1_in_org1.name
|
||||
}
|
||||
|
||||
resource "gitea_fork" "org2_fork_of_repo1_in_org1" {
|
||||
owner = gitea_org.org1.name
|
||||
repo = gitea_repository.repo1_in_org1.name
|
||||
organization = gitea_org.org2.name
|
||||
}
|
||||
|
||||
resource "gitea_token" "test_token" {
|
||||
username = data.gitea_user.me.username
|
||||
name = "test-token"
|
||||
}
|
||||
|
||||
resource "gitea_repository" "test_existing_user" {
|
||||
username = "testuser2"
|
||||
name = "testExistingUser"
|
||||
private = true
|
||||
issue_labels = "Default"
|
||||
license = "MIT"
|
||||
gitignores = "Go"
|
||||
}
|
||||
|
||||
//resource "gitea_repository" "test_bs_user" {
|
||||
// username = "manualTest"
|
||||
// name = "testBullshitUser"
|
||||
// private = true
|
||||
// issue_labels = "Default"
|
||||
// license = "MIT"
|
||||
// gitignores = "Go"
|
||||
//}
|
||||
|
||||
output "token" {
|
||||
value = resource.gitea_token.test_token.token
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
data "gitea_repo" "org_repos" {
|
||||
name = each.key
|
||||
username = gitea_org.org1.name
|
||||
for_each = {
|
||||
for repo in resource.gitea_org.org1.repos : repo => repo
|
||||
}
|
||||
}
|
||||
|
||||
output "repos" {
|
||||
value = data.gitea_repo.org_repos["repo1-in-org1"].clone_url
|
||||
}
|
9
examples/pre-receive.sh
Normal file
9
examples/pre-receive.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
while read oldrev newrev refname
|
||||
do
|
||||
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
|
||||
if [ "master" = "$branch" ]; then
|
||||
echo "wrong branch"
|
||||
exit 1
|
||||
fi
|
||||
done
|
15
examples/provider.tf
Normal file
15
examples/provider.tf
Normal file
@ -0,0 +1,15 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
gitea = {
|
||||
source = "go-gitea/gitea"
|
||||
version = "0.3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "gitea" {
|
||||
base_url = var.gitea_url
|
||||
username = "lerentis"
|
||||
password = var.gitea_password
|
||||
#token = var.gitea_token
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
gitea = {
|
||||
source = "gitea/gitea"
|
||||
version = "0.6.1"
|
||||
source = "go-gitea/gitea"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
23
examples/resources/gitea_fork/resource.tf
Normal file
23
examples/resources/gitea_fork/resource.tf
Normal file
@ -0,0 +1,23 @@
|
||||
resource "gitea_org" "org1" {
|
||||
name = "org1"
|
||||
}
|
||||
|
||||
resource "gitea_org" "org2" {
|
||||
name = "org2"
|
||||
}
|
||||
|
||||
resource "gitea_repository" "repo1_in_org1" {
|
||||
username = gitea_org.org1.name
|
||||
name = "repo1-in-org1"
|
||||
}
|
||||
|
||||
resource "gitea_fork" "user_fork_of_repo1_in_org1" {
|
||||
owner = gitea_org.org1.name
|
||||
repo = gitea_repository.repo1_in_org1.name
|
||||
}
|
||||
|
||||
resource "gitea_fork" "org2_fork_of_repo1_in_org1" {
|
||||
owner = gitea_org.org1.name
|
||||
repo = gitea_repository.repo1_in_org1.name
|
||||
organization = gitea_org.org2.name
|
||||
}
|
8
examples/resources/gitea_git_hook/post-receive.sh
Normal file
8
examples/resources/gitea_git_hook/post-receive.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
while read oldrev newrev refname
|
||||
do
|
||||
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
|
||||
if [ "master" = "$branch" ]; then
|
||||
# Do something
|
||||
fi
|
||||
done
|
15
examples/resources/gitea_git_hook/resource.tf
Normal file
15
examples/resources/gitea_git_hook/resource.tf
Normal file
@ -0,0 +1,15 @@
|
||||
resource "gitea_org" "test_org" {
|
||||
name = "test-org"
|
||||
}
|
||||
|
||||
resource "gitea_repository" "org_repo" {
|
||||
username = gitea_org.test_org.name
|
||||
name = "org-test-repo"
|
||||
}
|
||||
|
||||
resource "gitea_git_hook" "org_repo_post_receive" {
|
||||
name = "post-receive"
|
||||
user = gitea_org.test_org.name
|
||||
repo = gitea_repository.org_repo.name
|
||||
content = file("${path.module}/post-receive.sh")
|
||||
}
|
14
examples/resources/gitea_repo_branch_protection/resource.tf
Normal file
14
examples/resources/gitea_repo_branch_protection/resource.tf
Normal file
@ -0,0 +1,14 @@
|
||||
resource "gitea_repository" "repo" {
|
||||
username = var.username
|
||||
name = var.name
|
||||
auto_init = false
|
||||
}
|
||||
|
||||
resource "gitea_repository_branch_protection" "main" {
|
||||
username = gitea_repository.repo.username
|
||||
name = gitea_repository.repo.name
|
||||
|
||||
rule_name = "main"
|
||||
enable_push = true
|
||||
status_check_patterns = var.branch_protection_patterns
|
||||
}
|
@ -1,13 +1,5 @@
|
||||
resource "gitea_user" "test" {
|
||||
username = "test"
|
||||
login_name = "test"
|
||||
password = "Geheim1!"
|
||||
email = "test@user.dev"
|
||||
must_change_password = false
|
||||
}
|
||||
|
||||
resource "gitea_repository" "test" {
|
||||
username = resource.gitea_user.test.name
|
||||
username = "lerentis"
|
||||
name = "test"
|
||||
private = true
|
||||
issue_labels = "Default"
|
||||
@ -16,7 +8,7 @@ resource "gitea_repository" "test" {
|
||||
}
|
||||
|
||||
resource "gitea_repository" "mirror" {
|
||||
username = resource.gitea_user.test.name
|
||||
username = "lerentis"
|
||||
name = "terraform-provider-gitea-mirror"
|
||||
description = "Mirror of Terraform Provider"
|
||||
mirror = true
|
||||
@ -24,3 +16,13 @@ resource "gitea_repository" "mirror" {
|
||||
migration_service = "gitea"
|
||||
migration_service_auth_token = var.gitea_mirror_token
|
||||
}
|
||||
|
||||
resource "gitea_repository" "clone" {
|
||||
username = "lerentis"
|
||||
name = "terraform-provider-gitea-clone"
|
||||
description = "Clone of Terraform Provider"
|
||||
mirror = false
|
||||
migration_clone_address = "https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git"
|
||||
migration_service = "gitea"
|
||||
migration_service_auth_token = var.gitea_clone_token
|
||||
}
|
||||
|
25
examples/resources/gitea_repository_key/resource.tf
Normal file
25
examples/resources/gitea_repository_key/resource.tf
Normal file
@ -0,0 +1,25 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
tls = {
|
||||
source = "hashicorp/tls"
|
||||
version = "4.0.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "tls_private_key" "example" {
|
||||
type = "RSA"
|
||||
rsa_bits = 4096
|
||||
}
|
||||
|
||||
resource "gitea_repository" "example" {
|
||||
name = "example"
|
||||
private = true
|
||||
}
|
||||
|
||||
resource "gitea_repository_key" "example" {
|
||||
repository = gitea_repository.example.id
|
||||
title = "Example Deploy Key"
|
||||
read_only = true
|
||||
key = tls_private_key.example.public_key_openssh
|
||||
}
|
@ -19,3 +19,23 @@ resource "gitea_team" "test_team" {
|
||||
permission = "write"
|
||||
members = [gitea_user.test.username]
|
||||
}
|
||||
|
||||
|
||||
resource "gitea_repository" "test" {
|
||||
username = gitea_org.test_org.name
|
||||
name = "test"
|
||||
private = true
|
||||
issue_labels = "Default"
|
||||
license = "MIT"
|
||||
gitignores = "Go"
|
||||
}
|
||||
|
||||
resource "gitea_team" "test_team_restricted" {
|
||||
name = "Restricted Devs"
|
||||
organisation = gitea_org.test_org.name
|
||||
description = "Restricted Devs of Test Org"
|
||||
permission = "write"
|
||||
members = [gitea_user.test.username]
|
||||
include_all_repositories = false
|
||||
repositories = [gitea_repository.test.name]
|
||||
}
|
||||
|
23
examples/resources/gitea_team_members/resource.tf
Normal file
23
examples/resources/gitea_team_members/resource.tf
Normal file
@ -0,0 +1,23 @@
|
||||
resource "gitea_org" "example_org" {
|
||||
name = "m_example_org"
|
||||
}
|
||||
|
||||
resource "gitea_user" "example_users" {
|
||||
count = 5
|
||||
username = "m_example_user_${count.index}"
|
||||
login_name = "m_example_user_${count.index}"
|
||||
password = "Geheim1!"
|
||||
email = "m_example_user_${count.index}@user.dev"
|
||||
}
|
||||
|
||||
resource "gitea_team" "example_team" {
|
||||
name = "m_example_team"
|
||||
organisation = gitea_org.example_org.name
|
||||
description = "An example of team membership"
|
||||
permission = "read"
|
||||
}
|
||||
|
||||
resource "gitea_team_members" "example_members" {
|
||||
team_id = gitea_team.example_team.id
|
||||
members = [for user in gitea_user.example_users : user.username]
|
||||
}
|
24
examples/resources/gitea_team_membership/resource.tf
Normal file
24
examples/resources/gitea_team_membership/resource.tf
Normal file
@ -0,0 +1,24 @@
|
||||
resource "gitea_org" "example_org" {
|
||||
name = "m_example_org"
|
||||
}
|
||||
|
||||
resource "gitea_user" "example_users" {
|
||||
count = 5
|
||||
username = "m_example_user_${count.index}"
|
||||
login_name = "m_example_user_${count.index}"
|
||||
password = "Geheim1!"
|
||||
email = "m_example_user_${count.index}@user.dev"
|
||||
}
|
||||
|
||||
resource "gitea_team" "example_team" {
|
||||
name = "m_example_team"
|
||||
organisation = gitea_org.example_org.name
|
||||
description = "An example team for membership testing"
|
||||
permission = "read"
|
||||
}
|
||||
|
||||
resource "gitea_team_membership" "example_team_memberships" {
|
||||
for_each = { for user in gitea_user.example_users : user.username => user }
|
||||
team_id = gitea_team.example_team.id
|
||||
username = each.value["username"]
|
||||
}
|
17
examples/resources/gitea_token/resource.tf
Normal file
17
examples/resources/gitea_token/resource.tf
Normal file
@ -0,0 +1,17 @@
|
||||
provider "gitea" {
|
||||
base_url = var.gitea_url
|
||||
# Token Auth can not be used with this resource
|
||||
username = var.gitea_username
|
||||
password = var.gitea_password
|
||||
}
|
||||
|
||||
// The token owner is the creator of the token
|
||||
resource "gitea_token" "test_token" {
|
||||
name = "test_token"
|
||||
scopes = ["all"]
|
||||
}
|
||||
|
||||
output "token" {
|
||||
value = resource.gitea_token.test_token.token
|
||||
sensitive = true
|
||||
}
|
15
examples/variables.tf
Normal file
15
examples/variables.tf
Normal file
@ -0,0 +1,15 @@
|
||||
variable "gitea_url" {
|
||||
default = "http://localhost:3000/"
|
||||
}
|
||||
|
||||
variable "gitea_token" {
|
||||
|
||||
}
|
||||
|
||||
variable "gitea_mirror_token" {
|
||||
|
||||
}
|
||||
|
||||
variable "gitea_password" {
|
||||
|
||||
}
|
@ -6,9 +6,10 @@ import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/helper/logging"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging"
|
||||
)
|
||||
|
||||
// Config is per-provider, specifies where to connect to gitea
|
||||
@ -28,8 +29,7 @@ func (c *Config) Client() (interface{}, error) {
|
||||
return nil, fmt.Errorf("either a token or a username needs to be used")
|
||||
}
|
||||
// Configure TLS/SSL
|
||||
tlsConfig := &tls.Config{}
|
||||
|
||||
var tlsConfig tls.Config
|
||||
// If a CACertFile has been specified, use that for cert validation
|
||||
if c.CACertFile != "" {
|
||||
caCert, err := ioutil.ReadFile(c.CACertFile)
|
||||
@ -43,13 +43,12 @@ func (c *Config) Client() (interface{}, error) {
|
||||
}
|
||||
|
||||
// If configured as insecure, turn off SSL verification
|
||||
if c.Insecure {
|
||||
tlsConfig.InsecureSkipVerify = true
|
||||
}
|
||||
tlsConfig.InsecureSkipVerify = c.Insecure
|
||||
|
||||
t := http.DefaultTransport.(*http.Transport).Clone()
|
||||
t.TLSClientConfig = tlsConfig
|
||||
t.TLSClientConfig = &tlsConfig
|
||||
t.MaxIdleConnsPerHost = 100
|
||||
t.TLSHandshakeTimeout = 10 * time.Second
|
||||
|
||||
httpClient := &http.Client{
|
||||
Transport: logging.NewTransport("Gitea", t),
|
||||
@ -60,16 +59,23 @@ func (c *Config) Client() (interface{}, error) {
|
||||
}
|
||||
|
||||
var client *gitea.Client
|
||||
var err error
|
||||
if c.Token != "" {
|
||||
client, _ = gitea.NewClient(c.BaseURL, gitea.SetToken(c.Token), gitea.SetHTTPClient(httpClient))
|
||||
client, err = gitea.NewClient(c.BaseURL, gitea.SetToken(c.Token), gitea.SetHTTPClient(httpClient))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if c.Username != "" {
|
||||
client, _ = gitea.NewClient(c.BaseURL, gitea.SetBasicAuth(c.Username, c.Password), gitea.SetHTTPClient(httpClient))
|
||||
client, err = gitea.NewClient(c.BaseURL, gitea.SetBasicAuth(c.Username, c.Password), gitea.SetHTTPClient(httpClient))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// Test the credentials by checking we can get information about the authenticated user.
|
||||
_, _, err := client.GetMyUserInfo()
|
||||
_, _, err = client.GetMyUserInfo()
|
||||
|
||||
return client, err
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
func dataSourceGiteaOrg() *schema.Resource {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
func dataSourceGiteaRepo() *schema.Resource {
|
||||
@ -116,7 +116,7 @@ func dataSourceGiteaRepoRead(d *schema.ResourceData, meta interface{}) error {
|
||||
}
|
||||
username := strings.ToLower(usernameData.(string))
|
||||
|
||||
nameData, nameOk := d.GetOk("username")
|
||||
nameData, nameOk := d.GetOk("name")
|
||||
if !nameOk {
|
||||
return fmt.Errorf("name of repo must be passed")
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
func dataSourceGiteaUser() *schema.Resource {
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/terraform"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
|
||||
)
|
||||
|
||||
func TestAccDataSourceGiteaUser_basic(t *testing.T) {
|
||||
|
@ -4,12 +4,11 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/terraform"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
// Provider returns a terraform.ResourceProvider.
|
||||
func Provider() terraform.ResourceProvider {
|
||||
func Provider() *schema.Provider {
|
||||
|
||||
// The actual provider
|
||||
return &schema.Provider{
|
||||
@ -74,13 +73,21 @@ func Provider() terraform.ResourceProvider {
|
||||
|
||||
ResourcesMap: map[string]*schema.Resource{
|
||||
"gitea_org": resourceGiteaOrg(),
|
||||
// "gitea_team": resourceGiteaTeam(),
|
||||
// "gitea_repo": resourceGiteaRepo(),
|
||||
"gitea_user": resourceGiteaUser(),
|
||||
"gitea_oauth2_app": resourceGiteaOauthApp(),
|
||||
"gitea_repository": resourceGiteaRepository(),
|
||||
"gitea_public_key": resourceGiteaPublicKey(),
|
||||
"gitea_team": resourceGiteaTeam(),
|
||||
// "gitea_team": resourceGiteaTeam(),
|
||||
// "gitea_repo": resourceGiteaRepo(),
|
||||
"gitea_user": resourceGiteaUser(),
|
||||
"gitea_oauth2_app": resourceGiteaOauthApp(),
|
||||
"gitea_repository": resourceGiteaRepository(),
|
||||
"gitea_fork": resourceGiteaFork(),
|
||||
"gitea_public_key": resourceGiteaPublicKey(),
|
||||
"gitea_team": resourceGiteaTeam(),
|
||||
"gitea_team_membership": resourceGiteaTeamMembership(),
|
||||
"gitea_team_members": resourceGiteaTeamMembers(),
|
||||
"gitea_git_hook": resourceGiteaGitHook(),
|
||||
"gitea_token": resourceGiteaToken(),
|
||||
"gitea_repository_key": resourceGiteaRepositoryKey(),
|
||||
"gitea_repository_webhook": resourceGiteaRepositoryWebhook(),
|
||||
"gitea_repository_branch_protection": resourceGiteaRepositoryBranchProtection(),
|
||||
},
|
||||
|
||||
ConfigureFunc: providerConfigure,
|
||||
@ -118,5 +125,8 @@ func validateAPIURLVersion(value interface{}, key string) (ws []string, es []err
|
||||
if strings.HasSuffix(v, "/api/v1") || strings.HasSuffix(v, "/api/v1/") {
|
||||
es = append(es, fmt.Errorf("terraform-gitea-provider base URL format is incorrect; Please leave out API Path %s", v))
|
||||
}
|
||||
if strings.Contains(v, "localhost") && strings.Contains(v, ".") {
|
||||
es = append(es, fmt.Errorf("terraform-gitea-provider base URL violates RFC 2606; Please do not define a subdomain for localhost!"))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -4,30 +4,28 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/terraform"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
var testAccProviders map[string]terraform.ResourceProvider
|
||||
var testAccProviders map[string]*schema.Provider
|
||||
var testAccProvider *schema.Provider
|
||||
|
||||
func init() {
|
||||
testAccProvider = Provider().(*schema.Provider)
|
||||
testAccProviders = map[string]terraform.ResourceProvider{
|
||||
testAccProvider = Provider()
|
||||
testAccProviders = map[string]*schema.Provider{
|
||||
"gitea": testAccProvider,
|
||||
}
|
||||
}
|
||||
|
||||
func TestProvider(t *testing.T) {
|
||||
if err := Provider().(*schema.Provider).InternalValidate(); err != nil {
|
||||
if err := Provider().InternalValidate(); err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestProvider_impl(t *testing.T) {
|
||||
var _ terraform.ResourceProvider = Provider()
|
||||
var _ *schema.Provider = Provider()
|
||||
}
|
||||
|
||||
func testAccPreCheck(t *testing.T) {
|
||||
if v := os.Getenv("GITEA_TOKEN"); v == "" {
|
||||
t.Fatal("GITEA_TOKEN must be set for acceptance tests")
|
||||
|
127
gitea/resource_gitea_fork.go
Normal file
127
gitea/resource_gitea_fork.go
Normal file
@ -0,0 +1,127 @@
|
||||
package gitea
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
forkOwner string = "owner"
|
||||
forkRepo string = "repo"
|
||||
forkOrganization string = "organization"
|
||||
)
|
||||
|
||||
func resourceForkCreate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
var opts gitea.CreateForkOption
|
||||
var org string
|
||||
org = d.Get(forkOrganization).(string)
|
||||
if org != "" {
|
||||
opts.Organization = &org
|
||||
}
|
||||
|
||||
repo, _, err := client.CreateFork(d.Get(forkOwner).(string),
|
||||
d.Get(forkRepo).(string),
|
||||
opts)
|
||||
if err == nil {
|
||||
err = setForkResourceData(repo, d)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func resourceForkRead(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
id, err := strconv.ParseInt(d.Id(), 10, 64)
|
||||
var resp *gitea.Response
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
repo, resp, err := client.GetRepoByID(id)
|
||||
|
||||
if err != nil {
|
||||
if resp.StatusCode == 404 {
|
||||
d.SetId("")
|
||||
return nil
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
err = setForkResourceData(repo, d)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceForkDelete(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
id, err := strconv.ParseInt(d.Id(), 10, 64)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
repo, _, err := client.GetRepoByID(id)
|
||||
var resp *gitea.Response
|
||||
|
||||
resp, err = client.DeleteRepo(repo.Owner.UserName, repo.Name)
|
||||
|
||||
if err != nil {
|
||||
if resp.StatusCode == 404 {
|
||||
return
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func setForkResourceData(repo *gitea.Repository, d *schema.ResourceData) (err error) {
|
||||
|
||||
d.SetId(fmt.Sprintf("%d", repo.ID))
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceGiteaFork() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Read: resourceForkRead,
|
||||
Create: resourceForkCreate,
|
||||
Delete: resourceForkDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
StateContext: schema.ImportStatePassthroughContext,
|
||||
},
|
||||
Schema: map[string]*schema.Schema{
|
||||
"owner": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "The owner or owning organization of the repository to fork",
|
||||
},
|
||||
"repo": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "The name of the repository to fork",
|
||||
},
|
||||
"organization": {
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
Description: "The organization that owns the forked repo",
|
||||
},
|
||||
},
|
||||
Description: "`gitea_fork` manages repository fork to the current user or an organisation\n" +
|
||||
"Forking a repository to a dedicated user is currently unsupported\n" +
|
||||
"Creating a fork using this resource without an organisation will create the fork in the executors name",
|
||||
}
|
||||
}
|
120
gitea/resource_gitea_git_hook.go
Normal file
120
gitea/resource_gitea_git_hook.go
Normal file
@ -0,0 +1,120 @@
|
||||
package gitea
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
GitHookUser string = "user"
|
||||
GitHookRepo string = "repo"
|
||||
GitHookName string = "name"
|
||||
GitHookContent string = "content"
|
||||
)
|
||||
|
||||
func resourceGitHookRead(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
user := d.Get(GitHookUser).(string)
|
||||
repo := d.Get(GitHookRepo).(string)
|
||||
name := d.Get(GitHookName).(string)
|
||||
|
||||
gitHook, _, err := client.GetRepoGitHook(user, repo, name)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = setGitHookResourceData(user, repo, gitHook, d)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceGitHookUpdate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
user := d.Get(GitHookUser).(string)
|
||||
repo := d.Get(GitHookRepo).(string)
|
||||
name := d.Get(GitHookName).(string)
|
||||
|
||||
opts := gitea.EditGitHookOption{
|
||||
Content: d.Get(GitHookContent).(string),
|
||||
}
|
||||
|
||||
_, err = client.EditRepoGitHook(user, repo, name, opts)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Get gitHook ourselves, EditRepoGitHook does not return it
|
||||
gitHook, _, err := client.GetRepoGitHook(user, repo, name)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = setGitHookResourceData(user, repo, gitHook, d)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceGitHookDelete(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
user := d.Get(GitHookUser).(string)
|
||||
repo := d.Get(GitHookRepo).(string)
|
||||
name := d.Get(GitHookName).(string)
|
||||
|
||||
_, err = client.DeleteRepoGitHook(user, repo, name)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func setGitHookResourceData(user string, repo string, gitHook *gitea.GitHook, d *schema.ResourceData) (err error) {
|
||||
d.SetId(fmt.Sprintf("%s/%s/%s", user, repo, gitHook.Name))
|
||||
d.Set(GitHookUser, user)
|
||||
d.Set(GitHookRepo, repo)
|
||||
d.Set(GitHookName, gitHook.Name)
|
||||
d.Set(GitHookContent, gitHook.Content)
|
||||
return
|
||||
}
|
||||
|
||||
func resourceGiteaGitHook() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Read: resourceGitHookRead,
|
||||
Create: resourceGitHookUpdate, // All hooks already exist, just empty and disabled
|
||||
Update: resourceGitHookUpdate,
|
||||
Delete: resourceGitHookDelete,
|
||||
Schema: map[string]*schema.Schema{
|
||||
"name": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Description: "Name of the git hook to configure",
|
||||
},
|
||||
"repo": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Description: "The repository that this hook belongs too.",
|
||||
},
|
||||
"user": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Description: "The user (or organisation) owning the repo this hook belongs too",
|
||||
},
|
||||
"content": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Description: "Content of the git hook",
|
||||
},
|
||||
},
|
||||
Description: "`gitea_git_hook` manages git hooks on a repository.\n" +
|
||||
"import is currently not supported\n\n" +
|
||||
"WARNING: using this resource requires to enable server side hooks" +
|
||||
"which are known to cause [security issues](https://github.com/go-gitea/gitea/pull/13058)!\n\n" +
|
||||
"if you want to procede, you need to enable server side hooks as stated" +
|
||||
" [here](https://docs.gitea.io/en-us/config-cheat-sheet/#security-security)",
|
||||
}
|
||||
}
|
@ -4,14 +4,15 @@ import (
|
||||
"fmt"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
oauth2KeyName string = "name"
|
||||
oauth2KeyRedirectURIs string = "redirect_uris"
|
||||
oauth2KeyClientId string = "client_id"
|
||||
oauth2KeyClientSecret string = "client_secret"
|
||||
oauth2KeyName string = "name"
|
||||
oauth2KeyConfidentialClient string = "confidential_client"
|
||||
oauth2KeyRedirectURIs string = "redirect_uris"
|
||||
oauth2KeyClientId string = "client_id"
|
||||
oauth2KeyClientSecret string = "client_secret"
|
||||
)
|
||||
|
||||
func resourceGiteaOauthApp() *schema.Resource {
|
||||
@ -37,6 +38,12 @@ func resourceGiteaOauthApp() *schema.Resource {
|
||||
},
|
||||
Description: "Accepted redirect URIs",
|
||||
},
|
||||
oauth2KeyConfidentialClient: {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
Default: false,
|
||||
Description: "If set to false, it will be a public client (PKCE will be required)",
|
||||
},
|
||||
oauth2KeyClientId: {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
@ -89,9 +96,16 @@ func resourceOauth2AppUpcreate(d *schema.ResourceData, meta interface{}) (err er
|
||||
return fmt.Errorf("attribute %s must be set and must be a string", oauth2KeyName)
|
||||
}
|
||||
|
||||
confidentialClient, confidentialClientOk := d.Get(oauth2KeyConfidentialClient).(bool)
|
||||
|
||||
if !confidentialClientOk {
|
||||
return fmt.Errorf("attribute %s must be set and must be a bool", oauth2KeyConfidentialClient)
|
||||
}
|
||||
|
||||
opts := gitea.CreateOauth2Option{
|
||||
Name: name,
|
||||
RedirectURIs: redirectURIs,
|
||||
Name: name,
|
||||
ConfidentialClient: confidentialClient,
|
||||
RedirectURIs: redirectURIs,
|
||||
}
|
||||
|
||||
var oauth2 *gitea.Oauth2
|
||||
@ -99,7 +113,7 @@ func resourceOauth2AppUpcreate(d *schema.ResourceData, meta interface{}) (err er
|
||||
if d.IsNewResource() {
|
||||
oauth2, _, err = client.CreateOauth2(opts)
|
||||
} else {
|
||||
oauth2, err := searchOauth2AppByClientId(client, d.Id())
|
||||
oauth2, err = searchOauth2AppByClientId(client, d.Id())
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
@ -176,9 +190,10 @@ func setOAuth2ResourceData(app *gitea.Oauth2, d *schema.ResourceData) (err error
|
||||
d.SetId(app.ClientID)
|
||||
|
||||
for k, v := range map[string]interface{}{
|
||||
oauth2KeyName: app.Name,
|
||||
oauth2KeyRedirectURIs: schema.NewSet(schema.HashString, CollapseStringList(app.RedirectURIs)),
|
||||
oauth2KeyClientId: app.ClientID,
|
||||
oauth2KeyName: app.Name,
|
||||
oauth2KeyConfidentialClient: app.ConfidentialClient,
|
||||
oauth2KeyRedirectURIs: schema.NewSet(schema.HashString, CollapseStringList(app.RedirectURIs)),
|
||||
oauth2KeyClientId: app.ClientID,
|
||||
} {
|
||||
err = d.Set(k, v)
|
||||
if err != nil {
|
||||
|
@ -2,9 +2,10 @@ package gitea
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -15,26 +16,81 @@ const (
|
||||
orgLocation string = "location"
|
||||
orgVisibility string = "visibility"
|
||||
RepoAdminChangeTeamAccess string = "repo_admin_change_team_access"
|
||||
orgRepos string = "org_repos"
|
||||
)
|
||||
|
||||
// might come in handy if we want to stick to numeric IDs
|
||||
func searchOrgByClientId(c *gitea.Client, id int64) (res *gitea.Organization, err error) {
|
||||
|
||||
page := 1
|
||||
|
||||
for {
|
||||
orgs, _, err := c.AdminListOrgs(gitea.AdminListOrgsOptions{
|
||||
ListOptions: gitea.ListOptions{
|
||||
Page: page,
|
||||
PageSize: 50,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(orgs) == 0 {
|
||||
return nil, fmt.Errorf("Organisation with ID %d could not be found", id)
|
||||
}
|
||||
|
||||
for _, org := range orgs {
|
||||
if org.ID == id {
|
||||
return org, nil
|
||||
}
|
||||
}
|
||||
|
||||
page += 1
|
||||
}
|
||||
}
|
||||
|
||||
func getAllOrgRepos(c *gitea.Client, orgName string) (repos []string, err error) {
|
||||
page := 1
|
||||
|
||||
for {
|
||||
repoBuffer, _, err := c.ListOrgRepos(orgName, gitea.ListOrgReposOptions{
|
||||
ListOptions: gitea.ListOptions{
|
||||
Page: page,
|
||||
PageSize: 50,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(repoBuffer) == 0 {
|
||||
return repos, nil
|
||||
}
|
||||
|
||||
for _, repo := range repoBuffer {
|
||||
repos = append(repos, repo.Name)
|
||||
}
|
||||
|
||||
page += 1
|
||||
}
|
||||
}
|
||||
|
||||
func resourceOrgRead(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
var org *gitea.Organization
|
||||
var resp *gitea.Response
|
||||
|
||||
org, resp, err = client.GetOrg(d.Get(orgName).(string))
|
||||
id, err := strconv.ParseInt(d.Id(), 10, 64)
|
||||
|
||||
org, err = searchOrgByClientId(client, id)
|
||||
|
||||
if err != nil {
|
||||
if resp.StatusCode == 404 {
|
||||
d.SetId("")
|
||||
return nil
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
|
||||
err = setOrgResourceData(org, d)
|
||||
repos, _ := getAllOrgRepos(client, org.UserName)
|
||||
err = setOrgResourceData(org, d, &repos)
|
||||
|
||||
return
|
||||
}
|
||||
@ -57,7 +113,8 @@ func resourceOrgCreate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
err = setOrgResourceData(org, d)
|
||||
repos, _ := getAllOrgRepos(client, org.UserName)
|
||||
err = setOrgResourceData(org, d, &repos)
|
||||
|
||||
return
|
||||
}
|
||||
@ -90,7 +147,8 @@ func resourceOrgUpdate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
|
||||
org, resp, err = client.GetOrg(d.Get(orgName).(string))
|
||||
|
||||
err = setOrgResourceData(org, d)
|
||||
repos, _ := getAllOrgRepos(client, org.UserName)
|
||||
err = setOrgResourceData(org, d, &repos)
|
||||
|
||||
return
|
||||
}
|
||||
@ -113,7 +171,7 @@ func resourceOrgDelete(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func setOrgResourceData(org *gitea.Organization, d *schema.ResourceData) (err error) {
|
||||
func setOrgResourceData(org *gitea.Organization, d *schema.ResourceData, repos *[]string) (err error) {
|
||||
d.SetId(fmt.Sprintf("%d", org.ID))
|
||||
d.Set("name", org.UserName)
|
||||
d.Set("full_name", org.FullName)
|
||||
@ -122,6 +180,7 @@ func setOrgResourceData(org *gitea.Organization, d *schema.ResourceData) (err er
|
||||
d.Set("website", org.Website)
|
||||
d.Set("location", org.Location)
|
||||
d.Set("visibility", org.Visibility)
|
||||
d.Set("repos", repos)
|
||||
|
||||
return
|
||||
}
|
||||
@ -133,7 +192,7 @@ func resourceGiteaOrg() *schema.Resource {
|
||||
Update: resourceOrgUpdate,
|
||||
Delete: resourceOrgDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
State: schema.ImportStatePassthrough,
|
||||
StateContext: schema.ImportStatePassthroughContext,
|
||||
},
|
||||
Schema: map[string]*schema.Schema{
|
||||
"name": {
|
||||
@ -183,6 +242,13 @@ func resourceGiteaOrg() *schema.Resource {
|
||||
Default: "public",
|
||||
Description: "Flag is this organisation should be publicly visible or not.",
|
||||
},
|
||||
"repos": {
|
||||
Type: schema.TypeList,
|
||||
Required: false,
|
||||
Computed: true,
|
||||
Description: "List of all Repositories that are part of this organisation",
|
||||
Elem: &schema.Schema{Type: schema.TypeString},
|
||||
},
|
||||
},
|
||||
Description: "`gitea_org` manages a gitea organisation.\n\n" +
|
||||
"Organisations are a way to group repositories and abstract permission management in a gitea instance.",
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -1,11 +1,15 @@
|
||||
package gitea
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-log/tflog"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -34,7 +38,8 @@ const (
|
||||
repoAllowManualMerge string = "allow_manual_merge"
|
||||
repoAutodetectManualMerge string = "autodetect_manual_merge"
|
||||
repoMirror string = "mirror"
|
||||
migrationCloneAddress string = "migration_clone_addresse"
|
||||
migrationCloneAddresse string = "migration_clone_addresse"
|
||||
migrationCloneAddress string = "migration_clone_address"
|
||||
migrationService string = "migration_service"
|
||||
migrationServiceAuthName string = "migration_service_auth_username"
|
||||
migrationServiceAuthPassword string = "migration_service_auth_password"
|
||||
@ -47,6 +52,34 @@ const (
|
||||
migrationLFSEndpoint string = "migration_lfs_endpoint"
|
||||
)
|
||||
|
||||
func searchUserByName(c *gitea.Client, name string) (res *gitea.User, err error) {
|
||||
page := 1
|
||||
|
||||
for {
|
||||
users, _, err := c.AdminListUsers(gitea.AdminListUsersOptions{
|
||||
ListOptions: gitea.ListOptions{
|
||||
Page: page,
|
||||
PageSize: 50,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(users) == 0 {
|
||||
return nil, fmt.Errorf("User with name %s could not be found", name)
|
||||
}
|
||||
|
||||
for _, user := range users {
|
||||
if user.UserName == name {
|
||||
return user, nil
|
||||
}
|
||||
}
|
||||
|
||||
page += 1
|
||||
}
|
||||
}
|
||||
|
||||
func resourceRepoRead(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
@ -78,21 +111,39 @@ func resourceRepoCreate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
|
||||
var repo *gitea.Repository
|
||||
var resp *gitea.Response
|
||||
var orgRepo bool
|
||||
var orgRepo, hasAdmin bool
|
||||
|
||||
_, resp, err = client.GetOrg(d.Get(repoOwner).(string))
|
||||
|
||||
if resp.StatusCode == 404 {
|
||||
_, err := searchUserByName(client, d.Get(repoOwner).(string))
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "could not be found") {
|
||||
return errors.New(fmt.Sprintf("Creation of repository cound not proceed as owner %s is not present in gitea", d.Get(repoOwner).(string)))
|
||||
}
|
||||
tflog.Warn(context.Background(), "Error query for users. Assuming missing permissions and proceding with user permissions")
|
||||
hasAdmin = false
|
||||
} else {
|
||||
hasAdmin = true
|
||||
}
|
||||
orgRepo = false
|
||||
} else {
|
||||
orgRepo = true
|
||||
}
|
||||
|
||||
if (d.Get(repoMirror)).(bool) {
|
||||
var cloneAddr string
|
||||
if d.Get(migrationCloneAddresse).(string) != "" {
|
||||
cloneAddr = d.Get(migrationCloneAddresse).(string)
|
||||
} else {
|
||||
cloneAddr = d.Get(migrationCloneAddress).(string)
|
||||
}
|
||||
|
||||
if cloneAddr != "" {
|
||||
|
||||
opts := gitea.MigrateRepoOption{
|
||||
RepoName: d.Get(repoName).(string),
|
||||
RepoOwner: d.Get(repoOwner).(string),
|
||||
CloneAddr: d.Get(migrationCloneAddress).(string),
|
||||
CloneAddr: cloneAddr,
|
||||
Service: gitea.GitServiceType(d.Get(migrationService).(string)),
|
||||
Mirror: d.Get(repoMirror).(bool),
|
||||
Private: d.Get(repoPrivateFlag).(bool),
|
||||
@ -138,12 +189,16 @@ func resourceRepoCreate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
if orgRepo {
|
||||
repo, _, err = client.CreateOrgRepo(d.Get(repoOwner).(string), opts)
|
||||
} else {
|
||||
repo, _, err = client.CreateRepo(opts)
|
||||
if hasAdmin {
|
||||
repo, _, err = client.AdminCreateRepo(d.Get(repoOwner).(string), opts)
|
||||
} else {
|
||||
repo, _, err = client.CreateRepo(opts)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return
|
||||
return err
|
||||
}
|
||||
|
||||
err = setRepoResourceData(repo, d)
|
||||
@ -223,6 +278,7 @@ func respurceRepoDelete(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
|
||||
func setRepoResourceData(repo *gitea.Repository, d *schema.ResourceData) (err error) {
|
||||
d.SetId(fmt.Sprintf("%d", repo.ID))
|
||||
d.Set("username", repo.Owner.UserName)
|
||||
d.Set("name", repo.Name)
|
||||
d.Set("description", repo.Description)
|
||||
d.Set("full_name", repo.FullName)
|
||||
@ -239,8 +295,8 @@ func setRepoResourceData(repo *gitea.Repository, d *schema.ResourceData) (err er
|
||||
d.Set("watchers", repo.Watchers)
|
||||
d.Set("open_issue_count", repo.OpenIssues)
|
||||
d.Set("default_branch", repo.DefaultBranch)
|
||||
d.Set("created", repo.Created)
|
||||
d.Set("updated", repo.Updated)
|
||||
d.Set("created", repo.Created.String())
|
||||
d.Set("updated", repo.Updated.String())
|
||||
d.Set("permission_admin", repo.Permissions.Admin)
|
||||
d.Set("permission_push", repo.Permissions.Push)
|
||||
d.Set("permission_pull", repo.Permissions.Pull)
|
||||
@ -255,7 +311,7 @@ func resourceGiteaRepository() *schema.Resource {
|
||||
Update: resourceRepoUpdate,
|
||||
Delete: respurceRepoDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
State: schema.ImportStatePassthrough,
|
||||
StateContext: schema.ImportStatePassthroughContext,
|
||||
},
|
||||
Schema: map[string]*schema.Schema{
|
||||
"username": {
|
||||
@ -445,6 +501,13 @@ func resourceGiteaRepository() *schema.Resource {
|
||||
Default: false,
|
||||
},
|
||||
"migration_clone_addresse": {
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
Description: "DEPRECATED in favor of `migration_clone_address`",
|
||||
},
|
||||
"migration_clone_address": {
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
@ -513,6 +576,18 @@ func resourceGiteaRepository() *schema.Resource {
|
||||
Optional: true,
|
||||
Default: "",
|
||||
},
|
||||
"clone_url": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"html_url": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"ssh_url": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
Description: "`gitea_repository` manages a gitea repository.\n\n" +
|
||||
"Per default this repository will be initializiled with the provided configuration (gitignore, License etc.).\n" +
|
||||
|
495
gitea/resource_gitea_repository_branch_protection.go
Normal file
495
gitea/resource_gitea_repository_branch_protection.go
Normal file
@ -0,0 +1,495 @@
|
||||
package gitea
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
repoBPUsername string = "username"
|
||||
repoBPName string = "name"
|
||||
repoBPRuleName string = "rule_name"
|
||||
|
||||
repoBPProtectedFilePatterns string = "protected_file_patterns"
|
||||
repoBPUnprotectedFilePatterns string = "unprotected_file_patterns"
|
||||
|
||||
repoBPEnablePush string = "enable_push"
|
||||
repoBPEnablePushWhitelist string = "enable_push_whitelist"
|
||||
repoBPPushWhitelistUsers string = "push_whitelist_users"
|
||||
repoBPPushWhitelistTeams string = "push_whitelist_teams"
|
||||
repoBPPushWhitelistDeployKeys string = "push_whitelist_deploy_keys"
|
||||
|
||||
repoBPRequireSignedCommits string = "require_signed_commits"
|
||||
|
||||
repoBPRequiredApprovals string = "required_approvals"
|
||||
repoBPEnableApprovalWhitelist string = "enable_approval_whitelist"
|
||||
repoBPApprovalWhitelistUsers string = "approval_whitelist_users"
|
||||
repoBPApprovalWhitelistTeams string = "approval_whitelist_teams"
|
||||
repoBPDismissStaleApprovals string = "dismiss_stale_approvals"
|
||||
// not implemented in go-gitea-sdk
|
||||
// repoBPIgnoreStaleApprovals string = "ignore_stale_approvals"
|
||||
|
||||
repoBPEnableStatusCheck string = "enable_status_check"
|
||||
repoBPStatusCheckPatterns string = "status_check_patterns"
|
||||
|
||||
repoBPEnableMergeWhitelist string = "enable_merge_whitelist"
|
||||
repoBPMergeWhitelistUsers string = "merge_whitelist_users"
|
||||
repoBPMergeWhitelistTeams string = "merge_whitelist_teams"
|
||||
|
||||
repoBPBlockMergeOnRejectedReviews string = "block_merge_on_rejected_reviews"
|
||||
repoBPBlockMergeOnOfficialReviewRequests string = "block_merge_on_official_review_requests"
|
||||
repoBPBlockMergeOnOutdatedBranch string = "block_merge_on_outdated_branch"
|
||||
|
||||
repoBPUpdatedAt string = "updated_at"
|
||||
repoBPCreatedAt string = "created_at"
|
||||
)
|
||||
|
||||
func resourceRepositoryBranchProtectionRead(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
user := d.Get(repoBPUsername).(string)
|
||||
repo := d.Get(repoBPName).(string)
|
||||
rule_name := d.Get(repoBPRuleName).(string)
|
||||
|
||||
bp, resp, err := client.GetBranchProtection(user, repo, rule_name)
|
||||
if err != nil {
|
||||
if resp.StatusCode == 404 {
|
||||
d.SetId("")
|
||||
return
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
err = setRepositoryBranchProtectionData(bp, user, repo, d)
|
||||
return err
|
||||
}
|
||||
|
||||
func generateWhitelist(d *schema.ResourceData, listname string) (enabled bool, users []string, teams []string) {
|
||||
u := d.Get(listname + "_users")
|
||||
users = make([]string, 0)
|
||||
if u != nil {
|
||||
for _, element := range u.([]interface{}) {
|
||||
users = append(users, element.(string))
|
||||
}
|
||||
}
|
||||
|
||||
t := d.Get(listname + "_teams")
|
||||
teams = make([]string, 0)
|
||||
if u != nil {
|
||||
for _, element := range t.([]interface{}) {
|
||||
teams = append(teams, element.(string))
|
||||
}
|
||||
}
|
||||
|
||||
if c := len(users) + len(teams); c > 0 {
|
||||
enabled = true
|
||||
}
|
||||
if listname == "push_whitelist" && d.Get(repoBPPushWhitelistDeployKeys).(bool) {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
log.Println("enabled?:", enabled, listname)
|
||||
return enabled, users, teams
|
||||
}
|
||||
|
||||
func resourceRepositoryBranchProtectionCreate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
user := d.Get(repoBPUsername).(string)
|
||||
repo := d.Get(repoBPName).(string)
|
||||
|
||||
enablePushWhitelist, pushWhitelistUsernames, pushWhitelistTeams := generateWhitelist(d, "push_whitelist")
|
||||
enableMergeWhitelist, mergeWhitelistUsernames, mergeWhitelistTeams := generateWhitelist(d, "merge_whitelist")
|
||||
enableApprovalsWhitelist, approvalsWhitelistUsernames, approvalsWhitelistTeams := generateWhitelist(d, "approval_whitelist")
|
||||
|
||||
statusCheckContexts := make([]string, 0)
|
||||
for _, element := range d.Get(repoBPStatusCheckPatterns).([]interface{}) {
|
||||
statusCheckContexts = append(statusCheckContexts, element.(string))
|
||||
}
|
||||
|
||||
log.Println("create_ulist:", pushWhitelistUsernames)
|
||||
|
||||
enableStatusCheck := false
|
||||
if len(statusCheckContexts) > 0 {
|
||||
enableStatusCheck = true
|
||||
}
|
||||
|
||||
bpOption := gitea.CreateBranchProtectionOption{
|
||||
// BranchName is deprecated in gitea, but still required in go-gitea-sdk, therefore using RuleName
|
||||
BranchName: d.Get(repoBPRuleName).(string),
|
||||
RuleName: d.Get(repoBPRuleName).(string),
|
||||
EnablePush: d.Get(repoBPEnablePush).(bool),
|
||||
EnablePushWhitelist: enablePushWhitelist,
|
||||
PushWhitelistUsernames: pushWhitelistUsernames,
|
||||
PushWhitelistTeams: pushWhitelistTeams,
|
||||
PushWhitelistDeployKeys: d.Get(repoBPPushWhitelistDeployKeys).(bool),
|
||||
EnableMergeWhitelist: enableMergeWhitelist,
|
||||
MergeWhitelistUsernames: mergeWhitelistUsernames,
|
||||
MergeWhitelistTeams: mergeWhitelistTeams,
|
||||
EnableStatusCheck: enableStatusCheck,
|
||||
StatusCheckContexts: statusCheckContexts,
|
||||
RequiredApprovals: int64(d.Get(repoBPRequiredApprovals).(int)),
|
||||
EnableApprovalsWhitelist: enableApprovalsWhitelist,
|
||||
ApprovalsWhitelistUsernames: approvalsWhitelistUsernames,
|
||||
ApprovalsWhitelistTeams: approvalsWhitelistTeams,
|
||||
BlockOnRejectedReviews: d.Get(repoBPBlockMergeOnRejectedReviews).(bool),
|
||||
BlockOnOfficialReviewRequests: d.Get(repoBPBlockMergeOnOfficialReviewRequests).(bool),
|
||||
BlockOnOutdatedBranch: d.Get(repoBPBlockMergeOnOutdatedBranch).(bool),
|
||||
DismissStaleApprovals: d.Get(repoBPDismissStaleApprovals).(bool),
|
||||
// IgnoreStaleApprovals: d.Get(repoBPIgnoreStaleApprovals).(bool),
|
||||
RequireSignedCommits: d.Get(repoBPRequireSignedCommits).(bool),
|
||||
ProtectedFilePatterns: d.Get(repoBPProtectedFilePatterns).(string),
|
||||
UnprotectedFilePatterns: d.Get(repoBPUnprotectedFilePatterns).(string),
|
||||
}
|
||||
|
||||
bp, _, err := client.CreateBranchProtection(user, repo, bpOption)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = setRepositoryBranchProtectionData(bp, user, repo, d)
|
||||
return err
|
||||
}
|
||||
|
||||
func resourceRepositoryBranchProtectionUpdate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
user := d.Get(repoBPUsername).(string)
|
||||
repo := d.Get(repoBPName).(string)
|
||||
rule_name := d.Id()
|
||||
|
||||
enablePushWhitelist, pushWhitelistUsernames, pushWhitelistTeams := generateWhitelist(d, "push_whitelist")
|
||||
enableMergeWhitelist, mergeWhitelistUsernames, mergeWhitelistTeams := generateWhitelist(d, "merge_whitelist")
|
||||
enableApprovalsWhitelist, approvalsWhitelistUsernames, approvalsWhitelistTeams := generateWhitelist(d, "approval_whitelist")
|
||||
|
||||
statusCheckContexts := make([]string, 0)
|
||||
for _, element := range d.Get(repoBPStatusCheckPatterns).([]interface{}) {
|
||||
statusCheckContexts = append(statusCheckContexts, element.(string))
|
||||
}
|
||||
|
||||
enablePush := false
|
||||
if enablePushWhitelist == true || d.Get(repoBPEnablePush).(bool) == true {
|
||||
enablePush = true
|
||||
}
|
||||
pushWhitelistDeployKeys := d.Get(repoBPPushWhitelistDeployKeys).(bool)
|
||||
enableStatusCheck := false
|
||||
if len(statusCheckContexts) > 0 {
|
||||
enableStatusCheck = true
|
||||
}
|
||||
requiredApprovals := int64(d.Get(repoBPRequiredApprovals).(int))
|
||||
blockOnRejectedReviews := d.Get(repoBPBlockMergeOnRejectedReviews).(bool)
|
||||
blockOnOfficialReviewRequests := d.Get(repoBPBlockMergeOnOfficialReviewRequests).(bool)
|
||||
blockOnOutdatedBranch := d.Get(repoBPBlockMergeOnOutdatedBranch).(bool)
|
||||
dismissStaleApprovals := d.Get(repoBPDismissStaleApprovals).(bool)
|
||||
// ignoreStaleApprovals := d.Get(repoBPIgnoreStaleApprovals).(bool)
|
||||
requireSignedCommits := d.Get(repoBPRequireSignedCommits).(bool)
|
||||
protectedFilePatterns := d.Get(repoBPProtectedFilePatterns).(string)
|
||||
unprotectedFilePatterns := d.Get(repoBPUnprotectedFilePatterns).(string)
|
||||
|
||||
bpOption := gitea.EditBranchProtectionOption{
|
||||
EnablePush: &enablePush,
|
||||
EnablePushWhitelist: &enablePushWhitelist,
|
||||
PushWhitelistUsernames: pushWhitelistUsernames,
|
||||
PushWhitelistTeams: pushWhitelistTeams,
|
||||
PushWhitelistDeployKeys: &pushWhitelistDeployKeys,
|
||||
EnableMergeWhitelist: &enableMergeWhitelist,
|
||||
MergeWhitelistUsernames: mergeWhitelistUsernames,
|
||||
MergeWhitelistTeams: mergeWhitelistTeams,
|
||||
EnableStatusCheck: &enableStatusCheck,
|
||||
StatusCheckContexts: statusCheckContexts,
|
||||
RequiredApprovals: &requiredApprovals,
|
||||
EnableApprovalsWhitelist: &enableApprovalsWhitelist,
|
||||
ApprovalsWhitelistUsernames: approvalsWhitelistUsernames,
|
||||
ApprovalsWhitelistTeams: approvalsWhitelistTeams,
|
||||
BlockOnRejectedReviews: &blockOnRejectedReviews,
|
||||
BlockOnOfficialReviewRequests: &blockOnOfficialReviewRequests,
|
||||
BlockOnOutdatedBranch: &blockOnOutdatedBranch,
|
||||
DismissStaleApprovals: &dismissStaleApprovals,
|
||||
// IgnoreStaleApprovals: &ignoreStaleApprovals,
|
||||
RequireSignedCommits: &requireSignedCommits,
|
||||
ProtectedFilePatterns: &protectedFilePatterns,
|
||||
UnprotectedFilePatterns: &unprotectedFilePatterns,
|
||||
}
|
||||
|
||||
bp, _, err := client.EditBranchProtection(user, repo, rule_name, bpOption)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = setRepositoryBranchProtectionData(bp, user, repo, d)
|
||||
return err
|
||||
}
|
||||
|
||||
func resourceRepositoryBranchProtectionDelete(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
user := d.Get(repoBPUsername).(string)
|
||||
repo := d.Get(repoBPName).(string)
|
||||
rule_name := d.Id()
|
||||
|
||||
_, err = client.DeleteBranchProtection(user, repo, rule_name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func setRepositoryBranchProtectionData(bp *gitea.BranchProtection, user string, repo string, d *schema.ResourceData) (err error) {
|
||||
d.SetId(bp.RuleName)
|
||||
d.Set(repoBPUsername, user)
|
||||
d.Set(repoBPName, repo)
|
||||
d.Set(repoBPProtectedFilePatterns, bp.ProtectedFilePatterns)
|
||||
d.Set(repoBPUnprotectedFilePatterns, bp.UnprotectedFilePatterns)
|
||||
d.Set(repoBPEnablePush, bp.EnablePush)
|
||||
d.Set(repoBPEnablePushWhitelist, bp.EnablePushWhitelist)
|
||||
d.Set(repoBPPushWhitelistUsers, bp.PushWhitelistUsernames)
|
||||
d.Set(repoBPPushWhitelistTeams, bp.PushWhitelistTeams)
|
||||
d.Set(repoBPPushWhitelistDeployKeys, bp.PushWhitelistDeployKeys)
|
||||
d.Set(repoBPRequireSignedCommits, bp.RequireSignedCommits)
|
||||
d.Set(repoBPRequiredApprovals, bp.RequiredApprovals)
|
||||
d.Set(repoBPEnableApprovalWhitelist, bp.EnableApprovalsWhitelist)
|
||||
d.Set(repoBPApprovalWhitelistUsers, bp.ApprovalsWhitelistUsernames)
|
||||
d.Set(repoBPApprovalWhitelistTeams, bp.ApprovalsWhitelistTeams)
|
||||
d.Set(repoBPDismissStaleApprovals, bp.DismissStaleApprovals)
|
||||
// d.Set(repoBPIgnoreStaleApprovals, bp.IgnoreStaleApprovals)
|
||||
d.Set(repoBPEnableStatusCheck, bp.EnableStatusCheck)
|
||||
d.Set(repoBPStatusCheckPatterns, bp.StatusCheckContexts)
|
||||
d.Set(repoBPEnableMergeWhitelist, bp.EnableMergeWhitelist)
|
||||
d.Set(repoBPMergeWhitelistUsers, bp.MergeWhitelistUsernames)
|
||||
d.Set(repoBPMergeWhitelistTeams, bp.MergeWhitelistTeams)
|
||||
d.Set(repoBPBlockMergeOnRejectedReviews, bp.BlockOnRejectedReviews)
|
||||
d.Set(repoBPBlockMergeOnOfficialReviewRequests, bp.BlockOnOfficialReviewRequests)
|
||||
d.Set(repoBPBlockMergeOnOutdatedBranch, bp.BlockOnOutdatedBranch)
|
||||
d.Set(repoBPUpdatedAt, bp.Updated)
|
||||
d.Set(repoBPCreatedAt, bp.Created)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func resourceGiteaRepositoryBranchProtection() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Read: resourceRepositoryBranchProtectionRead,
|
||||
Create: resourceRepositoryBranchProtectionCreate,
|
||||
Update: resourceRepositoryBranchProtectionUpdate,
|
||||
Delete: resourceRepositoryBranchProtectionDelete,
|
||||
// TODO: importer ?
|
||||
Schema: map[string]*schema.Schema{
|
||||
"username": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "User name or organization name",
|
||||
},
|
||||
"name": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "Repository name",
|
||||
},
|
||||
"rule_name": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "Protected Branch Name Pattern",
|
||||
},
|
||||
"protected_file_patterns": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Default: "",
|
||||
Description: "Protected file patterns (separated using semicolon ';')",
|
||||
},
|
||||
"unprotected_file_patterns": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Default: "",
|
||||
Description: "Unprotected file patterns (separated using semicolon ';')",
|
||||
},
|
||||
"enable_push": {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Default: false,
|
||||
Description: `Anyone with write access will be allowed to push to this branch
|
||||
(but not force push), add a whitelist users or teams to limit
|
||||
access.`,
|
||||
},
|
||||
"enable_push_whitelist": {
|
||||
Type: schema.TypeBool,
|
||||
Computed: true,
|
||||
Description: "True if a push whitelist is used.",
|
||||
},
|
||||
"push_whitelist_users": {
|
||||
Type: schema.TypeList,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
RequiredWith: []string{"enable_push"},
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Description: "Allowlisted users for pushing. Requires enable_push to be set to true.",
|
||||
},
|
||||
"push_whitelist_teams": {
|
||||
Type: schema.TypeList,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
RequiredWith: []string{"enable_push"},
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Description: "Allowlisted teams for pushing. Requires enable_push to be set to true.",
|
||||
},
|
||||
"push_whitelist_deploy_keys": {
|
||||
Type: schema.TypeBool,
|
||||
RequiredWith: []string{"enable_push"},
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Default: false,
|
||||
Description: "Allow deploy keys with write access to push. Requires enable_push to be set to true.",
|
||||
},
|
||||
"require_signed_commits": {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Default: false,
|
||||
Description: "Reject pushes to this branch if they are unsigned or unverifiable.",
|
||||
},
|
||||
"required_approvals": {
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Default: 0,
|
||||
Description: "Allow only to merge pull request with enough positive reviews.",
|
||||
},
|
||||
"enable_approval_whitelist": {
|
||||
Type: schema.TypeBool,
|
||||
Computed: true,
|
||||
Description: "True if a approval whitelist is used.",
|
||||
},
|
||||
"approval_whitelist_users": {
|
||||
Type: schema.TypeList,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Description: `Only reviews from allowlisted users will count to the required
|
||||
approvals. Without approval allowlist, reviews from anyone with
|
||||
write access count to the required approvals.`,
|
||||
},
|
||||
"approval_whitelist_teams": {
|
||||
Type: schema.TypeList,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Description: `Only reviews from allowlisted teams will count to the required
|
||||
approvals. Without approval allowlist, reviews from anyone with
|
||||
write access count to the required approvals.`,
|
||||
},
|
||||
"dismiss_stale_approvals": {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Default: false,
|
||||
Description: `When new commits that change the content of the pull request
|
||||
are pushed to the branch, old approvals will be dismissed.`,
|
||||
},
|
||||
//
|
||||
// not implemented in go-gitea-sdk
|
||||
//
|
||||
// "ignore_stale_approvals": {
|
||||
// Type: schema.TypeBool,
|
||||
// Optional true,
|
||||
// ForceNew: false,
|
||||
// Default: false,
|
||||
// Description: `Do not count approvals that were made on older commits (stale
|
||||
// reviews) towards how many approvals the PR has. Irrelevant if
|
||||
// stale reviews are already dismissed.`,
|
||||
// },
|
||||
"enable_status_check": {
|
||||
Type: schema.TypeBool,
|
||||
Computed: true,
|
||||
Description: `Require status checks to pass before merging. When enabled,
|
||||
commits must first be pushed to another branch, then merged
|
||||
or pushed directly to a branch that matches this rule after
|
||||
status checks have passed. If no contexts are matched, the
|
||||
last commit must be successful regardless of context`,
|
||||
},
|
||||
"status_check_patterns": {
|
||||
Type: schema.TypeList,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Description: `Enter patterns to specify which status checks must pass before
|
||||
branches can be merged into a branch that matches this rule.
|
||||
Each line specifies a pattern. Patterns cannot be empty.`,
|
||||
},
|
||||
"enable_merge_whitelist": {
|
||||
Type: schema.TypeBool,
|
||||
Computed: true,
|
||||
Description: "True if a merge whitelist is used.",
|
||||
},
|
||||
"merge_whitelist_users": {
|
||||
Type: schema.TypeList,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Description: "Allow only allowlisted users to merge pull requests into this branch.",
|
||||
},
|
||||
"merge_whitelist_teams": {
|
||||
Type: schema.TypeList,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Description: "Allow only allowlisted teams to merge pull requests into this branch.",
|
||||
},
|
||||
"block_merge_on_rejected_reviews": {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Default: false,
|
||||
Description: `Merging will not be possible when changes are
|
||||
requested by official reviewers, even if there are enough
|
||||
approvals.`,
|
||||
},
|
||||
"block_merge_on_official_review_requests": {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Default: false,
|
||||
Description: `Merging will not be possible when it has official
|
||||
review requests, even if there are enough approvals.`,
|
||||
},
|
||||
"block_merge_on_outdated_branch": {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Default: false,
|
||||
Description: "Merging will not be possible when head branch is behind base branch.",
|
||||
},
|
||||
"updated_at": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "Webhook creation timestamp",
|
||||
},
|
||||
"created_at": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "Webhook creation timestamp",
|
||||
},
|
||||
},
|
||||
Description: "This resource allows you to create and manage branch protections for repositories.",
|
||||
}
|
||||
}
|
169
gitea/resource_gitea_repository_key.go
Normal file
169
gitea/resource_gitea_repository_key.go
Normal file
@ -0,0 +1,169 @@
|
||||
package gitea
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
deployKeyRepoId string = "repository"
|
||||
deployKeyName string = "title"
|
||||
deployKeyKey string = "key"
|
||||
deployKeyReadOnly string = "read_only"
|
||||
)
|
||||
|
||||
func resourceRepoKeyIdParts(d *schema.ResourceData) (bool, int64, int64, error) {
|
||||
parts := strings.Split(d.Id(), "/")
|
||||
if len(parts) != 2 {
|
||||
return false, 0, 0, nil
|
||||
}
|
||||
|
||||
repoId, err := strconv.ParseInt(parts[0], 10, 64)
|
||||
if err != nil {
|
||||
return false, 0, 0, err
|
||||
}
|
||||
keyId, err := strconv.ParseInt(parts[1], 10, 64)
|
||||
if err != nil {
|
||||
return false, 0, 0, err
|
||||
}
|
||||
return true, repoId, keyId, err
|
||||
}
|
||||
|
||||
func resourceRepoKeyRead(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
hasId, repoId, keyId, err := resourceRepoKeyIdParts(d)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !hasId {
|
||||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
|
||||
repo, resp, err := client.GetRepoByID(repoId)
|
||||
if err != nil {
|
||||
if resp.StatusCode == 404 {
|
||||
d.SetId("")
|
||||
return nil
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
key, resp, err := client.GetDeployKey(repo.Owner.UserName, repo.Name, keyId)
|
||||
if err != nil {
|
||||
if resp.StatusCode == 404 {
|
||||
d.SetId("")
|
||||
return nil
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
err = setRepoKeyResourceData(key, repoId, d)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceRepoKeyCreate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
repo, _, err := client.GetRepoByID(int64(d.Get(deployKeyRepoId).(int)))
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
dk, _, err := client.CreateDeployKey(repo.Owner.UserName, repo.Name, gitea.CreateKeyOption{
|
||||
Title: d.Get(deployKeyName).(string),
|
||||
ReadOnly: d.Get(deployKeyReadOnly).(bool),
|
||||
Key: d.Get(deployKeyKey).(string),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
setRepoKeyResourceData(dk, repo.ID, d)
|
||||
return nil
|
||||
}
|
||||
|
||||
func respurceRepoKeyDelete(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
hasId, repoId, keyId, err := resourceRepoKeyIdParts(d)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !hasId {
|
||||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
|
||||
repo, resp, err := client.GetRepoByID(repoId)
|
||||
if err != nil {
|
||||
if resp.StatusCode == 404 {
|
||||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
client.DeleteDeployKey(repo.Owner.UserName, repo.Name, keyId)
|
||||
return nil
|
||||
}
|
||||
|
||||
func setRepoKeyResourceData(dk *gitea.DeployKey, repoId int64, d *schema.ResourceData) (err error) {
|
||||
d.SetId(fmt.Sprintf("%d/%d", repoId, dk.ID))
|
||||
d.Set(deployKeyRepoId, repoId)
|
||||
d.Set(deployKeyReadOnly, dk.ReadOnly)
|
||||
d.Set(deployKeyKey, dk.Key)
|
||||
d.Set(deployKeyName, dk.Title)
|
||||
return
|
||||
}
|
||||
|
||||
func resourceGiteaRepositoryKey() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Read: resourceRepoKeyRead,
|
||||
Create: resourceRepoKeyCreate,
|
||||
Delete: respurceRepoKeyDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
StateContext: schema.ImportStatePassthroughContext,
|
||||
},
|
||||
Schema: map[string]*schema.Schema{
|
||||
deployKeyRepoId: {
|
||||
Type: schema.TypeInt,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "The ID of the repository where the deploy key belongs to",
|
||||
},
|
||||
deployKeyKey: {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "Armored SSH key to add",
|
||||
},
|
||||
deployKeyReadOnly: {
|
||||
Type: schema.TypeBool,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
ForceNew: true,
|
||||
Description: "Whether this key has read or read/write access",
|
||||
},
|
||||
deployKeyName: {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "Name of the deploy key",
|
||||
},
|
||||
},
|
||||
Description: "`gitea_repository_key` manages a deploy key for a single gitea_repository.\n\n" +
|
||||
"Every key needs a unique name and unique key, i.e. no key can be added twice to the same repo",
|
||||
}
|
||||
}
|
255
gitea/resource_gitea_repository_webhook.go
Normal file
255
gitea/resource_gitea_repository_webhook.go
Normal file
@ -0,0 +1,255 @@
|
||||
package gitea
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
repoWebhookUsername string = "username"
|
||||
repoWebhookName string = "name"
|
||||
repoWebhookType string = "type"
|
||||
repoWebhookUrl string = "url"
|
||||
repoWebhookContentType string = "content_type"
|
||||
repoWebhookSecret string = "secret"
|
||||
repoWebhookAuthorizationHeader string = "authorization_header"
|
||||
repoWebhookEvents string = "events"
|
||||
repoWebhookBranchFilter string = "branch_filter"
|
||||
repoWebhookActive string = "active"
|
||||
repoWebhookCreatedAt string = "created_at"
|
||||
)
|
||||
|
||||
func resourceRepositoryWebhookRead(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
id, err := strconv.ParseInt(d.Id(), 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
user := d.Get(repoWebhookUsername).(string)
|
||||
repo := d.Get(repoWebhookName).(string)
|
||||
|
||||
hook, resp, err := client.GetRepoHook(user, repo, id)
|
||||
if err != nil {
|
||||
if resp.StatusCode == 404 {
|
||||
d.SetId("")
|
||||
return
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
err = setRepositoryWebhookData(hook, d)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceRepositoryWebhookCreate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
user := d.Get(repoWebhookUsername).(string)
|
||||
repo := d.Get(repoWebhookName).(string)
|
||||
|
||||
config := map[string]string{
|
||||
"url": d.Get(repoWebhookUrl).(string),
|
||||
"content_type": d.Get(repoWebhookContentType).(string),
|
||||
}
|
||||
|
||||
secret := d.Get(repoWebhookSecret).(string)
|
||||
if secret != "" {
|
||||
config["secret"] = secret
|
||||
}
|
||||
|
||||
events := make([]string, 0)
|
||||
for _, element := range d.Get(repoWebhookEvents).([]interface{}) {
|
||||
events = append(events, element.(string))
|
||||
}
|
||||
|
||||
hookOption := gitea.CreateHookOption{
|
||||
Type: gitea.HookType(d.Get(repoWebhookType).(string)),
|
||||
Config: config,
|
||||
Events: events,
|
||||
BranchFilter: d.Get(repoWebhookBranchFilter).(string),
|
||||
Active: d.Get(repoWebhookActive).(bool),
|
||||
AuthorizationHeader: d.Get(repoWebhookAuthorizationHeader).(string),
|
||||
}
|
||||
|
||||
hook, _, err := client.CreateRepoHook(user, repo, hookOption)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = setRepositoryWebhookData(hook, d)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceRepositoryWebhookUpdate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
user := d.Get(repoWebhookUsername).(string)
|
||||
repo := d.Get(repoWebhookName).(string)
|
||||
id, err := strconv.ParseInt(d.Id(), 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
config := map[string]string{
|
||||
"url": d.Get(repoWebhookUrl).(string),
|
||||
"content_type": d.Get(repoWebhookContentType).(string),
|
||||
}
|
||||
|
||||
secret := d.Get(repoWebhookSecret).(string)
|
||||
if secret != "" {
|
||||
config["secret"] = secret
|
||||
}
|
||||
|
||||
events := make([]string, 0)
|
||||
for _, element := range d.Get(repoWebhookEvents).([]interface{}) {
|
||||
events = append(events, element.(string))
|
||||
}
|
||||
|
||||
active := d.Get(repoWebhookActive).(bool)
|
||||
|
||||
hookOption := gitea.EditHookOption{
|
||||
Config: config,
|
||||
Events: events,
|
||||
BranchFilter: d.Get(repoWebhookBranchFilter).(string),
|
||||
Active: &active,
|
||||
AuthorizationHeader: d.Get(repoWebhookAuthorizationHeader).(string),
|
||||
}
|
||||
|
||||
_, err = client.EditRepoHook(user, repo, id, hookOption)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
hook, _, err := client.GetRepoHook(user, repo, id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = setRepositoryWebhookData(hook, d)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceRepositoryWebhookDelete(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
user := d.Get(repoWebhookUsername).(string)
|
||||
repo := d.Get(repoWebhookName).(string)
|
||||
id, err := strconv.ParseInt(d.Id(), 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = client.DeleteRepoHook(user, repo, id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func setRepositoryWebhookData(hook *gitea.Hook, d *schema.ResourceData) (err error) {
|
||||
d.SetId(strconv.FormatInt(hook.ID, 10))
|
||||
|
||||
d.Set(repoWebhookUsername, d.Get(repoWebhookUsername).(string))
|
||||
d.Set(repoWebhookName, d.Get(repoWebhookName).(string))
|
||||
d.Set(repoWebhookType, d.Get(repoWebhookType).(string))
|
||||
d.Set(repoWebhookUrl, d.Get(repoWebhookUrl).(string))
|
||||
d.Set(repoWebhookContentType, d.Get(repoWebhookContentType).(string))
|
||||
|
||||
secret := d.Get(repoWebhookSecret).(string)
|
||||
if secret != "" {
|
||||
d.Set(repoWebhookSecret, secret)
|
||||
}
|
||||
|
||||
d.Set(repoWebhookEvents, d.Get(repoWebhookEvents))
|
||||
d.Set(repoWebhookBranchFilter, d.Get(repoWebhookBranchFilter).(string))
|
||||
d.Set(repoWebhookActive, d.Get(repoWebhookActive).(bool))
|
||||
d.Set(repoWebhookCreatedAt, hook.Created)
|
||||
|
||||
authorizationHeader := d.Get(repoWebhookAuthorizationHeader).(string)
|
||||
if authorizationHeader != "" {
|
||||
d.Set(repoWebhookAuthorizationHeader, authorizationHeader)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceGiteaRepositoryWebhook() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Read: resourceRepositoryWebhookRead,
|
||||
Create: resourceRepositoryWebhookCreate,
|
||||
Update: resourceRepositoryWebhookUpdate,
|
||||
Delete: resourceRepositoryWebhookDelete,
|
||||
Schema: map[string]*schema.Schema{
|
||||
"username": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "User name or organization name",
|
||||
},
|
||||
"name": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "Repository name",
|
||||
},
|
||||
"type": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Description: "Webhook type, e.g. `gitea`",
|
||||
},
|
||||
"url": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Description: "Target URL of the webhook",
|
||||
},
|
||||
"content_type": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Description: "The content type of the payload. It can be `json`, or `form`",
|
||||
},
|
||||
"secret": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: "Webhook secret",
|
||||
},
|
||||
"authorization_header": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: "Webhook authorization header",
|
||||
},
|
||||
"events": {
|
||||
Type: schema.TypeList,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
Required: true,
|
||||
Description: "A list of events that will trigger the webhool, e.g. `[\"push\"]`",
|
||||
},
|
||||
"branch_filter": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Description: "Set branch filter on the webhook, e.g. `\"*\"`",
|
||||
},
|
||||
"active": {
|
||||
Type: schema.TypeBool,
|
||||
Required: true,
|
||||
Description: "Set webhook to active, e.g. `true`",
|
||||
},
|
||||
"created_at": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "Webhook creation timestamp",
|
||||
},
|
||||
},
|
||||
Description: "This resource allows you to create and manage webhooks for repositories.",
|
||||
}
|
||||
}
|
@ -1,12 +1,13 @@
|
||||
package gitea
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -17,7 +18,7 @@ const (
|
||||
TeamCreateRepoFlag string = "can_create_repos"
|
||||
TeamIncludeAllReposFlag string = "include_all_repositories"
|
||||
TeamUnits string = "units"
|
||||
TeamMembers string = "members"
|
||||
TeamRepositories string = "repositories"
|
||||
)
|
||||
|
||||
func resourceTeamRead(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
@ -39,7 +40,7 @@ func resourceTeamRead(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
}
|
||||
}
|
||||
|
||||
err = setTeamResourceData(team, d)
|
||||
err = setTeamResourceData(team, d, meta)
|
||||
|
||||
return
|
||||
}
|
||||
@ -75,12 +76,14 @@ func resourceTeamCreate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
units = append(units, gitea.RepoUnitProjects)
|
||||
}
|
||||
|
||||
includeAllRepos := d.Get(TeamIncludeAllReposFlag).(bool)
|
||||
|
||||
opts := gitea.CreateTeamOption{
|
||||
Name: d.Get(TeamName).(string),
|
||||
Description: d.Get(TeamDescription).(string),
|
||||
Permission: gitea.AccessMode(d.Get(TeamPermissions).(string)),
|
||||
CanCreateOrgRepo: d.Get(TeamCreateRepoFlag).(bool),
|
||||
IncludesAllRepositories: d.Get(TeamIncludeAllReposFlag).(bool),
|
||||
IncludesAllRepositories: includeAllRepos,
|
||||
Units: units,
|
||||
}
|
||||
|
||||
@ -90,18 +93,14 @@ func resourceTeamCreate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
users := d.Get(TeamMembers).([]interface{})
|
||||
|
||||
for _, user := range users {
|
||||
if user != "" {
|
||||
_, err = client.AddTeamMember(team.ID, user.(string))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !includeAllRepos {
|
||||
err = setTeamRepositories(team, d, meta, false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
err = setTeamResourceData(team, d)
|
||||
err = setTeamResourceData(team, d, meta)
|
||||
|
||||
return
|
||||
}
|
||||
@ -170,20 +169,16 @@ func resourceTeamUpdate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
users := d.Get(TeamMembers).([]interface{})
|
||||
|
||||
for _, user := range users {
|
||||
if user != "" {
|
||||
_, err = client.AddTeamMember(team.ID, user.(string))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !includeAllRepos {
|
||||
err = setTeamRepositories(team, d, meta, true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
team, _, _ = client.GetTeam(id)
|
||||
|
||||
err = setTeamResourceData(team, d)
|
||||
err = setTeamResourceData(team, d, meta)
|
||||
|
||||
return
|
||||
}
|
||||
@ -208,7 +203,13 @@ func resourceTeamDelete(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func setTeamResourceData(team *gitea.Team, d *schema.ResourceData) (err error) {
|
||||
func setTeamResourceData(team *gitea.Team, d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
if err := client.CheckServerVersionConstraint(">= 1.19.4"); err != nil {
|
||||
d.Set(TeamOrg, d.Get(TeamOrg).(string))
|
||||
} else {
|
||||
d.Set(TeamOrg, team.Organization.UserName)
|
||||
}
|
||||
d.SetId(fmt.Sprintf("%d", team.ID))
|
||||
d.Set(TeamCreateRepoFlag, team.CanCreateOrgRepo)
|
||||
d.Set(TeamDescription, team.Description)
|
||||
@ -216,8 +217,8 @@ func setTeamResourceData(team *gitea.Team, d *schema.ResourceData) (err error) {
|
||||
d.Set(TeamPermissions, string(team.Permission))
|
||||
d.Set(TeamIncludeAllReposFlag, team.IncludesAllRepositories)
|
||||
d.Set(TeamUnits, d.Get(TeamUnits).(string))
|
||||
d.Set(TeamOrg, d.Get(TeamOrg).(string))
|
||||
d.Set(TeamMembers, d.Get(TeamMembers))
|
||||
d.Set(TeamRepositories, d.Get(TeamRepositories))
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@ -228,7 +229,7 @@ func resourceGiteaTeam() *schema.Resource {
|
||||
Update: resourceTeamUpdate,
|
||||
Delete: resourceTeamDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
State: schema.ImportStatePassthrough,
|
||||
StateContext: schema.ImportStatePassthroughContext,
|
||||
},
|
||||
Schema: map[string]*schema.Schema{
|
||||
"name": {
|
||||
@ -280,7 +281,7 @@ func resourceGiteaTeam() *schema.Resource {
|
||||
Description: "List of types of Repositories that should be allowed to be created from Team members.\n" +
|
||||
"Can be `repo.code`, `repo.issues`, `repo.ext_issues`, `repo.wiki`, `repo.pulls`, `repo.releases`, `repo.projects` and/or `repo.ext_wiki`",
|
||||
},
|
||||
"members": {
|
||||
"repositories": {
|
||||
Type: schema.TypeList,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
@ -288,9 +289,67 @@ func resourceGiteaTeam() *schema.Resource {
|
||||
Optional: true,
|
||||
Required: false,
|
||||
Computed: true,
|
||||
Description: "List of Users that should be part of this team",
|
||||
Description: "List of Repositories that should be part of this team",
|
||||
},
|
||||
},
|
||||
Description: "`gitea_team` manages Team that are part of an organisation.",
|
||||
}
|
||||
}
|
||||
|
||||
func setTeamRepositories(team *gitea.Team, d *schema.ResourceData, meta interface{}, update bool) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
org := d.Get(TeamOrg).(string)
|
||||
|
||||
repositories := make(map[string]bool)
|
||||
for _, repo := range d.Get(TeamRepositories).([]interface{}) {
|
||||
if repo != "" {
|
||||
repositories[repo.(string)] = true
|
||||
}
|
||||
}
|
||||
|
||||
if update {
|
||||
page := 1
|
||||
|
||||
for {
|
||||
var existingRepositories []*gitea.Repository
|
||||
existingRepositories, _, err = client.ListTeamRepositories(team.ID, gitea.ListTeamRepositoriesOptions{
|
||||
ListOptions: gitea.ListOptions{
|
||||
Page: page,
|
||||
PageSize: 50,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return errors.New(fmt.Sprintf("[ERROR] Error listeng team repositories: %s", err))
|
||||
}
|
||||
if len(existingRepositories) == 0 {
|
||||
break
|
||||
}
|
||||
|
||||
for _, exr := range existingRepositories {
|
||||
_, exists := repositories[exr.Name]
|
||||
if exists {
|
||||
repositories[exr.Name] = false
|
||||
} else {
|
||||
_, err = client.RemoveTeamRepository(team.ID, org, exr.Name)
|
||||
if err != nil {
|
||||
return errors.New(fmt.Sprintf("[ERROR] Error removing team repository %q: %s", exr.Name, err))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
page += 1
|
||||
}
|
||||
}
|
||||
|
||||
for repo, flag := range repositories {
|
||||
if flag {
|
||||
_, err = client.AddTeamRepository(team.ID, org, repo)
|
||||
if err != nil {
|
||||
return errors.New(fmt.Sprintf("[ERROR] Error adding team repository %q: %s", repo, err))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
150
gitea/resource_gitea_team_members.go
Normal file
150
gitea/resource_gitea_team_members.go
Normal file
@ -0,0 +1,150 @@
|
||||
package gitea
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
membersTeamID string = "team_id"
|
||||
membersTeamMembers string = "members"
|
||||
)
|
||||
|
||||
func getTeamMembers(team_id int, meta interface{}) (membersNames []string, err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
var memberNames []string
|
||||
var members []*gitea.User
|
||||
|
||||
// Get all pages of users
|
||||
page := 1
|
||||
for {
|
||||
// Set options for current page
|
||||
opts := gitea.ListTeamMembersOptions{
|
||||
ListOptions: gitea.ListOptions{Page: page, PageSize: 50},
|
||||
}
|
||||
|
||||
// Get page of team members
|
||||
members, _, err = client.ListTeamMembers(int64(team_id), opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// If no members were returned, we are done
|
||||
if len(members) == 0 {
|
||||
break
|
||||
}
|
||||
|
||||
// Update list of usernames with data from current page
|
||||
for _, m := range members {
|
||||
memberNames = append(memberNames, m.UserName)
|
||||
}
|
||||
|
||||
// Next page
|
||||
page += 1
|
||||
}
|
||||
|
||||
return memberNames, nil
|
||||
}
|
||||
|
||||
func resourceTeamMembersCreate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
team_id := d.Get(membersTeamID).(int)
|
||||
|
||||
var memberNames []string
|
||||
|
||||
// What if team already has member?
|
||||
// What if user is already in the team?
|
||||
// What if user does not exist?
|
||||
|
||||
// Add members to the team
|
||||
for _, name := range d.Get(membersTeamMembers).(*schema.Set).List() {
|
||||
_ , err = client.AddTeamMember(int64(team_id), name.(string))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Update list of usernames of the team members
|
||||
memberNames = append(memberNames, name.(string))
|
||||
}
|
||||
|
||||
err = setTeamMembersData(team_id, memberNames, d)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceTeamMembersRead(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
team_id := d.Get(membersTeamID).(int)
|
||||
|
||||
memberNames, err := getTeamMembers(team_id, meta)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = setTeamMembersData(team_id, memberNames, d)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceTeamMembersDelete(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
team_id := d.Get(membersTeamID).(int)
|
||||
|
||||
var memberNames []string
|
||||
|
||||
memberNames , err = getTeamMembers(team_id, meta)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Delete all memberships
|
||||
for _, username := range memberNames {
|
||||
_, err = client.RemoveTeamMember(int64(team_id), username)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func setTeamMembersData(team_id int, memberNames []string, d *schema.ResourceData) (err error) {
|
||||
d.SetId(fmt.Sprintf("%d", team_id))
|
||||
d.Set(membersTeamID, team_id)
|
||||
d.Set(membersTeamMembers, memberNames)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceGiteaTeamMembers() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Read: resourceTeamMembersRead,
|
||||
Create: resourceTeamMembersCreate,
|
||||
Delete: resourceTeamMembersDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
StateContext: schema.ImportStatePassthroughContext,
|
||||
},
|
||||
Schema: map[string]*schema.Schema{
|
||||
"team_id": {
|
||||
Type: schema.TypeInt,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "The ID of the team.",
|
||||
},
|
||||
"members": {
|
||||
// TypeSet is better than TypeList because
|
||||
// reordering the members will not trigger recreation
|
||||
Type: schema.TypeSet,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "The user names of the members of the team.",
|
||||
},
|
||||
|
||||
},
|
||||
Description: "`gitea_team_members` manages all members of a single team. This resource will be recreated on member changes.",
|
||||
}
|
||||
}
|
111
gitea/resource_gitea_team_membership.go
Normal file
111
gitea/resource_gitea_team_membership.go
Normal file
@ -0,0 +1,111 @@
|
||||
package gitea
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
membershipTeamID string = "team_id"
|
||||
membershipUserName string = "username"
|
||||
)
|
||||
|
||||
func resourceTeamMembershipCreate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
team_id := d.Get(membershipTeamID).(int)
|
||||
username := d.Get(membershipUserName).(string)
|
||||
|
||||
// Create the membership
|
||||
_ , err = client.AddTeamMember(int64(team_id), username)
|
||||
|
||||
// What if the membership exists? Consider error messages
|
||||
// Does this do anything? Will err not be return in the end anyway
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
err = setTeamMembershipData(team_id, username, d)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceTeamMembershipRead(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
var resp *gitea.Response
|
||||
|
||||
team_id := d.Get(membershipTeamID).(int)
|
||||
username := d.Get(membershipUserName).(string)
|
||||
|
||||
// Attempt to get the user from the team. If the user is not a member of the team, this will return a 404
|
||||
_, resp, err = client.GetTeamMember(int64(team_id), username)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// The membership does not exist in Gitea
|
||||
if resp.StatusCode == 404 {
|
||||
// No ID in the resource indicates that it does not exist
|
||||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
|
||||
err = setTeamMembershipData(team_id, username, d)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceTeamMembershipDelete(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
team_id := d.Get(membershipTeamID).(int)
|
||||
username := d.Get(membershipUserName).(string)
|
||||
|
||||
// Delete the membership
|
||||
_, err = client.RemoveTeamMember(int64(team_id), username)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func setTeamMembershipData(team_id int, username string, d *schema.ResourceData) (err error) {
|
||||
// This can't be team or usename only as that would not be unique since the
|
||||
// team can have multiple members and the user can have multiple memberships.
|
||||
d.SetId(fmt.Sprintf("%d_%s", team_id, username))
|
||||
d.Set(membershipTeamID, team_id)
|
||||
d.Set(membershipUserName, username)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceGiteaTeamMembership() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Read: resourceTeamMembershipRead,
|
||||
Create: resourceTeamMembershipCreate,
|
||||
Delete: resourceTeamMembershipDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
StateContext: schema.ImportStatePassthroughContext,
|
||||
},
|
||||
Schema: map[string]*schema.Schema{
|
||||
"team_id": {
|
||||
Type: schema.TypeInt,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "The ID of the team.",
|
||||
},
|
||||
"username": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "The username of the team member.",
|
||||
},
|
||||
},
|
||||
Description: "`gitea_team_membership` manages a single user's membership of a single team.",
|
||||
}
|
||||
}
|
192
gitea/resource_gitea_token.go
Normal file
192
gitea/resource_gitea_token.go
Normal file
@ -0,0 +1,192 @@
|
||||
package gitea
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
TokenName string = "name"
|
||||
TokenHash string = "token"
|
||||
TokenLastEight string = "last_eight"
|
||||
TokenScopes string = "scopes"
|
||||
)
|
||||
|
||||
// validScopes contains the valid scopes for tokens as listed
|
||||
// at https://docs.gitea.com/development/oauth2-provider#scopes
|
||||
var validScopes = map[string]bool{
|
||||
"all": true,
|
||||
"read:activitypub": true,
|
||||
"write:activitypub": true,
|
||||
"read:admin": true,
|
||||
"write:admin": true,
|
||||
"read:issue": true,
|
||||
"write:issue": true,
|
||||
"read:misc": true,
|
||||
"write:misc": true,
|
||||
"read:notification": true,
|
||||
"write:notification": true,
|
||||
"read:organization": true,
|
||||
"write:organization": true,
|
||||
"read:package": true,
|
||||
"write:package": true,
|
||||
"read:repository": true,
|
||||
"write:repository": true,
|
||||
"read:user": true,
|
||||
"write:user": true,
|
||||
}
|
||||
|
||||
func searchTokenById(c *gitea.Client, id int64) (res *gitea.AccessToken, err error) {
|
||||
page := 1
|
||||
|
||||
for {
|
||||
tokens, _, err := c.ListAccessTokens(gitea.ListAccessTokensOptions{
|
||||
ListOptions: gitea.ListOptions{
|
||||
Page: page,
|
||||
PageSize: 50,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(tokens) == 0 {
|
||||
return nil, fmt.Errorf("Token with ID %d could not be found", id)
|
||||
}
|
||||
|
||||
for _, token := range tokens {
|
||||
if token.ID == id {
|
||||
return token, nil
|
||||
}
|
||||
}
|
||||
|
||||
page += 1
|
||||
}
|
||||
}
|
||||
|
||||
func resourceTokenCreate(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
// Create a list of valid scopes. Thrown an error if an invalid scope is found
|
||||
var scopes []gitea.AccessTokenScope
|
||||
for _, s := range d.Get(TokenScopes).(*schema.Set).List() {
|
||||
s := s.(string)
|
||||
if validScopes[s] {
|
||||
scopes = append(scopes, gitea.AccessTokenScope(s))
|
||||
} else {
|
||||
return fmt.Errorf("Invalid token scope: '%s'", s)
|
||||
}
|
||||
}
|
||||
|
||||
opts := gitea.CreateAccessTokenOption{
|
||||
Name: d.Get(TokenName).(string),
|
||||
Scopes: scopes,
|
||||
}
|
||||
|
||||
token, _, err := client.CreateAccessToken(opts)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = setTokenResourceData(token, d)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceTokenRead(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
|
||||
client := meta.(*gitea.Client)
|
||||
|
||||
var token *gitea.AccessToken
|
||||
|
||||
id, err := strconv.ParseInt(d.Id(), 10, 64)
|
||||
|
||||
token, err = searchTokenById(client, id)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = setTokenResourceData(token, d)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceTokenDelete(d *schema.ResourceData, meta interface{}) (err error) {
|
||||
|
||||
client := meta.(*gitea.Client)
|
||||
var resp *gitea.Response
|
||||
|
||||
resp, err = client.DeleteAccessToken(d.Get(TokenName).(string))
|
||||
|
||||
if err != nil {
|
||||
if resp.StatusCode == 404 {
|
||||
return
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func setTokenResourceData(token *gitea.AccessToken, d *schema.ResourceData) (err error) {
|
||||
|
||||
d.SetId(fmt.Sprintf("%d", token.ID))
|
||||
d.Set(TokenName, token.Name)
|
||||
if token.Token != "" {
|
||||
d.Set(TokenHash, token.Token)
|
||||
}
|
||||
d.Set(TokenLastEight, token.TokenLastEight)
|
||||
d.Set(TokenScopes, token.Scopes)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func resourceGiteaToken() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Read: resourceTokenRead,
|
||||
Create: resourceTokenCreate,
|
||||
Delete: resourceTokenDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
StateContext: schema.ImportStatePassthroughContext,
|
||||
},
|
||||
Schema: map[string]*schema.Schema{
|
||||
"name": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "The name of the Access Token",
|
||||
},
|
||||
"token": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Sensitive: true,
|
||||
Description: "The actual Access Token",
|
||||
},
|
||||
"last_eight": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"scopes": {
|
||||
Type: schema.TypeSet,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "List of string representations of scopes for the token",
|
||||
},
|
||||
},
|
||||
Description: "`gitea_token` manages gitea Access Tokens.\n\n" +
|
||||
"Due to upstream limitations (see https://gitea.com/gitea/go-sdk/issues/610) this resource\n" +
|
||||
"can only be used with username/password provider configuration.\n\n" +
|
||||
"WARNING:\n" +
|
||||
"Tokens will be stored in the terraform state!",
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
|
131
go.mod
131
go.mod
@ -1,71 +1,88 @@
|
||||
module code.gitea.io/terraform-provider-gitea
|
||||
|
||||
go 1.17
|
||||
go 1.21
|
||||
|
||||
require (
|
||||
code.gitea.io/sdk/gitea v0.15.1
|
||||
github.com/hashicorp/terraform-plugin-sdk v1.13.0
|
||||
code.gitea.io/sdk/gitea v0.19.0
|
||||
github.com/hashicorp/terraform-plugin-docs v0.19.4
|
||||
github.com/hashicorp/terraform-plugin-log v0.9.0
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.45.1 // indirect
|
||||
github.com/BurntSushi/toml v1.2.1 // indirect
|
||||
github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.2.0 // indirect
|
||||
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
|
||||
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
|
||||
github.com/agext/levenshtein v1.2.2 // indirect
|
||||
github.com/apparentlymart/go-cidr v1.0.1 // indirect
|
||||
github.com/apparentlymart/go-textseg v1.0.0 // indirect
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
|
||||
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
|
||||
github.com/armon/go-radix v1.0.0 // indirect
|
||||
github.com/aws/aws-sdk-go v1.25.3 // indirect
|
||||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
|
||||
github.com/bgentry/speakeasy v0.1.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/fatih/color v1.7.0 // indirect
|
||||
github.com/golang/protobuf v1.3.4 // indirect
|
||||
github.com/google/go-cmp v0.3.1 // indirect
|
||||
github.com/google/uuid v1.1.1 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
|
||||
github.com/hashicorp/go-getter v1.4.0 // indirect
|
||||
github.com/hashicorp/go-hclog v0.9.2 // indirect
|
||||
github.com/hashicorp/go-multierror v1.0.0 // indirect
|
||||
github.com/hashicorp/go-plugin v1.0.1 // indirect
|
||||
github.com/hashicorp/go-safetemp v1.0.0 // indirect
|
||||
github.com/hashicorp/go-uuid v1.0.1 // indirect
|
||||
github.com/hashicorp/go-version v1.4.0 // indirect
|
||||
github.com/hashicorp/golang-lru v0.5.1 // indirect
|
||||
github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.0.0 // indirect
|
||||
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
|
||||
github.com/cloudflare/circl v1.3.7 // indirect
|
||||
github.com/davidmz/go-pageant v1.0.2 // indirect
|
||||
github.com/fatih/color v1.16.0 // indirect
|
||||
github.com/go-fed/httpsig v1.1.0 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/hashicorp/cli v1.1.6 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
|
||||
github.com/hashicorp/go-hclog v1.5.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-plugin v1.6.0 // indirect
|
||||
github.com/hashicorp/go-uuid v1.0.3 // indirect
|
||||
github.com/hashicorp/go-version v1.7.0 // indirect
|
||||
github.com/hashicorp/hc-install v0.7.0 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.20.1 // indirect
|
||||
github.com/hashicorp/logutils v1.0.0 // indirect
|
||||
github.com/hashicorp/terraform-config-inspect v0.0.0-20191115094559-17f92b0546e8 // indirect
|
||||
github.com/hashicorp/terraform-json v0.4.0 // indirect
|
||||
github.com/hashicorp/terraform-plugin-test v1.3.0 // indirect
|
||||
github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596 // indirect
|
||||
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect
|
||||
github.com/mattn/go-colorable v0.1.1 // indirect
|
||||
github.com/mattn/go-isatty v0.0.5 // indirect
|
||||
github.com/mitchellh/cli v1.0.0 // indirect
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
|
||||
github.com/mitchellh/copystructure v1.0.0 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
|
||||
github.com/hashicorp/terraform-exec v0.21.0 // indirect
|
||||
github.com/hashicorp/terraform-json v0.22.1 // indirect
|
||||
github.com/hashicorp/terraform-plugin-go v0.23.0 // indirect
|
||||
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
|
||||
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
|
||||
github.com/hashicorp/yamux v0.1.1 // indirect
|
||||
github.com/huandu/xstrings v1.3.3 // indirect
|
||||
github.com/imdario/mergo v0.3.15 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.9 // indirect
|
||||
github.com/mitchellh/cli v1.1.5 // indirect
|
||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
|
||||
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
|
||||
github.com/mitchellh/mapstructure v1.1.2 // indirect
|
||||
github.com/mitchellh/reflectwalk v1.0.1 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
||||
github.com/oklog/run v1.0.0 // indirect
|
||||
github.com/posener/complete v1.2.1 // indirect
|
||||
github.com/spf13/afero v1.2.2 // indirect
|
||||
github.com/ulikunitz/xz v0.5.5 // indirect
|
||||
github.com/vmihailenco/msgpack v4.0.1+incompatible // indirect
|
||||
github.com/zclconf/go-cty v1.2.1 // indirect
|
||||
github.com/zclconf/go-cty-yaml v1.0.1 // indirect
|
||||
go.opencensus.io v0.22.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect
|
||||
golang.org/x/net v0.0.0-20200301022130-244492dfa37a // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
|
||||
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 // indirect
|
||||
golang.org/x/text v0.3.2 // indirect
|
||||
google.golang.org/api v0.9.0 // indirect
|
||||
google.golang.org/appengine v1.6.1 // indirect
|
||||
google.golang.org/genproto v0.0.0-20200310143817-43be25429f5a // indirect
|
||||
google.golang.org/grpc v1.27.1 // indirect
|
||||
github.com/posener/complete v1.2.3 // indirect
|
||||
github.com/russross/blackfriday v1.6.0 // indirect
|
||||
github.com/shopspring/decimal v1.3.1 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
|
||||
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
|
||||
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
|
||||
github.com/yuin/goldmark v1.7.1 // indirect
|
||||
github.com/yuin/goldmark-meta v1.1.0 // indirect
|
||||
github.com/zclconf/go-cty v1.14.4 // indirect
|
||||
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
|
||||
golang.org/x/crypto v0.23.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
|
||||
golang.org/x/mod v0.17.0 // indirect
|
||||
golang.org/x/net v0.23.0 // indirect
|
||||
golang.org/x/sys v0.20.0 // indirect
|
||||
golang.org/x/text v0.15.0 // indirect
|
||||
golang.org/x/tools v0.13.0 // indirect
|
||||
google.golang.org/appengine v1.6.8 // indirect
|
||||
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
|
||||
google.golang.org/grpc v1.63.2 // indirect
|
||||
google.golang.org/protobuf v1.34.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.3.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
715
go.sum
715
go.sum
@ -1,316 +1,543 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
|
||||
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
||||
cloud.google.com/go v0.45.1 h1:lRi0CHyU+ytlvylOlFKKq0af6JncuyoRh1J+QJBqQx0=
|
||||
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
|
||||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||
code.gitea.io/gitea-vet v0.2.1/go.mod h1:zcNbT/aJEmivCAhfmkHOlT645KNOf9W2KnkLgFjGGfE=
|
||||
code.gitea.io/sdk/gitea v0.12.0 h1:hvDCz4wtFvo7rf5Ebj8tGd4aJ4wLPKX3BKFX9Dk1Pgs=
|
||||
code.gitea.io/sdk/gitea v0.12.0/go.mod h1:z3uwDV/b9Ls47NGukYM9XhnHtqPh/J+t40lsUrR6JDY=
|
||||
code.gitea.io/sdk/gitea v0.15.1 h1:WJreC7YYuxbn0UDaPuWIe/mtiNKTvLN8MLkaw71yx/M=
|
||||
code.gitea.io/sdk/gitea v0.15.1/go.mod h1:klY2LVI3s3NChzIk/MzMn7G1FHrfU7qd63iSMVoHRBA=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
|
||||
code.gitea.io/sdk/gitea v0.16.0 h1:gAfssETO1Hv9QbE+/nhWu7EjoFQYKt6kPoyDytQgw00=
|
||||
code.gitea.io/sdk/gitea v0.16.0/go.mod h1:ndkDk99BnfiUCCYEUhpNzi0lpmApXlwRFqClBlOlEBg=
|
||||
code.gitea.io/sdk/gitea v0.17.0 h1:8JPBss4+Jf7AE1YcfyiGrngTXE8dFSG3si/bypsTH34=
|
||||
code.gitea.io/sdk/gitea v0.17.0/go.mod h1:ndkDk99BnfiUCCYEUhpNzi0lpmApXlwRFqClBlOlEBg=
|
||||
code.gitea.io/sdk/gitea v0.17.1 h1:3jCPOG2ojbl8AcfaUCRYLT5MUcBMFwS0OSK2mA5Zok8=
|
||||
code.gitea.io/sdk/gitea v0.17.1/go.mod h1:aCnBqhHpoEWA180gMbaCtdX9Pl6BWBAuuP2miadoTNM=
|
||||
code.gitea.io/sdk/gitea v0.18.0 h1:+zZrwVmujIrgobt6wVBWCqITz6bn1aBjnCUHmpZrerI=
|
||||
code.gitea.io/sdk/gitea v0.18.0/go.mod h1:IG9xZJoltDNeDSW0qiF2Vqx5orMWa7OhVWrjvrd5NpI=
|
||||
code.gitea.io/sdk/gitea v0.19.0 h1:8I6s1s4RHgzxiPHhOQdgim1RWIRcr0LVMbHBjBFXq4Y=
|
||||
code.gitea.io/sdk/gitea v0.19.0/go.mod h1:IG9xZJoltDNeDSW0qiF2Vqx5orMWa7OhVWrjvrd5NpI=
|
||||
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
|
||||
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/Kunde21/markdownfmt/v3 v3.1.0 h1:KiZu9LKs+wFFBQKhrZJrFZwtLnCCWJahL+S+E/3VnM0=
|
||||
github.com/Kunde21/markdownfmt/v3 v3.1.0/go.mod h1:tPXN1RTyOzJwhfHoon9wUr4HGYmWgVxSQN6VBJDkrVc=
|
||||
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
|
||||
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
|
||||
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
|
||||
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
|
||||
github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g=
|
||||
github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
|
||||
github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk=
|
||||
github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8=
|
||||
github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk=
|
||||
github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA=
|
||||
github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM=
|
||||
github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 h1:KLq8BE0KwCL+mmXnjLWEAOYO+2l2AE4YMmqG1ZpZHBs=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
|
||||
github.com/ProtonMail/go-crypto v1.1.0-alpha.0 h1:nHGfwXmFvJrSR9xu8qL7BkO4DqTHXE9N5vPhgY2I+j0=
|
||||
github.com/ProtonMail/go-crypto v1.1.0-alpha.0/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
|
||||
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg=
|
||||
github.com/ProtonMail/go-crypto v1.1.0-alpha.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
|
||||
github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ=
|
||||
github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=
|
||||
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
|
||||
github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0=
|
||||
github.com/apparentlymart/go-cidr v1.0.1 h1:NmIwLZ/KdsjIUlhf+/Np40atNXm/+lZ5txfTJ/SpF+U=
|
||||
github.com/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc=
|
||||
github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
|
||||
github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I=
|
||||
github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
|
||||
github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0=
|
||||
github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
|
||||
github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec=
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw=
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
|
||||
github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY=
|
||||
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=
|
||||
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM=
|
||||
github.com/aws/aws-sdk-go v1.25.3 h1:uM16hIw9BotjZKMZlX05SN2EFtaWfi/NonPKIARiBLQ=
|
||||
github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas=
|
||||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
|
||||
github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=
|
||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I=
|
||||
github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
|
||||
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
|
||||
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
|
||||
github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I=
|
||||
github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs=
|
||||
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
|
||||
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
|
||||
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
|
||||
github.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454WvHn0=
|
||||
github.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE=
|
||||
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
|
||||
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
|
||||
github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI=
|
||||
github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM=
|
||||
github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
|
||||
github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4=
|
||||
github.com/go-git/go-git/v5 v5.6.1 h1:q4ZRqQl4pR/ZJHc1L5CFjGA1a10u76aV1iC+nh+bHsk=
|
||||
github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68=
|
||||
github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s=
|
||||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||
github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.4 h1:87PNWwrRvUSnqS4dlcBU/ftvOIBep4sYuBLlh6rX2wk=
|
||||
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
|
||||
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4=
|
||||
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/hashicorp/cli v1.1.6 h1:CMOV+/LJfL1tXCOKrgAX0uRKnzjj/mpmqNXloRSy2K8=
|
||||
github.com/hashicorp/cli v1.1.6/go.mod h1:MPon5QYlgjjo0BSoAiN0ESeT5fRzDjVRp+uioJ0piz4=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
||||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU=
|
||||
github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-getter v1.4.0 h1:ENHNi8494porjD0ZhIrjlAHnveSFhY7hvOJrV/fsKkw=
|
||||
github.com/hashicorp/go-getter v1.4.0/go.mod h1:7qxyCd8rBfcShwsvxgIguu4KbS3l8bUCwg2Umn7RjeY=
|
||||
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI=
|
||||
github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI=
|
||||
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||
github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI=
|
||||
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs=
|
||||
github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c=
|
||||
github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-plugin v1.0.1 h1:4OtAfUGbnKC6yS48p0CtMX2oFYtzFZVv6rok3cRWgnE=
|
||||
github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY=
|
||||
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
|
||||
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
|
||||
github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=
|
||||
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E=
|
||||
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk=
|
||||
github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0=
|
||||
github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k=
|
||||
github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4=
|
||||
github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A=
|
||||
github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI=
|
||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
|
||||
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go-version v1.4.0 h1:aAQzgqIrRKRa7w75CKpbBxYsmUoPjzVm1W59ca1L0J4=
|
||||
github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f h1:UdxlrJz4JOnY8W+DbLISwf2B8WXEolNRA8BGCwI9jws=
|
||||
github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w=
|
||||
github.com/hashicorp/hcl/v2 v2.0.0 h1:efQznTz+ydmQXq3BOnRa3AXzvCeTq1P4dKj/z5GLlY8=
|
||||
github.com/hashicorp/hcl/v2 v2.0.0/go.mod h1:oVVDG71tEinNGYCxinCYadcmKU9bglqW9pV3txagJ90=
|
||||
github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
|
||||
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
|
||||
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/hc-install v0.5.2 h1:SfwMFnEXVVirpwkDuSF5kymUOhrUxrTq3udEseZdOD0=
|
||||
github.com/hashicorp/hc-install v0.5.2/go.mod h1:9QISwe6newMWIfEiXpzuu1k9HAGtQYgnSH8H9T8wmoI=
|
||||
github.com/hashicorp/hc-install v0.6.0 h1:fDHnU7JNFNSQebVKYhHZ0va1bC6SrPQ8fpebsvNr2w4=
|
||||
github.com/hashicorp/hc-install v0.6.0/go.mod h1:10I912u3nntx9Umo1VAeYPUUuehk0aRQJYpMwbX5wQA=
|
||||
github.com/hashicorp/hc-install v0.6.1 h1:IGxShH7AVhPaSuSJpKtVi/EFORNjO+OYVJJrAtGG2mY=
|
||||
github.com/hashicorp/hc-install v0.6.1/go.mod h1:0fW3jpg+wraYSnFDJ6Rlie3RvLf1bIqVIkzoon4KoVE=
|
||||
github.com/hashicorp/hc-install v0.6.2 h1:V1k+Vraqz4olgZ9UzKiAcbman9i9scg9GgSt/U3mw/M=
|
||||
github.com/hashicorp/hc-install v0.6.2/go.mod h1:2JBpd+NCFKiHiu/yYCGaPyPHhZLxXTpz8oreHa/a3Ps=
|
||||
github.com/hashicorp/hc-install v0.6.3 h1:yE/r1yJvWbtrJ0STwScgEnCanb0U9v7zp0Gbkmcoxqs=
|
||||
github.com/hashicorp/hc-install v0.6.3/go.mod h1:KamGdbodYzlufbWh4r9NRo8y6GLHWZP2GBtdnms1Ln0=
|
||||
github.com/hashicorp/hc-install v0.6.4 h1:QLqlM56/+SIIGvGcfFiwMY3z5WGXT066suo/v9Km8e0=
|
||||
github.com/hashicorp/hc-install v0.6.4/go.mod h1:05LWLy8TD842OtgcfBbOT0WMoInBMUSHjmDx10zuBIA=
|
||||
github.com/hashicorp/hc-install v0.7.0 h1:Uu9edVqjKQxxuD28mR5TikkKDd/p55S8vzPC1659aBk=
|
||||
github.com/hashicorp/hc-install v0.7.0/go.mod h1:ELmmzZlGnEcqoUMKUuykHaPCIR1sYLYX+KSggWSKZuA=
|
||||
github.com/hashicorp/hcl/v2 v2.17.0 h1:z1XvSUyXd1HP10U4lrLg5e0JMVz6CPaJvAgxM0KNZVY=
|
||||
github.com/hashicorp/hcl/v2 v2.17.0/go.mod h1:gJyW2PTShkJqQBKpAmPO3yxMxIuoXkOF2TpqXzrQyx4=
|
||||
github.com/hashicorp/hcl/v2 v2.18.0 h1:wYnG7Lt31t2zYkcquwgKo6MWXzRUDIeIVU5naZwHLl8=
|
||||
github.com/hashicorp/hcl/v2 v2.18.0/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE=
|
||||
github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI=
|
||||
github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE=
|
||||
github.com/hashicorp/hcl/v2 v2.20.1 h1:M6hgdyz7HYt1UN9e61j+qKJBqR3orTWbI1HKBJEdxtc=
|
||||
github.com/hashicorp/hcl/v2 v2.20.1/go.mod h1:TZDqQ4kNKCbh1iJp99FdPiUaVDDUPivbqxZulxDYqL4=
|
||||
github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=
|
||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
||||
github.com/hashicorp/terraform-config-inspect v0.0.0-20191115094559-17f92b0546e8 h1:+RyjwU+Gnd/aTJBPZVDNm903eXVjjqhbaR4Ypx3xYyY=
|
||||
github.com/hashicorp/terraform-config-inspect v0.0.0-20191115094559-17f92b0546e8/go.mod h1:p+ivJws3dpqbp1iP84+npOyAmTTOLMgCzrXd3GSdn/A=
|
||||
github.com/hashicorp/terraform-json v0.4.0 h1:KNh29iNxozP5adfUFBJ4/fWd0Cu3taGgjHB38JYqOF4=
|
||||
github.com/hashicorp/terraform-json v0.4.0/go.mod h1:eAbqb4w0pSlRmdvl8fOyHAi/+8jnkVYN28gJkSJrLhU=
|
||||
github.com/hashicorp/terraform-plugin-sdk v1.13.0 h1:8v2/ZNiI12OHxEn8pzJ3noCHyRc0biKbKj+iFv5ZWKw=
|
||||
github.com/hashicorp/terraform-plugin-sdk v1.13.0/go.mod h1:HiWIPD/T9HixIhQUwaSoDQxo4BLFdmiBi/Qz5gjB8Q0=
|
||||
github.com/hashicorp/terraform-plugin-test v1.3.0 h1:hU5LoxrOn9qvOo+LTKN6mSav2J+dAMprbdxJPEQvp4U=
|
||||
github.com/hashicorp/terraform-plugin-test v1.3.0/go.mod h1:QIJHYz8j+xJtdtLrFTlzQVC0ocr3rf/OjIpgZLK56Hs=
|
||||
github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596 h1:hjyO2JsNZUKT1ym+FAdlBEkGPevazYsmVgIMw7dVELg=
|
||||
github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg=
|
||||
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
|
||||
github.com/hashicorp/terraform-exec v0.18.1 h1:LAbfDvNQU1l0NOQlTuudjczVhHj061fNX5H8XZxHlH4=
|
||||
github.com/hashicorp/terraform-exec v0.18.1/go.mod h1:58wg4IeuAJ6LVsLUeD2DWZZoc/bYi6dzhLHzxM41980=
|
||||
github.com/hashicorp/terraform-exec v0.19.0 h1:FpqZ6n50Tk95mItTSS9BjeOVUb4eg81SpgVtZNNtFSM=
|
||||
github.com/hashicorp/terraform-exec v0.19.0/go.mod h1:tbxUpe3JKruE9Cuf65mycSIT8KiNPZ0FkuTE3H4urQg=
|
||||
github.com/hashicorp/terraform-exec v0.20.0 h1:DIZnPsqzPGuUnq6cH8jWcPunBfY+C+M8JyYF3vpnuEo=
|
||||
github.com/hashicorp/terraform-exec v0.20.0/go.mod h1:ckKGkJWbsNqFKV1itgMnE0hY9IYf1HoiekpuN0eWoDw=
|
||||
github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVWkd/RG0D2XQ=
|
||||
github.com/hashicorp/terraform-exec v0.21.0/go.mod h1:1PPeMYou+KDUSSeRE9szMZ/oHf4fYUmB923Wzbq1ICg=
|
||||
github.com/hashicorp/terraform-json v0.17.1 h1:eMfvh/uWggKmY7Pmb3T85u86E2EQg6EQHgyRwf3RkyA=
|
||||
github.com/hashicorp/terraform-json v0.17.1/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o=
|
||||
github.com/hashicorp/terraform-json v0.18.0 h1:pCjgJEqqDESv4y0Tzdqfxr/edOIGkjs8keY42xfNBwU=
|
||||
github.com/hashicorp/terraform-json v0.18.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk=
|
||||
github.com/hashicorp/terraform-json v0.20.0 h1:cJcvn4gIOTi0SD7pIy+xiofV1zFA3hza+6K+fo52IX8=
|
||||
github.com/hashicorp/terraform-json v0.20.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk=
|
||||
github.com/hashicorp/terraform-json v0.21.0 h1:9NQxbLNqPbEMze+S6+YluEdXgJmhQykRyRNd+zTI05U=
|
||||
github.com/hashicorp/terraform-json v0.21.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk=
|
||||
github.com/hashicorp/terraform-json v0.22.1 h1:xft84GZR0QzjPVWs4lRUwvTcPnegqlyS7orfb5Ltvec=
|
||||
github.com/hashicorp/terraform-json v0.22.1/go.mod h1:JbWSQCLFSXFFhg42T7l9iJwdGXBYV8fmmD6o/ML4p3A=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.16.0 h1:UmxFr3AScl6Wged84jndJIfFccGyBZn52KtMNsS12dI=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.16.0/go.mod h1:M3ZrlKBJAbPMtNOPwHicGi1c+hZUh7/g0ifT/z7TVfA=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.17.0 h1:H1Yc+bgB//Geau5g7YKkhG5v9tghI3vplfIYTOl85Uw=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.17.0/go.mod h1:cKC8GSLE+0a0bi7LtlpXgrqnlRDCGoGDn15PTEA+Ang=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.18.0 h1:2bINhzXc+yDeAcafurshCrIjtdu1XHn9zZ3ISuEhgpk=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.18.0/go.mod h1:iIUfaJpdUmpi+rI42Kgq+63jAjI8aZVTyxp3Bvk9Hg8=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.19.2 h1:YjdKa1vuqt9EnPYkkrv9HnGZz175HhSJ7Vsn8yZeWus=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.19.2/go.mod h1:gad2aP6uObFKhgNE8DR9nsEuEQnibp7il0jZYYOunWY=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.19.3 h1:xoxpeIuBfnoGxXY0dTajdj4GjEv6TihZdj0lHNXbKew=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.19.3/go.mod h1:4pLASsatTmRynVzsjEhbXZ6s7xBlUw/2Kt0zfrq8HxA=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.19.4 h1:G3Bgo7J22OMtegIgn8Cd/CaSeyEljqjH3G39w28JK4c=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.19.4/go.mod h1:4pLASsatTmRynVzsjEhbXZ6s7xBlUw/2Kt0zfrq8HxA=
|
||||
github.com/hashicorp/terraform-plugin-go v0.16.0 h1:DSOQ0rz5FUiVO4NUzMs8ln9gsPgHMTsfns7Nk+6gPuE=
|
||||
github.com/hashicorp/terraform-plugin-go v0.16.0/go.mod h1:4sn8bFuDbt+2+Yztt35IbOrvZc0zyEi87gJzsTgCES8=
|
||||
github.com/hashicorp/terraform-plugin-go v0.19.0 h1:BuZx/6Cp+lkmiG0cOBk6Zps0Cb2tmqQpDM3iAtnhDQU=
|
||||
github.com/hashicorp/terraform-plugin-go v0.19.0/go.mod h1:EhRSkEPNoylLQntYsk5KrDHTZJh9HQoumZXbOGOXmec=
|
||||
github.com/hashicorp/terraform-plugin-go v0.20.0 h1:oqvoUlL+2EUbKNsJbIt3zqqZ7wi6lzn4ufkn/UA51xQ=
|
||||
github.com/hashicorp/terraform-plugin-go v0.20.0/go.mod h1:Rr8LBdMlY53a3Z/HpP+ZU3/xCDqtKNCkeI9qOyT10QE=
|
||||
github.com/hashicorp/terraform-plugin-go v0.21.0 h1:VSjdVQYNDKR0l2pi3vsFK1PdMQrw6vGOshJXMNFeVc0=
|
||||
github.com/hashicorp/terraform-plugin-go v0.21.0/go.mod h1:piJp8UmO1uupCvC9/H74l2C6IyKG0rW4FDedIpwW5RQ=
|
||||
github.com/hashicorp/terraform-plugin-go v0.22.0 h1:1OS1Jk5mO0f5hrziWJGXXIxBrMe2j/B8E+DVGw43Xmc=
|
||||
github.com/hashicorp/terraform-plugin-go v0.22.0/go.mod h1:mPULV91VKss7sik6KFEcEu7HuTogMLLO/EvWCuFkRVE=
|
||||
github.com/hashicorp/terraform-plugin-go v0.23.0 h1:AALVuU1gD1kPb48aPQUjug9Ir/125t+AAurhqphJ2Co=
|
||||
github.com/hashicorp/terraform-plugin-go v0.23.0/go.mod h1:1E3Cr9h2vMlahWMbsSEcNrOCxovCZhOOIXjFHbjc/lQ=
|
||||
github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0=
|
||||
github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0 h1:I8efBnjuDrgPjNF1MEypHy48VgcTIUY4X6rOFunrR3Y=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0/go.mod h1:cUEP4ly/nxlHy5HzD6YRrHydtlheGvGRJDhiWqqVik4=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 h1:wcOKYwPI9IorAJEBLzgclh3xVolO7ZorYd6U1vnok14=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0/go.mod h1:qH/34G25Ugdj5FcM95cSoXzUgIbgfhVLXCcEcYaMwq8=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0 h1:X7vB6vn5tON2b49ILa4W7mFAsndeqJ7bZFOGbVO+0Cc=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0/go.mod h1:ydFcxbdj6klCqYEPkPvdvFKiNGKZLUs+896ODUXCyao=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.31.0 h1:Bl3e2ei2j/Z3Hc2HIS15Gal2KMKyLAZ2om1HCEvK6es=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.31.0/go.mod h1:i2C41tszDjiWfziPQDL5R/f3Zp0gahXe5No/MIO9rCE=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0 h1:7xdO9aOXVmhvMxNAq8UloyyqW0EEzyAY37llSTHJgjo=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0/go.mod h1:LxQzs7AQl/5JE1IGFd6LX8E4A0InRJ/7s245gOmsejA=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh3R4yp6pKksKHcqZx5G8=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 h1:kJiWGx2kiQVo97Y5IOGR4EMcZ8DtMswHhUuFibsCQQE=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0/go.mod h1:sl/UoabMc37HA6ICVMmGO+/0wofkVIRxf+BMb/dnoIg=
|
||||
github.com/hashicorp/terraform-registry-address v0.2.1 h1:QuTf6oJ1+WSflJw6WYOHhLgwUiQ0FrROpHPYFtwTYWM=
|
||||
github.com/hashicorp/terraform-registry-address v0.2.1/go.mod h1:BSE9fIFzp0qWsJUUyGquo4ldV9k2n+psif6NYkBRS3Y=
|
||||
github.com/hashicorp/terraform-registry-address v0.2.2 h1:lPQBg403El8PPicg/qONZJDC6YlgCVbWDtNmmZKtBno=
|
||||
github.com/hashicorp/terraform-registry-address v0.2.2/go.mod h1:LtwNbCihUoUZ3RYriyS2wF/lGPB6gF9ICLRtuDk7hSo=
|
||||
github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI=
|
||||
github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM=
|
||||
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=
|
||||
github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc=
|
||||
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ=
|
||||
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
|
||||
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
|
||||
github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
|
||||
github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw=
|
||||
github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
|
||||
github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4=
|
||||
github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
|
||||
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
|
||||
github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk=
|
||||
github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg=
|
||||
github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM=
|
||||
github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
|
||||
github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE=
|
||||
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg=
|
||||
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw=
|
||||
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ=
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
|
||||
github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mitchellh/cli v1.1.5 h1:OxRIeJXpAMztws/XHlN2vu6imG5Dpq+j61AzAX5fLng=
|
||||
github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4=
|
||||
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
||||
github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=
|
||||
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
||||
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
|
||||
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
|
||||
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
|
||||
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
|
||||
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
|
||||
github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4=
|
||||
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
|
||||
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
||||
github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE=
|
||||
github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
||||
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
|
||||
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
||||
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
|
||||
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||
github.com/posener/complete v1.2.1 h1:LrvDIY//XNo65Lq84G/akBuMGlawHvGBABv8f/ZN6DI=
|
||||
github.com/posener/complete v1.2.1/go.mod h1:6gapUrK/U1TAN7ciCoNRIdVC5sbdBTUh1DKN0g6uH7E=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=
|
||||
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
|
||||
github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo=
|
||||
github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
|
||||
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
|
||||
github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww=
|
||||
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
|
||||
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
|
||||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||
github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
|
||||
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||
github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0=
|
||||
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
|
||||
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok=
|
||||
github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=
|
||||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
|
||||
github.com/vmihailenco/msgpack v4.0.1+incompatible h1:RMF1enSPeKTlXrXdOcqjFUElywVZjjC6pqse21bKbEU=
|
||||
github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
|
||||
github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI=
|
||||
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
|
||||
github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU=
|
||||
github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
|
||||
github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8=
|
||||
github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok=
|
||||
github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
|
||||
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
|
||||
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
|
||||
github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
|
||||
github.com/zclconf/go-cty v1.2.1 h1:vGMsygfmeCl4Xb6OA5U5XVAaQZ69FvoG7X2jUtQujb8=
|
||||
github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8=
|
||||
github.com/zclconf/go-cty-yaml v1.0.1 h1:up11wlgAaDvlAGENcFDnZgkn0qUJurso7k6EpURKNF8=
|
||||
github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/goldmark v1.6.0 h1:boZcn2GTjpsynOsC0iJHnBWa4Bi0qzfJjthwauItG68=
|
||||
github.com/yuin/goldmark v1.6.0/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/goldmark v1.7.1 h1:3bajkSilaCbjdKVsKdZjZCLBNPL9pYzrCakKaf4U49U=
|
||||
github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
|
||||
github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc=
|
||||
github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0=
|
||||
github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0=
|
||||
github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0=
|
||||
github.com/zclconf/go-cty v1.14.0 h1:/Xrd39K7DXbHzlisFP9c4pHao4yyf+/Ug9LEz+Y/yhc=
|
||||
github.com/zclconf/go-cty v1.14.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
|
||||
github.com/zclconf/go-cty v1.14.1 h1:t9fyA35fwjjUMcmL5hLER+e/rEPqrbCK1/OSE4SI9KA=
|
||||
github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
|
||||
github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI=
|
||||
github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
|
||||
github.com/zclconf/go-cty v1.14.4 h1:uXXczd9QDGsgu0i/QFR/hzI5NYCHLf6NQw/atrbnhq8=
|
||||
github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
|
||||
go.abhg.dev/goldmark/frontmatter v0.2.0 h1:P8kPG0YkL12+aYk2yU3xHv4tcXzeVnN+gU0tJ5JnxRw=
|
||||
go.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px76YjkOzhB4YlU=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 h1:7KByu05hhLed2MO29w7p1XfZvZ13m8mub3shuVftRs0=
|
||||
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
||||
golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
||||
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
||||
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
|
||||
golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM=
|
||||
golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I=
|
||||
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
|
||||
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
||||
golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA=
|
||||
golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g=
|
||||
golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
|
||||
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
||||
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
|
||||
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
||||
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
|
||||
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
||||
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
|
||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
||||
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
|
||||
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
|
||||
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
|
||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME=
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU=
|
||||
golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
|
||||
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
|
||||
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
|
||||
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
|
||||
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
|
||||
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0=
|
||||
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU=
|
||||
golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ=
|
||||
golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY=
|
||||
golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
|
||||
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
|
||||
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
|
||||
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
|
||||
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
|
||||
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
|
||||
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
|
||||
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
|
||||
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So=
|
||||
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
|
||||
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
|
||||
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
|
||||
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
|
||||
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
|
||||
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
|
||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
|
||||
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
|
||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200325010219-a49f79bcc224/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
|
||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
||||
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
google.golang.org/api v0.9.0 h1:jbyannxz0XFD3zdjgrSUsaJbgpH4eTrkdhRChkHPfO8=
|
||||
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I=
|
||||
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200310143817-43be25429f5a h1:lRlI5zu6AFy3iU/F8YWyNrAmn/tPCnhiTxfwhWb76eU=
|
||||
google.golang.org/genproto v0.0.0-20200310143817-43be25429f5a/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk=
|
||||
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
|
||||
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
|
||||
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
|
||||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
|
||||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
|
||||
google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M=
|
||||
google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk=
|
||||
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 h1:SeZZZx0cP0fqUyA+oRzP9k7cSwJlvDFiROO72uwD6i0=
|
||||
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk=
|
||||
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ=
|
||||
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY=
|
||||
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY=
|
||||
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 h1:6GQBEOdGkX6MMTLT9V+TjtIRZCw9VPD5Z+yHY9wMgS0=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY=
|
||||
google.golang.org/grpc v1.56.0 h1:+y7Bs8rtMd07LeXmL3NxcTLn7mUkbKZqEpPhMNkwJEE=
|
||||
google.golang.org/grpc v1.56.0/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
|
||||
google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw=
|
||||
google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=
|
||||
google.golang.org/grpc v1.57.1 h1:upNTNqv0ES+2ZOOqACwVtS3Il8M12/+Hz41RCPzAjQg=
|
||||
google.golang.org/grpc v1.57.1/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=
|
||||
google.golang.org/grpc v1.60.0 h1:6FQAR0kM31P6MRdeluor2w2gPaS4SVNrD/DNTxrQ15k=
|
||||
google.golang.org/grpc v1.60.0/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM=
|
||||
google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0=
|
||||
google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs=
|
||||
google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY=
|
||||
google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs=
|
||||
google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM=
|
||||
google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
|
||||
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
||||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
|
||||
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4=
|
||||
google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
6
main.go
6
main.go
@ -1,10 +1,12 @@
|
||||
package main // import "src.techknowlogick.com/terraform-provider-gitea"
|
||||
package main // import "code.gitea.ioterraform-provider-gitea"
|
||||
|
||||
import (
|
||||
"code.gitea.io/terraform-provider-gitea/gitea"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/plugin"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
|
||||
)
|
||||
|
||||
var Version = "development"
|
||||
|
||||
func main() {
|
||||
plugin.Serve(&plugin.ServeOpts{
|
||||
ProviderFunc: gitea.Provider})
|
||||
|
6
renovate.json5
Normal file
6
renovate.json5
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"local>gitea/renovate-config"
|
||||
]
|
||||
}
|
23
scripts/docker-compose.yaml
Normal file
23
scripts/docker-compose.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
version: "3"
|
||||
|
||||
networks:
|
||||
gitea:
|
||||
external: false
|
||||
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:1.22.1
|
||||
container_name: gitea
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
- DISABLE_GIT_HOOKS=false
|
||||
restart: always
|
||||
networks:
|
||||
- gitea
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "222:22"
|
29
tests/branch_protection.tf
Normal file
29
tests/branch_protection.tf
Normal file
@ -0,0 +1,29 @@
|
||||
resource "gitea_repository_branch_protection" "bp" {
|
||||
username = var.repo_user_name
|
||||
name = var.repo_name
|
||||
rule_name = var.rule_name
|
||||
protected_file_patterns = var.protected_file_patterns
|
||||
unprotected_file_patterns = var.unprotected_file_patterns
|
||||
enable_push = var.enable_push
|
||||
push_whitelist_users = var.push_whitelist_users
|
||||
push_whitelist_teams = var.push_whitelist_teams
|
||||
push_whitelist_deploy_keys = var.push_whitelist_deploy_keys
|
||||
require_signed_commits = var.require_signed_commits
|
||||
required_approvals = var.required_approvals
|
||||
approval_whitelist_users = var.approval_whitelist_users
|
||||
approval_whitelist_teams = var.approval_whitelist_teams
|
||||
dismiss_stale_approvals = var.dismiss_stale_approvals
|
||||
status_check_patterns = var.status_check_patterns
|
||||
merge_whitelist_users = var.merge_whitelist_users
|
||||
merge_whitelist_teams = var.merge_whitelist_teams
|
||||
block_merge_on_rejected_reviews = var.block_merge_on_rejected_reviews
|
||||
block_merge_on_official_review_requests = var.block_merge_on_official_review_requests
|
||||
block_merge_on_outdated_branch = var.block_merge_on_outdated_branch
|
||||
}
|
||||
|
||||
# //
|
||||
# // not implemented in go-gitea-sdk
|
||||
# //
|
||||
# // "ignore_stale_approvals": {
|
||||
# // Description: `Do not count approvals that were made on older commits (stale reviews) towards how many approvals the PR has. Irrelevant if stale reviews are already dismissed.`,
|
||||
# // },
|
306
tests/branch_protection.tftest.hcl
Normal file
306
tests/branch_protection.tftest.hcl
Normal file
@ -0,0 +1,306 @@
|
||||
# run "create_org" {
|
||||
# assert {
|
||||
# condition = gitea_org.test_org.name == var.org_name
|
||||
# error_message = "${gitea_org.test_org.name} not eq ${var.org_name}"
|
||||
# }
|
||||
# }
|
||||
#
|
||||
# run "create_repo" {
|
||||
# assert {
|
||||
# condition = gitea_repository.org_repo.name == var.repo_name
|
||||
# error_message = "${gitea_repository.org_repo.name} not eq ${var.repo_name}"
|
||||
# }
|
||||
# }
|
||||
|
||||
# run "create_user" {
|
||||
# assert {
|
||||
# condition = gitea_user.test_user.username == var.user_name
|
||||
# error_message = "${gitea_user.test_user.username} not eq ${var.user_name}"
|
||||
# }
|
||||
# }
|
||||
#
|
||||
# run "create_user_repo" {
|
||||
# assert {
|
||||
# condition = gitea_repository.user_repo.name == var.repo_name
|
||||
# error_message = "${gitea_repository.user_repo.name} not eq ${var.repo_name}"
|
||||
# }
|
||||
# }
|
||||
|
||||
run "setup" {
|
||||
module {
|
||||
source = "./setup"
|
||||
}
|
||||
}
|
||||
|
||||
run "apply_defaults" {
|
||||
variables {
|
||||
rule_name = "apply_defaults"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.name == var.repo_name
|
||||
error_message = "${gitea_repository_branch_protection.bp.name} not eq ${var.repo_name}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.username == var.user_name
|
||||
error_message = "${gitea_repository_branch_protection.bp.username} not eq ${var.user_name}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.rule_name == var.rule_name
|
||||
error_message = "${gitea_repository_branch_protection.bp.rule_name} not eq ${var.rule_name}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.protected_file_patterns == var.protected_file_patterns
|
||||
error_message = "${gitea_repository_branch_protection.bp.protected_file_patterns} not eq ${var.protected_file_patterns}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.unprotected_file_patterns == var.unprotected_file_patterns
|
||||
error_message = "${gitea_repository_branch_protection.bp.unprotected_file_patterns} not eq ${var.unprotected_file_patterns}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.enable_push == var.enable_push
|
||||
error_message = "${gitea_repository_branch_protection.bp.enable_push} not eq ${var.enable_push}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.push_whitelist_users == var.push_whitelist_users
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.push_whitelist_users)} not eq ${join(",", var.push_whitelist_users)}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.push_whitelist_teams == var.push_whitelist_teams
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.push_whitelist_teams)} not eq ${join(",", var.push_whitelist_teams)}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.push_whitelist_deploy_keys == var.push_whitelist_deploy_keys
|
||||
error_message = "${gitea_repository_branch_protection.bp.push_whitelist_deploy_keys} not eq ${var.push_whitelist_deploy_keys}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.require_signed_commits == var.require_signed_commits
|
||||
error_message = "${gitea_repository_branch_protection.bp.require_signed_commits} not eq ${var.require_signed_commits}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.required_approvals == var.required_approvals
|
||||
error_message = "${gitea_repository_branch_protection.bp.required_approvals} not eq ${var.required_approvals}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.approval_whitelist_users == var.approval_whitelist_users
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.approval_whitelist_users)} not eq ${join(",", var.approval_whitelist_users)}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.approval_whitelist_teams == var.approval_whitelist_teams
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.approval_whitelist_teams)} not eq ${join(",", var.approval_whitelist_teams)}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.dismiss_stale_approvals == var.dismiss_stale_approvals
|
||||
error_message = "${gitea_repository_branch_protection.bp.dismiss_stale_approvals} not eq ${var.dismiss_stale_approvals}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.status_check_patterns == var.status_check_patterns
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.status_check_patterns)} not eq ${join(",", var.status_check_patterns)}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.merge_whitelist_users == var.merge_whitelist_users
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.merge_whitelist_users)} not eq ${join(",", var.merge_whitelist_users)}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.merge_whitelist_teams == var.merge_whitelist_teams
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.merge_whitelist_teams)} not eq ${join(",", var.merge_whitelist_teams)}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.block_merge_on_rejected_reviews == var.block_merge_on_rejected_reviews
|
||||
error_message = "${gitea_repository_branch_protection.bp.block_merge_on_rejected_reviews} not eq ${var.block_merge_on_rejected_reviews}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.block_merge_on_official_review_requests == var.block_merge_on_official_review_requests
|
||||
error_message = "${gitea_repository_branch_protection.bp.block_merge_on_official_review_requests} not eq ${var.block_merge_on_official_review_requests}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.block_merge_on_outdated_branch == var.block_merge_on_outdated_branch
|
||||
error_message = "${gitea_repository_branch_protection.bp.block_merge_on_outdated_branch} not eq ${var.block_merge_on_outdated_branch}"
|
||||
}
|
||||
}
|
||||
|
||||
run "simple_params" {
|
||||
variables {
|
||||
rule_name = "simple_params"
|
||||
protected_file_patterns = "foobar.yaml"
|
||||
unprotected_file_patterns = "foobar.yaml"
|
||||
require_signed_commits = true
|
||||
required_approvals = 10
|
||||
dismiss_stale_approvals = true
|
||||
block_merge_on_rejected_reviews = true
|
||||
block_merge_on_official_review_requests = true
|
||||
block_merge_on_outdated_branch = true
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.protected_file_patterns == var.protected_file_patterns
|
||||
error_message = "${gitea_repository_branch_protection.bp.protected_file_patterns} not eq ${var.protected_file_patterns}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.unprotected_file_patterns == var.unprotected_file_patterns
|
||||
error_message = "${gitea_repository_branch_protection.bp.unprotected_file_patterns} not eq ${var.unprotected_file_patterns}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.require_signed_commits == var.require_signed_commits
|
||||
error_message = "${gitea_repository_branch_protection.bp.require_signed_commits} not eq ${var.require_signed_commits}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.required_approvals == var.required_approvals
|
||||
error_message = "${gitea_repository_branch_protection.bp.required_approvals} not eq ${var.required_approvals}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.dismiss_stale_approvals == var.dismiss_stale_approvals
|
||||
error_message = "${gitea_repository_branch_protection.bp.dismiss_stale_approvals} not eq ${var.dismiss_stale_approvals}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.block_merge_on_rejected_reviews == var.block_merge_on_rejected_reviews
|
||||
error_message = "${gitea_repository_branch_protection.bp.block_merge_on_rejected_reviews} not eq ${var.block_merge_on_rejected_reviews}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.block_merge_on_official_review_requests == var.block_merge_on_official_review_requests
|
||||
error_message = "${gitea_repository_branch_protection.bp.block_merge_on_official_review_requests} not eq ${var.block_merge_on_official_review_requests}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.block_merge_on_outdated_branch == var.block_merge_on_outdated_branch
|
||||
error_message = "${gitea_repository_branch_protection.bp.block_merge_on_outdated_branch} not eq ${var.block_merge_on_outdated_branch}"
|
||||
}
|
||||
}
|
||||
|
||||
run "enable_push" {
|
||||
variables {
|
||||
rule_name = "enable_push"
|
||||
enable_push = true
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.enable_push == var.enable_push
|
||||
error_message = "${gitea_repository_branch_protection.bp.enable_push} not eq ${var.enable_push}"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.enable_push_whitelist == false
|
||||
error_message = "${gitea_repository_branch_protection.bp.enable_push_whitelist} not eq `false`"
|
||||
}
|
||||
}
|
||||
|
||||
run "implicit_push_whitelist_with_users" {
|
||||
variables {
|
||||
enable_push = true
|
||||
rule_name = "implicit_and_push_whitelist_with_users"
|
||||
push_whitelist_users = ["test_user"]
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.enable_push_whitelist == true
|
||||
error_message = "${gitea_repository_branch_protection.bp.enable_push_whitelist} not eq `true`"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.push_whitelist_users == tolist(var.push_whitelist_users)
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.push_whitelist_users)} not eq ${join(",", var.push_whitelist_users)}"
|
||||
}
|
||||
}
|
||||
|
||||
run "implicit_push_whitelist_with_teams" {
|
||||
variables {
|
||||
rule_name = "implicit_and_push_whitelist_with_teams"
|
||||
repo_user_name = "test-org"
|
||||
enable_push = true
|
||||
push_whitelist_teams = ["Owners"]
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.enable_push_whitelist == true
|
||||
error_message = "${gitea_repository_branch_protection.bp.enable_push_whitelist} not eq `true`"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.push_whitelist_teams == tolist(var.push_whitelist_teams)
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.push_whitelist_teams)} not eq ${join(",", var.push_whitelist_teams)}"
|
||||
}
|
||||
}
|
||||
|
||||
run "implicit_push_whitelist_with_deploy_keys" {
|
||||
variables {
|
||||
rule_name = "implicit_push_whitelist_with_deploy_keys"
|
||||
enable_push = true
|
||||
push_whitelist_deploy_keys = true
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.enable_push_whitelist == true
|
||||
error_message = "${gitea_repository_branch_protection.bp.enable_push_whitelist} not eq `true`"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.push_whitelist_deploy_keys == var.push_whitelist_deploy_keys
|
||||
error_message = "${gitea_repository_branch_protection.bp.push_whitelist_deploy_keys} not eq ${var.push_whitelist_deploy_keys}"
|
||||
}
|
||||
}
|
||||
|
||||
run "implicit_enable_approve_whitelist_with_users" {
|
||||
variables {
|
||||
rule_name = "implicit_enable_approve_whitelist_with_users"
|
||||
approval_whitelist_users = ["test_user"]
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.enable_approval_whitelist == true
|
||||
error_message = "${gitea_repository_branch_protection.bp.enable_approval_whitelist} not eq `true`"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.approval_whitelist_users == tolist(var.approval_whitelist_users)
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.approval_whitelist_users)} not eq ${join(",", var.approval_whitelist_users)}"
|
||||
}
|
||||
}
|
||||
|
||||
run "implicit_enable_approve_whitelist_with_teams" {
|
||||
variables {
|
||||
rule_name = "implicit_enable_approve_whitelist_with_teams"
|
||||
repo_user_name = "test-org"
|
||||
approval_whitelist_teams = ["Owners"]
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.enable_approval_whitelist == true
|
||||
error_message = "${gitea_repository_branch_protection.bp.enable_approval_whitelist} not eq `true`"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.approval_whitelist_teams == tolist(var.approval_whitelist_teams)
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.approval_whitelist_teams)} not eq ${join(",", var.approval_whitelist_teams)}"
|
||||
}
|
||||
}
|
||||
|
||||
run "implicit_enable_merge_whitelist_with_users" {
|
||||
variables {
|
||||
rule_name = "implicit_enable_merge_whitelist_with_users"
|
||||
merge_whitelist_users = ["test_user"]
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.enable_merge_whitelist == true
|
||||
error_message = "${gitea_repository_branch_protection.bp.enable_merge_whitelist} not eq `true`"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.merge_whitelist_users == tolist(var.merge_whitelist_users)
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.merge_whitelist_users)} not eq ${join(",", var.merge_whitelist_users)}"
|
||||
}
|
||||
}
|
||||
|
||||
run "implicit_enable_merge_whitelist_with_teams" {
|
||||
variables {
|
||||
rule_name = "implicit_enable_merge_whitelist_with_teams"
|
||||
repo_user_name = "test-org"
|
||||
merge_whitelist_teams = ["Owners"]
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.enable_merge_whitelist == true
|
||||
error_message = "${gitea_repository_branch_protection.bp.enable_merge_whitelist} not eq `true`"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.merge_whitelist_teams == tolist(var.merge_whitelist_teams)
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.merge_whitelist_teams)} not eq ${join(",", var.merge_whitelist_teams)}"
|
||||
}
|
||||
}
|
||||
|
||||
run "implicit_enable_status_check" {
|
||||
variables {
|
||||
rule_name = "implicit_enable_status_check"
|
||||
status_check_patterns = ["terraform-tests", "tf fmt"]
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.enable_status_check == true
|
||||
error_message = "${gitea_repository_branch_protection.bp.enable_status_check} not eq `true`"
|
||||
}
|
||||
assert {
|
||||
condition = gitea_repository_branch_protection.bp.status_check_patterns == tolist(var.status_check_patterns)
|
||||
error_message = "${join(",", gitea_repository_branch_protection.bp.status_check_patterns)} not eq ${join(",", var.status_check_patterns)}"
|
||||
}
|
||||
}
|
14
tests/readme.md
Normal file
14
tests/readme.md
Normal file
@ -0,0 +1,14 @@
|
||||
# How to run tests
|
||||
|
||||
```bash
|
||||
docker run -p 3000:3000 gitea/gitea:latest-rootless
|
||||
```
|
||||
|
||||
1. Setup gitea under http://localhost:3000
|
||||
2. Username: gitea_admin
|
||||
3. Password: gitea_admin
|
||||
4. Email: admin@gitea.local
|
||||
|
||||
```bash
|
||||
terraform test
|
||||
```
|
22
tests/setup/main.tf
Normal file
22
tests/setup/main.tf
Normal file
@ -0,0 +1,22 @@
|
||||
resource "gitea_org" "test_org" {
|
||||
name = var.org_name
|
||||
}
|
||||
|
||||
resource "gitea_repository" "org_repo" {
|
||||
username = gitea_org.test_org.name
|
||||
name = var.repo_name
|
||||
}
|
||||
|
||||
resource "gitea_user" "test_user" {
|
||||
password = "Geheim1!"
|
||||
email = "terraform@local.host"
|
||||
username = var.user_name
|
||||
login_name = var.user_name
|
||||
must_change_password = false
|
||||
}
|
||||
|
||||
resource "gitea_repository" "user_repo" {
|
||||
username = gitea_user.test_user.username
|
||||
name = var.repo_name
|
||||
}
|
||||
|
15
tests/setup/variables.tf
Normal file
15
tests/setup/variables.tf
Normal file
@ -0,0 +1,15 @@
|
||||
variable "repo_name" {
|
||||
type = string
|
||||
default = "test-repo"
|
||||
}
|
||||
|
||||
variable "org_name" {
|
||||
type = string
|
||||
default = "test-org"
|
||||
}
|
||||
|
||||
variable "user_name" {
|
||||
type = string
|
||||
default = "test_user"
|
||||
}
|
||||
|
16
tests/setup/versions.tf
Normal file
16
tests/setup/versions.tf
Normal file
@ -0,0 +1,16 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
gitea = {
|
||||
source = "go-gitea/gitea"
|
||||
version = "0.3.0"
|
||||
}
|
||||
}
|
||||
required_version = ">= 0.13"
|
||||
}
|
||||
|
||||
provider "gitea" {
|
||||
base_url = "http://localhost:3000"
|
||||
username = "gitea_admin"
|
||||
password = "gitea_admin"
|
||||
insecure = true
|
||||
}
|
117
tests/variables.tf
Normal file
117
tests/variables.tf
Normal file
@ -0,0 +1,117 @@
|
||||
variable "repo_name" {
|
||||
type = string
|
||||
default = "test-repo"
|
||||
}
|
||||
|
||||
variable "org_name" {
|
||||
type = string
|
||||
default = "test-org"
|
||||
}
|
||||
|
||||
variable "repo_user_name" {
|
||||
type = string
|
||||
default = "test_user"
|
||||
}
|
||||
|
||||
variable "user_name" {
|
||||
type = string
|
||||
default = "test_user"
|
||||
}
|
||||
|
||||
variable "rule_name" {
|
||||
type = string
|
||||
default = "branch-protection"
|
||||
}
|
||||
|
||||
variable "protected_file_patterns" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "unprotected_file_patterns" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "enable_push" {
|
||||
type = bool
|
||||
default = true
|
||||
}
|
||||
|
||||
variable "push_whitelist_users" {
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "push_whitelist_teams" {
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "push_whitelist_deploy_keys" {
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "require_signed_commits" {
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "required_approvals" {
|
||||
type = number
|
||||
default = 0
|
||||
}
|
||||
|
||||
variable "approval_whitelist_users" {
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "approval_whitelist_teams" {
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "dismiss_stale_approvals" {
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "status_check_patterns" {
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "merge_whitelist_users" {
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "merge_whitelist_teams" {
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "block_merge_on_rejected_reviews" {
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "block_merge_on_official_review_requests" {
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "block_merge_on_outdated_branch" {
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
# // not implemented in go-gitea-sdk
|
||||
//
|
||||
# //
|
||||
# // "ignore_stale_approvals": {
|
||||
# // Description: `Do not count approvals that were made on older commits (stale reviews) towards how many approvals the PR has. Irrelevant if stale reviews are already dismissed.`,
|
||||
# // },
|
||||
|
16
tests/versions.tf
Normal file
16
tests/versions.tf
Normal file
@ -0,0 +1,16 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
gitea = {
|
||||
source = "go-gitea/gitea"
|
||||
version = "0.3.0"
|
||||
}
|
||||
}
|
||||
required_version = ">= 0.13"
|
||||
}
|
||||
|
||||
provider "gitea" {
|
||||
base_url = "http://localhost:3000"
|
||||
username = "gitea_admin"
|
||||
password = "gitea_admin"
|
||||
insecure = true
|
||||
}
|
5
tools/tools.go
Normal file
5
tools/tools.go
Normal file
@ -0,0 +1,5 @@
|
||||
package tools
|
||||
|
||||
import (
|
||||
_ "github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs"
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user