@@ -228,7 +228,6 @@ func ExpandExternalCredentialsConfig(v interface{}) (*ExternalCredentials, error
228228// Config is the configuration structure used to instantiate the Google
229229// provider.
230230type Config struct {
231- DCLConfig
232231 AccessToken string
233232 Credentials string
234233 ExternalCredentials * ExternalCredentials
@@ -415,9 +414,14 @@ type Config struct {
415414 BigtableAdminBasePath string
416415 TagsLocationBasePath string
417416
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
421425
422426 RequestBatcherServiceUsage * RequestBatcher
423427 RequestBatcherIam * RequestBatcher
@@ -735,9 +739,15 @@ var DefaultBasePaths = map[string]string{
735739 IamCredentialsBasePathKey : "https://iamcredentials.googleapis.com/v1/" ,
736740 ResourceManagerV3BasePathKey : "https://cloudresourcemanager.googleapis.com/v3/" ,
737741 BigtableAdminBasePathKey : "https://bigtableadmin.googleapis.com/v2/" ,
738- ContainerAwsBasePathKey : "https://{{location}}-gkemulticloud.googleapis.com/v1/" ,
739- ContainerAzureBasePathKey : "https://{{location}}-gkemulticloud.googleapis.com/v1/" ,
740742 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/" ,
741751}
742752
743753var DefaultClientScopes = []string {
@@ -1597,6 +1607,9 @@ func SetEndpointDefaults(d *schema.ResourceData) error {
15971607 }, DefaultBasePaths [TagsLocationBasePathKey ]))
15981608 }
15991609
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+
16001613 if d .Get (ContainerAwsCustomEndpointEntryKey ) == "" {
16011614 d .Set (ContainerAwsCustomEndpointEntryKey , MultiEnvDefault ([]string {
16021615 "GOOGLE_CONTAINERAWS_CUSTOM_ENDPOINT" ,
@@ -1608,6 +1621,31 @@ func SetEndpointDefaults(d *schema.ResourceData) error {
16081621 "GOOGLE_CONTAINERAZURE_CUSTOM_ENDPOINT" ,
16091622 }, DefaultBasePaths [ContainerAzureBasePathKey ]))
16101623 }
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+ }
16111649
16121650 return nil
16131651}
@@ -2694,6 +2732,15 @@ func ConfigureBasePaths(c *Config) {
26942732 c .BigQueryBasePath = DefaultBasePaths [BigQueryBasePathKey ]
26952733 c .BigtableAdminBasePath = DefaultBasePaths [BigtableAdminBasePathKey ]
26962734 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 ]
26972744}
26982745
26992746func GetCurrentUserEmail (config * Config , userAgent string ) (string , error ) {
0 commit comments