@@ -740,6 +740,12 @@ When using Pub/Sub, Webhook or Manual set the file name using git_file_source in
740
740
ValidateFunc : validateEnum ([]string {"UNKNOWN" , "CLOUD_SOURCE_REPOSITORIES" , "GITHUB" , "BITBUCKET_SERVER" }),
741
741
Description : `The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
742
742
Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER Possible values: ["UNKNOWN", "CLOUD_SOURCE_REPOSITORIES", "GITHUB", "BITBUCKET_SERVER"]` ,
743
+ },
744
+ "github_enterprise_config" : {
745
+ Type : schema .TypeString ,
746
+ Optional : true ,
747
+ Description : `The full resource name of the github enterprise config.
748
+ Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.` ,
743
749
},
744
750
"revision" : {
745
751
Type : schema .TypeString ,
@@ -969,6 +975,12 @@ Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER Possi
969
975
Required : true ,
970
976
Description : `The URI of the repo (required).` ,
971
977
},
978
+ "github_enterprise_config" : {
979
+ Type : schema .TypeString ,
980
+ Optional : true ,
981
+ Description : `The full resource name of the github enterprise config.
982
+ Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.` ,
983
+ },
972
984
},
973
985
},
974
986
AtLeastOneOf : []string {"trigger_template" , "github" , "pubsub_config" , "webhook_config" , "source_to_build" },
@@ -1661,6 +1673,8 @@ func flattenCloudBuildTriggerGitFileSource(v interface{}, d *schema.ResourceData
1661
1673
flattenCloudBuildTriggerGitFileSourceRepoType (original ["repoType" ], d , config )
1662
1674
transformed ["revision" ] =
1663
1675
flattenCloudBuildTriggerGitFileSourceRevision (original ["revision" ], d , config )
1676
+ transformed ["github_enterprise_config" ] =
1677
+ flattenCloudBuildTriggerGitFileSourceGithubEnterpriseConfig (original ["githubEnterpriseConfig" ], d , config )
1664
1678
return []interface {}{transformed }
1665
1679
}
1666
1680
func flattenCloudBuildTriggerGitFileSourcePath (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
@@ -1679,6 +1693,10 @@ func flattenCloudBuildTriggerGitFileSourceRevision(v interface{}, d *schema.Reso
1679
1693
return v
1680
1694
}
1681
1695
1696
+ func flattenCloudBuildTriggerGitFileSourceGithubEnterpriseConfig (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
1697
+ return v
1698
+ }
1699
+
1682
1700
func flattenCloudBuildTriggerSourceToBuild (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
1683
1701
if v == nil {
1684
1702
return nil
@@ -1694,6 +1712,8 @@ func flattenCloudBuildTriggerSourceToBuild(v interface{}, d *schema.ResourceData
1694
1712
flattenCloudBuildTriggerSourceToBuildRef (original ["ref" ], d , config )
1695
1713
transformed ["repo_type" ] =
1696
1714
flattenCloudBuildTriggerSourceToBuildRepoType (original ["repoType" ], d , config )
1715
+ transformed ["github_enterprise_config" ] =
1716
+ flattenCloudBuildTriggerSourceToBuildGithubEnterpriseConfig (original ["githubEnterpriseConfig" ], d , config )
1697
1717
return []interface {}{transformed }
1698
1718
}
1699
1719
func flattenCloudBuildTriggerSourceToBuildUri (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
@@ -1708,6 +1728,10 @@ func flattenCloudBuildTriggerSourceToBuildRepoType(v interface{}, d *schema.Reso
1708
1728
return v
1709
1729
}
1710
1730
1731
+ func flattenCloudBuildTriggerSourceToBuildGithubEnterpriseConfig (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
1732
+ return v
1733
+ }
1734
+
1711
1735
func flattenCloudBuildTriggerIgnoredFiles (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
1712
1736
return v
1713
1737
}
@@ -2520,6 +2544,13 @@ func expandCloudBuildTriggerGitFileSource(v interface{}, d TerraformResourceData
2520
2544
transformed ["revision" ] = transformedRevision
2521
2545
}
2522
2546
2547
+ transformedGithubEnterpriseConfig , err := expandCloudBuildTriggerGitFileSourceGithubEnterpriseConfig (original ["github_enterprise_config" ], d , config )
2548
+ if err != nil {
2549
+ return nil , err
2550
+ } else if val := reflect .ValueOf (transformedGithubEnterpriseConfig ); val .IsValid () && ! isEmptyValue (val ) {
2551
+ transformed ["githubEnterpriseConfig" ] = transformedGithubEnterpriseConfig
2552
+ }
2553
+
2523
2554
return transformed , nil
2524
2555
}
2525
2556
@@ -2539,6 +2570,10 @@ func expandCloudBuildTriggerGitFileSourceRevision(v interface{}, d TerraformReso
2539
2570
return v , nil
2540
2571
}
2541
2572
2573
+ func expandCloudBuildTriggerGitFileSourceGithubEnterpriseConfig (v interface {}, d TerraformResourceData , config * Config ) (interface {}, error ) {
2574
+ return v , nil
2575
+ }
2576
+
2542
2577
func expandCloudBuildTriggerSourceToBuild (v interface {}, d TerraformResourceData , config * Config ) (interface {}, error ) {
2543
2578
l := v .([]interface {})
2544
2579
if len (l ) == 0 || l [0 ] == nil {
@@ -2569,6 +2604,13 @@ func expandCloudBuildTriggerSourceToBuild(v interface{}, d TerraformResourceData
2569
2604
transformed ["repoType" ] = transformedRepoType
2570
2605
}
2571
2606
2607
+ transformedGithubEnterpriseConfig , err := expandCloudBuildTriggerSourceToBuildGithubEnterpriseConfig (original ["github_enterprise_config" ], d , config )
2608
+ if err != nil {
2609
+ return nil , err
2610
+ } else if val := reflect .ValueOf (transformedGithubEnterpriseConfig ); val .IsValid () && ! isEmptyValue (val ) {
2611
+ transformed ["githubEnterpriseConfig" ] = transformedGithubEnterpriseConfig
2612
+ }
2613
+
2572
2614
return transformed , nil
2573
2615
}
2574
2616
@@ -2584,6 +2626,10 @@ func expandCloudBuildTriggerSourceToBuildRepoType(v interface{}, d TerraformReso
2584
2626
return v , nil
2585
2627
}
2586
2628
2629
+ func expandCloudBuildTriggerSourceToBuildGithubEnterpriseConfig (v interface {}, d TerraformResourceData , config * Config ) (interface {}, error ) {
2630
+ return v , nil
2631
+ }
2632
+
2587
2633
func expandCloudBuildTriggerIgnoredFiles (v interface {}, d TerraformResourceData , config * Config ) (interface {}, error ) {
2588
2634
return v , nil
2589
2635
}
0 commit comments