@@ -143,6 +143,11 @@ func resourcePipeline() *schema.Resource {
143143 Optional : true ,
144144 Default : false ,
145145 },
146+ "pull_request_allow_fork_events" : {
147+ Type : schema .TypeBool ,
148+ Optional : true ,
149+ Default : false ,
150+ },
146151 "context" : {
147152 Type : schema .TypeString ,
148153 Optional : true ,
@@ -363,6 +368,7 @@ func flattenTriggers(triggers []cfClient.Trigger) []map[string]interface{} {
363368 m ["branch_regex" ] = trigger .BranchRegex
364369 m ["modified_files_glob" ] = trigger .ModifiedFilesGlob
365370 m ["disabled" ] = trigger .Disabled
371+ m ["pull_request_allow_fork_events" ] = trigger .PullRequestAllowForkEvents
366372 m ["provider" ] = trigger .Provider
367373 m ["type" ] = trigger .Type
368374 m ["events" ] = trigger .Events
@@ -427,16 +433,17 @@ func mapResourceToPipeline(d *schema.ResourceData) *cfClient.Pipeline {
427433 events := d .Get (fmt .Sprintf ("spec.0.trigger.%v.events" , idx )).([]interface {})
428434
429435 codefreshTrigger := cfClient.Trigger {
430- Name : d .Get (fmt .Sprintf ("spec.0.trigger.%v.name" , idx )).(string ),
431- Description : d .Get (fmt .Sprintf ("spec.0.trigger.%v.description" , idx )).(string ),
432- Type : d .Get (fmt .Sprintf ("spec.0.trigger.%v.type" , idx )).(string ),
433- Repo : d .Get (fmt .Sprintf ("spec.0.trigger.%v.repo" , idx )).(string ),
434- BranchRegex : d .Get (fmt .Sprintf ("spec.0.trigger.%v.branch_regex" , idx )).(string ),
435- ModifiedFilesGlob : d .Get (fmt .Sprintf ("spec.0.trigger.%v.modified_files_glob" , idx )).(string ),
436- Provider : d .Get (fmt .Sprintf ("spec.0.trigger.%v.provider" , idx )).(string ),
437- Disabled : d .Get (fmt .Sprintf ("spec.0.trigger.%v.disabled" , idx )).(bool ),
438- Context : d .Get (fmt .Sprintf ("spec.0.trigger.%v.context" , idx )).(string ),
439- Events : convertStringArr (events ),
436+ Name : d .Get (fmt .Sprintf ("spec.0.trigger.%v.name" , idx )).(string ),
437+ Description : d .Get (fmt .Sprintf ("spec.0.trigger.%v.description" , idx )).(string ),
438+ Type : d .Get (fmt .Sprintf ("spec.0.trigger.%v.type" , idx )).(string ),
439+ Repo : d .Get (fmt .Sprintf ("spec.0.trigger.%v.repo" , idx )).(string ),
440+ BranchRegex : d .Get (fmt .Sprintf ("spec.0.trigger.%v.branch_regex" , idx )).(string ),
441+ ModifiedFilesGlob : d .Get (fmt .Sprintf ("spec.0.trigger.%v.modified_files_glob" , idx )).(string ),
442+ Provider : d .Get (fmt .Sprintf ("spec.0.trigger.%v.provider" , idx )).(string ),
443+ Disabled : d .Get (fmt .Sprintf ("spec.0.trigger.%v.disabled" , idx )).(bool ),
444+ PullRequestAllowForkEvents : d .Get (fmt .Sprintf ("spec.0.trigger.%v.pull_request_allow_fork_events" , idx )).(bool ),
445+ Context : d .Get (fmt .Sprintf ("spec.0.trigger.%v.context" , idx )).(string ),
446+ Events : convertStringArr (events ),
440447 }
441448 variables := d .Get (fmt .Sprintf ("spec.0.trigger.%v.variables" , idx )).(map [string ]interface {})
442449 codefreshTrigger .SetVariables (variables )
0 commit comments