INNER CODE UNIT · Go

generateResources

cloudflare/cf-terraforming · internal/app/cf-terraforming/cmd/generate.go:48

func generateResources() func(cmd *cobra.Command, args []string) {
	return func(cmd *cobra.Command, args []string) {
		if resourceType == "" {
			log.Fatal("you must define a resource type to generate")
		}

		zoneID = viper.GetString("zone")
		accountID = viper.GetString("account")
		workingDir := viper.GetString("terraform-install-path")
		execPath, err := findOrInstallTerraform()
		if err != nil {
			log.Fatalf("Could not find or install Terraform: %v", err)
		}

		// Setup and configure Terraform to operate in the temporary directory where
		// the provider is already configured.
		log.WithFields(logrus.Fields{
			"directory": workingDir,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…