// Provisioner returns a Puppet resource provisioner.
Provisioner returns a Puppet resource provisioner.
// Provisioner returns a Puppet resource provisioner .
func Provisioner() terraform.ResourceProvisioner {
	return &schema.Provisioner{
		Schema: map[string]*schema.Schema{
			"server": &schema.Schema{
				Type:     schema.TypeString,
				Required: true,
			},
			"server_user": &schema.Schema{
				Type:     schema.TypeString,
				Optional: true,
				Default:  "root",
			},
			"os_type": &schema.Schema{
				Type:         schema.TypeString,
				Optional:     true,
				ValidateFunc: validation.StringInSlice([]string{"linux", "windows"}, false),
			},
			"use_sudo": &schema.Schema{
				Type:     schema.TypeBool,
				Optional: true,
				Default:  true,
			},
			"autosign": &schema.Schema{
				Type:     schema.TypeBool,
				Optional: true,
				Default:  true,
			},
			"open_source": &schema.Schema{
				Type:     schema.TypeBool,
				Optional: true,
				Default:  true,
			},
			"certname": &schema.Schema{
				Type:     schema.TypeString,
				Optional: true,
			},
			"extension_requests": &schema.Schema{
				Type:     schema.TypeMap,
				Optional: true,
			},
			"custom_attributes": &schema.Schema{
				Type:     schema.TypeMap,
				Optional: true,
			},
			"environment": &schema.Schema{
				Type:     schema.TypeString,
				Default:  "production",
				Optional: true,
			},
			"bolt_timeout": &schema.Schema{
				Type:     schema.TypeString,
				Default:  "5m",
				Optional: true,
				ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
					_, err := time.ParseDuration(val.(string))
					if err != nil {
						errs = append(errs, err)
					}
					return warns, errs
				},
			},
		},
		ApplyFunc: applyFn,
	}
}
func Provisioner ( ) terraform . ResourceProvisioner { return & schema . Provisioner { Schema : map [ string ] * schema . Schema { " " : & schema . Schema { Type : schema . TypeString , Required : true , } , " " : & schema . Schema { Type : schema . TypeString , Optional : true , Default : " " , } , " " : & schema . Schema { Type : schema . TypeString , Optional : true , ValidateFunc : validation . StringInSlice ( [ ] string { " " , " " } , false ) , } , " " : & schema . Schema { Type : schema . TypeBool , Optional : true , Default : true , } , " " : & schema . Schema { Type : schema . TypeBool , Optional : true , Default : true , } , " " : & schema . Schema { Type : schema . TypeBool , Optional : true , Default : true , } , " " : & schema . Schema { Type : schema . TypeString , Optional : true , } , " " : & schema . Schema { Type : schema . TypeMap , Optional : true , } , " " : & schema . Schema { Type : schema . TypeMap , Optional : true , } , " " : & schema . Schema { Type : schema . TypeString , Default : " " , Optional : true , } , " " : & schema . Schema { Type : schema . TypeString , Default : " " , Optional : true , ValidateFunc : func ( val interface { } , key string ) ( warns [ ] string , errs [ ] error ) { _ , err := time . ParseDuration ( val . ( string ) ) if err != nil { errs = append ( errs , err ) } return warns , errs } , } , } , ApplyFunc : applyFn , } }
Provisioner returns a Puppet resource provisioner.
Provisioner returns a Puppet resource provisioner .