INNER CODE UNIT · Go
init
cloudflare/cf-terraforming · internal/app/cf-terraforming/cmd/import.go:127
func init() {
rootCmd.AddCommand(importCommand)
}
var importCommand = &cobra.Command{
Use: "import",
Short: "Output `terraform import` compatible commands in order to import resources into state",
Run: runImport(),
PreRun: sharedPreRun,
}
func runImport() func(cmd *cobra.Command, args []string) {
return func(cmd *cobra.Command, args []string) {
zoneID = viper.GetString("zone")
accountID = viper.GetString("account")
workingDir := viper.GetString("terraform-install-path")
execPath, err := findOrInstallTerraform()
if err != nil {