Skip to content

Commit

Permalink
Merge pull request #24 from freddy-dov/master
Browse files Browse the repository at this point in the history
update parameters to kong v3
  • Loading branch information
YevheniiSemenko authored Dec 27, 2022
2 parents e772391 + 8226a27 commit 0a13887
Show file tree
Hide file tree
Showing 52 changed files with 1,415 additions and 1,466 deletions.
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

0 comments on commit 0a13887

Please sign in to comment.