mirror of
https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git
synced 2024-12-04 21:08:11 +00:00
prepare next release
This commit is contained in:
parent
14c1a11417
commit
8095c2a513
6 changed files with 39 additions and 5 deletions
2
Makefile
2
Makefile
|
@ -3,7 +3,7 @@ GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
|
|||
|
||||
GOFMT ?= gofmt -s
|
||||
|
||||
VERSION = 0.11.2
|
||||
VERSION = 0.12.0
|
||||
|
||||
test: fmt-check
|
||||
go test -i $(TEST) || exit 1
|
||||
|
|
|
@ -17,7 +17,7 @@ terraform {
|
|||
required_providers {
|
||||
gitea = {
|
||||
source = "Lerentis/gitea"
|
||||
version = "0.11.2"
|
||||
version = "0.12.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,15 @@ Every key needs a unique name and unique key, i.e. no key can be added twice to
|
|||
## Example Usage
|
||||
|
||||
```terraform
|
||||
terraform {
|
||||
required_providers {
|
||||
tls = {
|
||||
source = "hashicorp/tls"
|
||||
version = "4.0.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "tls_private_key" "example" {
|
||||
type = "RSA"
|
||||
rsa_bits = 4096
|
||||
|
|
|
@ -2,7 +2,7 @@ terraform {
|
|||
required_providers {
|
||||
gitea = {
|
||||
source = "terraform.local/lerentis/gitea"
|
||||
version = "0.11.2"
|
||||
version = "0.12.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
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
|
||||
}
|
|
@ -24,11 +24,11 @@ func resourceRepoKeyIdParts(d *schema.ResourceData) (bool, int64, int64, error)
|
|||
|
||||
repoId, err := strconv.ParseInt(parts[0], 10, 64)
|
||||
if err != nil {
|
||||
return true, 0, 0, err
|
||||
return false, 0, 0, err
|
||||
}
|
||||
keyId, err := strconv.ParseInt(parts[1], 10, 64)
|
||||
if err != nil {
|
||||
return true, 0, 0, err
|
||||
return false, 0, 0, err
|
||||
}
|
||||
return true, repoId, keyId, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue