-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from Venafi/migration-to-sdkv2
Migration to sdkv2
- Loading branch information
Showing
21 changed files
with
1,224 additions
and
1,156 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,29 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/hashicorp/terraform-plugin-sdk/plugin" | ||
"flag" | ||
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin" | ||
"github.com/terraform-providers/terraform-provider-venafi/venafi" | ||
"log" | ||
) | ||
|
||
func main() { | ||
plugin.Serve(&plugin.ServeOpts{ | ||
ProviderFunc: venafi.Provider, | ||
}) | ||
// remove date and time stamp from log output as the plugin SDK already adds its own | ||
log.SetFlags(log.Flags() &^ (log.Ldate | log.Ltime)) | ||
|
||
var debugMode bool | ||
|
||
flag.BoolVar(&debugMode, "debuggable", false, "set to true to run the provider with support for debuggers like delve") | ||
flag.Parse() | ||
|
||
if debugMode { | ||
plugin.Serve(&plugin.ServeOpts{ | ||
ProviderFunc: venafi.Provider, | ||
Debug: true, | ||
}) | ||
} else { | ||
plugin.Serve(&plugin.ServeOpts{ | ||
ProviderFunc: venafi.Provider, | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.