@@ -228,7 +228,6 @@ func ExpandExternalCredentialsConfig(v interface{}) (*ExternalCredentials, error
228
228
// Config is the configuration structure used to instantiate the Google
229
229
// provider.
230
230
type Config struct {
231
- DCLConfig
232
231
AccessToken string
233
232
Credentials string
234
233
ExternalCredentials * ExternalCredentials
@@ -415,9 +414,14 @@ type Config struct {
415
414
BigtableAdminBasePath string
416
415
TagsLocationBasePath string
417
416
418
- // dcl
419
- ContainerAwsBasePath string
420
- ContainerAzureBasePath string
417
+ // DCL
418
+ ContainerAwsBasePath string
419
+ ContainerAzureBasePath string
420
+ ApikeysBasePath string
421
+ AssuredWorkloadsBasePath string
422
+ CloudResourceManagerBasePath string
423
+ FirebaserulesBasePath string
424
+ RecaptchaEnterpriseBasePath string
421
425
422
426
RequestBatcherServiceUsage * RequestBatcher
423
427
RequestBatcherIam * RequestBatcher
@@ -735,9 +739,15 @@ var DefaultBasePaths = map[string]string{
735
739
IamCredentialsBasePathKey : "https://iamcredentials.googleapis.com/v1/" ,
736
740
ResourceManagerV3BasePathKey : "https://cloudresourcemanager.googleapis.com/v3/" ,
737
741
BigtableAdminBasePathKey : "https://bigtableadmin.googleapis.com/v2/" ,
738
- ContainerAwsBasePathKey : "https://{{location}}-gkemulticloud.googleapis.com/v1/" ,
739
- ContainerAzureBasePathKey : "https://{{location}}-gkemulticloud.googleapis.com/v1/" ,
740
742
TagsLocationBasePathKey : "https://{{location}}-cloudresourcemanager.googleapis.com/v3/" ,
743
+ // DCL
744
+ ContainerAwsBasePathKey : "https://{{location}}-gkemulticloud.googleapis.com/v1/" ,
745
+ ContainerAzureBasePathKey : "https://{{location}}-gkemulticloud.googleapis.com/v1/" ,
746
+ ApikeysEndpointEntryKey : "https://apikeys.googleapis.com/v2/" ,
747
+ AssuredWorkloadsEndpointEntryKey : "https://{{location}}-assuredworkloads.googleapis.com/v1beta1/" ,
748
+ CloudResourceManagerEndpointEntryKey : "https://cloudresourcemanager.googleapis.com/" ,
749
+ FirebaserulesEndpointEntryKey : "https://firebaserules.googleapis.com/v1/" ,
750
+ RecaptchaEnterpriseEndpointEntryKey : "https://recaptchaenterprise.googleapis.com/v1/" ,
741
751
}
742
752
743
753
var DefaultClientScopes = []string {
@@ -1597,6 +1607,9 @@ func SetEndpointDefaults(d *schema.ResourceData) error {
1597
1607
}, DefaultBasePaths [TagsLocationBasePathKey ]))
1598
1608
}
1599
1609
1610
+ // DCL endpoints - these are hardcoded as a workaround for the DCL not providing a way to
1611
+ // determine base paths at generation time.
1612
+
1600
1613
if d .Get (ContainerAwsCustomEndpointEntryKey ) == "" {
1601
1614
d .Set (ContainerAwsCustomEndpointEntryKey , MultiEnvDefault ([]string {
1602
1615
"GOOGLE_CONTAINERAWS_CUSTOM_ENDPOINT" ,
@@ -1608,6 +1621,31 @@ func SetEndpointDefaults(d *schema.ResourceData) error {
1608
1621
"GOOGLE_CONTAINERAZURE_CUSTOM_ENDPOINT" ,
1609
1622
}, DefaultBasePaths [ContainerAzureBasePathKey ]))
1610
1623
}
1624
+ if d .Get (ApikeysEndpointEntryKey ) == "" {
1625
+ d .Set (ApikeysEndpointEntryKey , MultiEnvDefault ([]string {
1626
+ "GOOGLE_APIKEYS_CUSTOM_ENDPOINT" ,
1627
+ }, DefaultBasePaths [ApikeysEndpointEntryKey ]))
1628
+ }
1629
+ if d .Get (AssuredWorkloadsEndpointEntryKey ) == "" {
1630
+ d .Set (AssuredWorkloadsEndpointEntryKey , MultiEnvDefault ([]string {
1631
+ "GOOGLE_ASSURED_WORKLOADS_CUSTOM_ENDPOINT" ,
1632
+ }, DefaultBasePaths [AssuredWorkloadsEndpointEntryKey ]))
1633
+ }
1634
+ if d .Get (CloudResourceManagerEndpointEntryKey ) == "" {
1635
+ d .Set (CloudResourceManagerEndpointEntryKey , MultiEnvDefault ([]string {
1636
+ "GOOGLE_CLOUD_RESOURCE_MANAGER_CUSTOM_ENDPOINT" ,
1637
+ }, DefaultBasePaths [CloudResourceManagerEndpointEntryKey ]))
1638
+ }
1639
+ if d .Get (FirebaserulesEndpointEntryKey ) == "" {
1640
+ d .Set (FirebaserulesEndpointEntryKey , MultiEnvDefault ([]string {
1641
+ "GOOGLE_FIREBASERULES_CUSTOM_ENDPOINT" ,
1642
+ }, DefaultBasePaths [FirebaserulesEndpointEntryKey ]))
1643
+ }
1644
+ if d .Get (RecaptchaEnterpriseEndpointEntryKey ) == "" {
1645
+ d .Set (RecaptchaEnterpriseEndpointEntryKey , MultiEnvDefault ([]string {
1646
+ "GOOGLE_RECAPTCHA_ENTERPRISE_CUSTOM_ENDPOINT" ,
1647
+ }, DefaultBasePaths [RecaptchaEnterpriseEndpointEntryKey ]))
1648
+ }
1611
1649
1612
1650
return nil
1613
1651
}
@@ -2694,6 +2732,15 @@ func ConfigureBasePaths(c *Config) {
2694
2732
c .BigQueryBasePath = DefaultBasePaths [BigQueryBasePathKey ]
2695
2733
c .BigtableAdminBasePath = DefaultBasePaths [BigtableAdminBasePathKey ]
2696
2734
c .TagsLocationBasePath = DefaultBasePaths [TagsLocationBasePathKey ]
2735
+
2736
+ // DCL
2737
+ c .ContainerAwsBasePath = DefaultBasePaths [ContainerAwsBasePathKey ]
2738
+ c .ContainerAzureBasePath = DefaultBasePaths [ContainerAzureBasePathKey ]
2739
+ c .ApikeysBasePath = DefaultBasePaths [ApikeysEndpointEntryKey ]
2740
+ c .AssuredWorkloadsBasePath = DefaultBasePaths [AssuredWorkloadsEndpointEntryKey ]
2741
+ c .CloudResourceManagerBasePath = DefaultBasePaths [CloudResourceManagerEndpointEntryKey ]
2742
+ c .FirebaserulesBasePath = DefaultBasePaths [FirebaserulesEndpointEntryKey ]
2743
+ c .RecaptchaEnterpriseBasePath = DefaultBasePaths [RecaptchaEnterpriseEndpointEntryKey ]
2697
2744
}
2698
2745
2699
2746
func GetCurrentUserEmail (config * Config , userAgent string ) (string , error ) {
0 commit comments