Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update parameters to kong v3 #24

Merged
merged 48 commits into from
Dec 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8a252e0
Create go.yml
freddy-dov Nov 16, 2022
be71cd1
Update go.yml
freddy-dov Nov 16, 2022
bdd15f7
Update go.yml
freddy-dov Nov 16, 2022
88c3f74
Merge pull request #1 from freddy-dov/freddy-dov-patch-1
freddy-dov Nov 16, 2022
c6171d2
Update README.md
freddy-dov Nov 17, 2022
71dc0ea
Update README.md
freddy-dov Nov 17, 2022
be49d23
Update README.md
freddy-dov Nov 17, 2022
ff83154
wip
Nov 17, 2022
57c23d2
add syntax check
Nov 17, 2022
fb45449
add syntax check
Nov 17, 2022
6df83ac
add syntax check
Nov 17, 2022
22022fd
add syntax check
Nov 17, 2022
8d23df5
add syntax check
Nov 17, 2022
695840c
add syntax check
Nov 17, 2022
36562ae
add lint
Nov 22, 2022
a9e119a
add lint
Nov 22, 2022
d1b16a7
add lint
Nov 22, 2022
6cda189
add lint
Nov 22, 2022
ca8e20b
add lint
Nov 22, 2022
e7c9720
add statickcheck
Nov 22, 2022
590e61c
add statickcheck
Nov 22, 2022
d28c93c
wip
Nov 22, 2022
d990c8c
wip
Nov 22, 2022
1df222e
wip
Nov 22, 2022
5a342af
simplify composite literals
Dec 8, 2022
8a503a9
format error string to not be capitalized and to not end with punctua…
Dec 8, 2022
4910c82
switch deprecateded ImportStatePassthrough func to ImportStatePassthr…
Dec 8, 2022
fcc53ac
remove deprecated kong_api resource
Dec 8, 2022
10134d0
left only config_json parameter for plugin resource
Dec 13, 2022
52acd20
update selector to cert id
Dec 13, 2022
2bb8af2
set sensitive parameter for certificate key
Dec 13, 2022
b694b61
update terraform tests
Dec 13, 2022
6b658b2
update .gitignore with terraform files
Dec 13, 2022
9f03707
update resources parameters to kong v3
Dec 14, 2022
498a3e9
move converter func to helper
Dec 14, 2022
21e2ef6
remove old ci
Dec 14, 2022
81f37ac
update terraform examples / tests
Dec 14, 2022
1cd5b73
update module versions, dependencies
Dec 14, 2022
a9c7672
wip
Dec 14, 2022
5c421b5
Update README.md
YevheniiSemenko Dec 14, 2022
b461ddf
Merge branch 'master' of github.com:freddy-dov/terraform-provider-kon…
Dec 14, 2022
32f461d
update resources parameters to kong v3
Dec 20, 2022
5cac476
remove an additional golint workflow, update go version
Dec 20, 2022
7403fbf
update readme
Dec 20, 2022
1412606
fix markdownlint
Dec 20, 2022
748fc6f
Merge pull request #2 from freddy-dov/feature/update-kong-v3
YevheniiSemenko Dec 20, 2022
80eb51f
add / remove omitempty to struct, add ForceNew to not editable parame…
Dec 22, 2022
8226a27
remove status badge from readme
Dec 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Release

on:
push:
branches: [ "master" ]
tags:
- 'v*'
pull_request:
branches: [ "master" ]
tags:
- 'v*'

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Build
run: go build -v ./...

- name: Run vet & lint
run: |
go vet ./...

- name: Lint Code Base
uses: github/[email protected]
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: '.'
MARKDOWN_CONFIG_FILE: .markdownlint.yml
VALIDATE_MARKDOWN: true
VALIDATE_BASH: true

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: Run staticcheck
run: staticcheck ./...

- name: Test
run: go test -v ./...

-
name: Run GoReleaser
uses: goreleaser/[email protected]
with:
version: latest
args: release --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
# GitHub sets this automatically
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 12 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,23 @@ _testmain.go
*.test
*.prof

# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.backup
.terraform/*
*.tfstate.*

# Dependency Lock File
*.terraform.lock.hcl

*.log

terraform-provider-kong
.vscode/

.idea
dist/
dist/

# Mac
**/.DS_Store
6 changes: 6 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"MD013": false,
"MD033": {
"allowed_elements": ["br", "img"]
}
}
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

27 changes: 6 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
# Terraform provider for Kong
# Terraform provider for KONG

Uses [Terraform](http://www.terraform.io) to configure APIs in [Kong](http://www.getkong.org). It fully supports creating APIs and consumers, but plugins and credentials are not complete (most plugins will work though).

```
go build -o tests/terraform-provider-kong
```
Uses [Terraform](http://www.terraform.io) to configure APIs in [Kong](http://www.getkong.org).

## Compile and terraform plan / apply

### Start kong


```Shell
docker-compose up -d
```

## Run plan
```Shell
./start plan
```bash
go build -o tests/terraform-provider-kong
```

## Run apply
```Shell
./start apply
```
Don't forget to copy binary to [terraform local dir](https://developer.hashicorp.com/terraform/language/providers/requirements#in-house-providers)

## Example usage

Please refer to terraform/tests
Please refer to [terraform](./terraform) folder
24 changes: 0 additions & 24 deletions docker-compose.yml

This file was deleted.

47 changes: 44 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,52 @@
module github.com/WeKnowSports/terraform-provider-kong

go 1.16
go 1.19

replace github.com/WeKnowSports/terraform-provider-kong/kong => ./kong

require (
github.com/dghubble/sling v1.2.0
github.com/dghubble/sling v1.4.1
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1
)

require (
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v1.2.1 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.4.6 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.15.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.14.1 // indirect
github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c // indirect
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // 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.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/zclconf/go-cty v1.12.1 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20200711021454-869866162049 // indirect
google.golang.org/grpc v1.50.1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
Loading