@@ -234,9 +234,6 @@ func ExpandExternalCredentialsConfig(v interface{}) (*ExternalCredentials, error
234234// Config is the configuration structure used to instantiate the Google
235235// provider.
236236type Config struct {
237- {{- if ne $ .Compiler " terraformgoogleconversion-codegen" }}
238- DCLConfig
239- {{- end }}
240237 AccessToken string
241238 Credentials string
242239 ExternalCredentials *ExternalCredentials
@@ -280,9 +277,14 @@ type Config struct {
280277 BigtableAdminBasePath string
281278 TagsLocationBasePath string
282279
283- // dcl
280+ // DCL
284281 ContainerAwsBasePath string
285282 ContainerAzureBasePath string
283+ ApikeysBasePath string
284+ AssuredWorkloadsBasePath string
285+ CloudResourceManagerBasePath string
286+ FirebaserulesBasePath string
287+ RecaptchaEnterpriseBasePath string
286288
287289 RequestBatcherServiceUsage *RequestBatcher
288290 RequestBatcherIam *RequestBatcher
@@ -318,9 +320,19 @@ var DefaultBasePaths = map[string]string{
318320 IamCredentialsBasePathKey : " https://iamcredentials.googleapis.com/v1/" ,
319321 ResourceManagerV3BasePathKey : " https://cloudresourcemanager.googleapis.com/v3/" ,
320322 BigtableAdminBasePathKey : " https://bigtableadmin.googleapis.com/v2/" ,
321- ContainerAwsBasePathKey: " https://{{" {{" }}location{{" }}" }}-gkemulticloud.googleapis.com/v1/" ,
322- ContainerAzureBasePathKey: " https://{{" {{" }}location{{" }}" }}-gkemulticloud.googleapis.com/v1/" ,
323323 TagsLocationBasePathKey: " https://{{" {{" }}location{{" }}" }}-cloudresourcemanager.googleapis.com/v3/" ,
324+ // DCL
325+ ContainerAwsBasePathKey: " https://{{" {{" }}location{{" }}" }}-gkemulticloud.googleapis.com/v1/" ,
326+ ContainerAzureBasePathKey: " https://{{" {{" }}location{{" }}" }}-gkemulticloud.googleapis.com/v1/" ,
327+ ApikeysEndpointEntryKey: " https://apikeys.googleapis.com/v2/" ,
328+ {{- if eq $ .TargetVersionName " ga" }}
329+ AssuredWorkloadsEndpointEntryKey: " https://{{" {{" }}location{{" }}" }}-assuredworkloads.googleapis.com/v1beta1/" ,
330+ {{- else }}
331+ AssuredWorkloadsEndpointEntryKey: " https://{{" {{" }}location{{" }}" }}-assuredworkloads.googleapis.com/v1/" ,
332+ {{- end }}
333+ CloudResourceManagerEndpointEntryKey: " https://cloudresourcemanager.googleapis.com/" ,
334+ FirebaserulesEndpointEntryKey: " https://firebaserules.googleapis.com/v1/" ,
335+ RecaptchaEnterpriseEndpointEntryKey: " https://recaptchaenterprise.googleapis.com/v1/" ,
324336}
325337
326338var DefaultClientScopes = []string{
@@ -465,6 +477,9 @@ func SetEndpointDefaults(d *schema.ResourceData) error {
465477 }, DefaultBasePaths[TagsLocationBasePathKey]))
466478 }
467479
480+ // DCL endpoints - these are hardcoded as a workaround for the DCL not providing a way to
481+ // determine base paths at generation time.
482+
468483 if d.Get (ContainerAwsCustomEndpointEntryKey) == " " {
469484 d.Set (ContainerAwsCustomEndpointEntryKey, MultiEnvDefault([]string{
470485 " GOOGLE_CONTAINERAWS_CUSTOM_ENDPOINT" ,
@@ -476,6 +491,31 @@ func SetEndpointDefaults(d *schema.ResourceData) error {
476491 " GOOGLE_CONTAINERAZURE_CUSTOM_ENDPOINT" ,
477492 }, DefaultBasePaths[ContainerAzureBasePathKey]))
478493 }
494+ if d.Get (ApikeysEndpointEntryKey) == " " {
495+ d.Set (ApikeysEndpointEntryKey, MultiEnvDefault([]string{
496+ " GOOGLE_APIKEYS_CUSTOM_ENDPOINT" ,
497+ }, DefaultBasePaths[ApikeysEndpointEntryKey]))
498+ }
499+ if d.Get (AssuredWorkloadsEndpointEntryKey) == " " {
500+ d.Set (AssuredWorkloadsEndpointEntryKey, MultiEnvDefault([]string{
501+ " GOOGLE_ASSURED_WORKLOADS_CUSTOM_ENDPOINT" ,
502+ }, DefaultBasePaths[AssuredWorkloadsEndpointEntryKey]))
503+ }
504+ if d.Get (CloudResourceManagerEndpointEntryKey) == " " {
505+ d.Set (CloudResourceManagerEndpointEntryKey, MultiEnvDefault([]string{
506+ " GOOGLE_CLOUD_RESOURCE_MANAGER_CUSTOM_ENDPOINT" ,
507+ }, DefaultBasePaths[CloudResourceManagerEndpointEntryKey]))
508+ }
509+ if d.Get (FirebaserulesEndpointEntryKey) == " " {
510+ d.Set (FirebaserulesEndpointEntryKey, MultiEnvDefault([]string{
511+ " GOOGLE_FIREBASERULES_CUSTOM_ENDPOINT" ,
512+ }, DefaultBasePaths[FirebaserulesEndpointEntryKey]))
513+ }
514+ if d.Get (RecaptchaEnterpriseEndpointEntryKey) == " " {
515+ d.Set (RecaptchaEnterpriseEndpointEntryKey, MultiEnvDefault([]string{
516+ " GOOGLE_RECAPTCHA_ENTERPRISE_CUSTOM_ENDPOINT" ,
517+ }, DefaultBasePaths[RecaptchaEnterpriseEndpointEntryKey]))
518+ }
479519
480520 return nil
481521}
@@ -1453,6 +1493,15 @@ func ConfigureBasePaths(c *Config) {
14531493 c.BigQueryBasePath = DefaultBasePaths[BigQueryBasePathKey]
14541494 c.BigtableAdminBasePath = DefaultBasePaths[BigtableAdminBasePathKey]
14551495 c.TagsLocationBasePath = DefaultBasePaths[TagsLocationBasePathKey]
1496+
1497+ // DCL
1498+ c.ContainerAwsBasePath = DefaultBasePaths[ContainerAwsBasePathKey]
1499+ c.ContainerAzureBasePath = DefaultBasePaths[ContainerAzureBasePathKey]
1500+ c.ApikeysBasePath = DefaultBasePaths[ApikeysEndpointEntryKey]
1501+ c.AssuredWorkloadsBasePath = DefaultBasePaths[AssuredWorkloadsEndpointEntryKey]
1502+ c.CloudResourceManagerBasePath = DefaultBasePaths[CloudResourceManagerEndpointEntryKey]
1503+ c.FirebaserulesBasePath = DefaultBasePaths[FirebaserulesEndpointEntryKey]
1504+ c.RecaptchaEnterpriseBasePath = DefaultBasePaths[RecaptchaEnterpriseEndpointEntryKey]
14561505}
14571506
14581507func GetCurrentUserEmail(config *Config, userAgent string) (string, error) {
0 commit comments