From 33dd5d8de0a39edee8a3daacc745754b4f6fa9e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wilson=20J=C3=BAnior?= Date: Wed, 27 Jan 2021 10:04:56 -0300 Subject: [PATCH] Add pre-generated docs --- GNUmakefile | 3 +++ docs/index.md | 21 +++++++++++++++++++++ docs/resources/pool.md | 29 +++++++++++++++++++++++++++++ docs/resources/pool_constraint.md | 29 +++++++++++++++++++++++++++++ go.mod | 1 + go.sum | 7 +++++++ main.go | 2 ++ 7 files changed, 92 insertions(+) create mode 100644 docs/index.md create mode 100644 docs/resources/pool.md create mode 100644 docs/resources/pool_constraint.md diff --git a/GNUmakefile b/GNUmakefile index 45d5936..f7188fc 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -30,3 +30,6 @@ install: build test: TF_ACC=1 TF_ACC_TERRAFORM_VERSION=0.14.4 go test ./... -v + +generate-docs: + go generate diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..d86d17a --- /dev/null +++ b/docs/index.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "tsuru Provider" +subcategory: "" +description: |- + +--- + +# tsuru Provider + + + + + + +## Schema + +### Optional + +- **host** (String) Target to tsuru API +- **token** (String) Token to authenticate on tsuru API (optional) diff --git a/docs/resources/pool.md b/docs/resources/pool.md new file mode 100644 index 0000000..154b7e4 --- /dev/null +++ b/docs/resources/pool.md @@ -0,0 +1,29 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "tsuru_pool Resource - terraform-provider-tsuru" +subcategory: "" +description: |- + +--- + +# Resource `tsuru_pool` + + + + + + +## Schema + +### Required + +- **name** (String) Unique name of pool + +### Optional + +- **default** (Boolean) +- **id** (String) The ID of this resource. +- **public** (Boolean) +- **tsuru_provisioner** (String) Provisioner of pool + + diff --git a/docs/resources/pool_constraint.md b/docs/resources/pool_constraint.md new file mode 100644 index 0000000..ad6f619 --- /dev/null +++ b/docs/resources/pool_constraint.md @@ -0,0 +1,29 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "tsuru_pool_constraint Resource - terraform-provider-tsuru" +subcategory: "" +description: |- + +--- + +# Resource `tsuru_pool_constraint` + + + + + + +## Schema + +### Required + +- **field** (String) field of constraint +- **pool_expr** (String) The name of pools, allow glob match style +- **values** (Set of String) + +### Optional + +- **blacklist** (Boolean) +- **id** (String) The ID of this resource. + + diff --git a/go.mod b/go.mod index 8faeebf..a3aa9cb 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.15 require ( github.com/hashicorp/hcl/v2 v2.8.2 // indirect + github.com/hashicorp/terraform-plugin-docs v0.3.1 // indirect github.com/hashicorp/terraform-plugin-sdk/v2 v2.4.1 github.com/labstack/echo/v4 v4.1.17 github.com/sirupsen/logrus v1.4.2 diff --git a/go.sum b/go.sum index c3c3c87..14a8f8e 100644 --- a/go.sum +++ b/go.sum @@ -65,6 +65,7 @@ github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/ github.com/apparentlymart/go-textseg/v12 v12.0.0 h1:bNEQyAGak9tojivJNkoqWErVCQbjdL7GzRt3F8NvfJ0= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= @@ -255,10 +256,14 @@ github.com/hashicorp/hcl/v2 v2.8.2 h1:wmFle3D1vu0okesm8BTLVDyJ6/OL9DCLUwn0b2Opti github.com/hashicorp/hcl/v2 v2.8.2/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY= 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-exec v0.9.0/go.mod h1:tOT8j1J8rP05bZBGWXfMyU3HkLi1LWyqL3Bzsc3CJjo= github.com/hashicorp/terraform-exec v0.12.0 h1:Tb1VC2gqArl9EJziJjoazep2MyxMk00tnNKV/rgMba0= github.com/hashicorp/terraform-exec v0.12.0/go.mod h1:SGhto91bVRlgXQWcJ5znSz+29UZIa8kpBbkGwQ+g9E8= +github.com/hashicorp/terraform-json v0.5.0/go.mod h1:eAbqb4w0pSlRmdvl8fOyHAi/+8jnkVYN28gJkSJrLhU= github.com/hashicorp/terraform-json v0.8.0 h1:XObQ3PgqU52YLQKEaJ08QtUshAfN3yu4u8ebSW0vztc= github.com/hashicorp/terraform-json v0.8.0/go.mod h1:3defM4kkMfttwiE7VakJDwCd4R+umhSQnvJwORXbprE= +github.com/hashicorp/terraform-plugin-docs v0.3.1 h1:Slq2UAbxFCYtvN9wc+S2T1b30Ir29kLXtLrZ/JDdFcA= +github.com/hashicorp/terraform-plugin-docs v0.3.1/go.mod h1:4jopztPjeyZAr51wPzX4b8Ld8bFQKQ9dbF40JbCQIts= github.com/hashicorp/terraform-plugin-go v0.2.1 h1:EW/R8bB2Zbkjmugzsy1d27yS8/0454b3MtYHkzOknqA= github.com/hashicorp/terraform-plugin-go v0.2.1/go.mod h1:10V6F3taeDWVAoLlkmArKttR3IULlRWFAGtQIQTIDr4= github.com/hashicorp/terraform-plugin-sdk/v2 v2.4.1 h1:k2rpom9wG2cdi5iLRH80EdQB7UX/E6UzYzUfzgsNLuU= @@ -382,6 +387,7 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -476,6 +482,7 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= 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 v1.4.1/go.mod h1:nHzOclRkoj++EU9ZjSrZvRG0BXIWt8c7loYc0qXAFGQ= github.com/zclconf/go-cty v1.7.1 h1:AvsC01GMhMLFL8CgEYdHGM+yLnnDOwhPAYcgTkeF0Gw= github.com/zclconf/go-cty v1.7.1/go.mod h1:VDR4+I79ubFBGm1uJac1226K5yANQFHeauxPBoP54+o= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= diff --git a/main.go b/main.go index fafff58..0815d56 100644 --- a/main.go +++ b/main.go @@ -8,6 +8,8 @@ import ( "github.com/tsuru/terraform-provider-tsuru/tsuru" ) +//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs + func main() { plugin.Serve(&plugin.ServeOpts{ ProviderFunc: tsuru.Provider})