mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-20 22:59:42 -05:00
* chore(ci): split acc test into resources Signed-off-by: Manuel Vogel <mavogel@posteo.de> * fix: bump terraform-plugin-sdk/v2 to v2.16.0 Signed-off-by: Manuel Vogel <mavogel@posteo.de> * fix(ci): Set fail-fast to false. * fix(ci): reduce to tf version 0.15.x and 1.1.x Signed-off-by: Manuel Vogel <mavogel@posteo.de> * fix(ci): us tf version gh action Signed-off-by: Manuel Vogel <mavogel@posteo.de> * fix(ci): env name for TESTSUITE_TIMEOUT Signed-off-by: Manuel Vogel <mavogel@posteo.de> * fix(ci): increase test suite timeout to 480s Signed-off-by: Manuel Vogel <mavogel@posteo.de> * fix(src): Replace deprecated plugin.Debug with plugin.Serve. Co-authored-by: Martin Wentzel <martin.wentzel@kreuzwerker.de>
44 lines
1.3 KiB
Go
44 lines
1.3 KiB
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
|
|
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
|
|
"github.com/terraform-providers/terraform-provider-docker/internal/provider"
|
|
)
|
|
|
|
// Run "go generate" to format example terraform files and generate the docs for the registry/website
|
|
|
|
// If you do not have terraform installed, you can remove the formatting command, but its suggested to
|
|
// ensure the documentation is formatted properly.
|
|
//go:generate terraform fmt -recursive ./examples/
|
|
|
|
// Run the docs generation tool, check its repository for more information on how it works and how docs
|
|
// can be customized.
|
|
//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
|
|
|
|
var (
|
|
// these will be set by the goreleaser configuration
|
|
// to appropriate values for the compiled binary
|
|
version string = "dev"
|
|
|
|
// goreleaser can also pass the specific commit if you want
|
|
// commit string = ""
|
|
)
|
|
|
|
func main() {
|
|
var debugMode bool
|
|
|
|
flag.BoolVar(&debugMode, "debug", false, "set to true to run the provider with support for debuggers like delve")
|
|
flag.Parse()
|
|
|
|
opts := &plugin.ServeOpts{ProviderFunc: provider.New(version)}
|
|
|
|
if debugMode {
|
|
debugOpts := &plugin.ServeOpts{ProviderFunc: provider.New(version), ProviderAddr: "registry.terraform.io/kreuzwerker/terraform-provider-docker", Debug: true}
|
|
plugin.Serve(debugOpts)
|
|
return
|
|
}
|
|
|
|
plugin.Serve(opts)
|
|
}
|