diff --git a/main.go b/main.go index 25dc6d1..238fb7e 100644 --- a/main.go +++ b/main.go @@ -60,7 +60,13 @@ func main() { e.GET("/.well-known/terraform.json", serviceDiscoveryHandler()) e.GET("/v1/providers/:namespace/:type/*", client.providerHandler()) - _ = e.Start(":8080") + port := os.Getenv("PORT") + + if port == "" { + port = "8080" + } + + _ = e.Start(fmt.Sprintf(":%s", port)) } func serviceDiscoveryHandler() echo.HandlerFunc {