Skip to content

Converted generated (same as registered, for now) products to use registry for setting up base paths#17011

Open
melinath wants to merge 15 commits intoGoogleCloudPlatform:mainfrom
melinath:registry-base-paths
Open

Converted generated (same as registered, for now) products to use registry for setting up base paths#17011
melinath wants to merge 15 commits intoGoogleCloudPlatform:mainfrom
melinath:registry-base-paths

Conversation

@melinath
Copy link
Copy Markdown
Member

@melinath melinath commented Apr 7, 2026

The core change here is using a map instead of a bunch of fields. For this iteration, I've stuck to just the currently-registered products (the list is/should be the same as generated products) to simplify things. I'll convert the remaining (handwritten) products separately (and register them along the way) so they can get more scrutiny.

I added the custom endpoint field name and the env var name to the product registration so that they're easy to access. This avoids needing to add the Underscore function in the downstreams and also allows for potential cases where they're not derivable for some reason.

Instead of modifying DefaultBasePaths and then pulling values from it, the new approach pulls the baseUrl directly from the product and modifies it for mtls/universe domain immediately.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.


@melinath melinath requested a review from SirGitsalot April 7, 2026 23:56
@melinath
Copy link
Copy Markdown
Member Author

melinath commented Apr 7, 2026

I'll want to also do some manual tests of the behavior tomorrow... that is, whether the list of products is the same & whether the replacements work as expected.

@melinath melinath marked this pull request as draft April 7, 2026 23:57
@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@melinath melinath force-pushed the registry-base-paths branch from e6672e1 to 5498595 Compare April 14, 2026 23:07
@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 292 files changed, 961 insertions(+), 2945 deletions(-))
google-beta provider: Diff ( 308 files changed, 1130 insertions(+), 3257 deletions(-))
terraform-google-conversion: Diff ( 6 files changed, 101 insertions(+), 2449 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 6297
Passed tests: 5632
Skipped tests: 651
Affected tests: 14

Click here to see the affected service packages

All service packages are affected

Action taken

Found 14 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAccessContextManager__access_policy_iam_policy
  • TestAccApigeeOrganization_apigeeOrganizationCloudBasicDisableVpcPeeringTestExample
  • TestAccApigeeOrganization_apigeeOrganizationCloudFullDisableVpcPeeringTestExample
  • TestAccArtifactRegistryRepository_artifactRegistryRepositoryCleanupExample
  • TestAccArtifactRegistryRepository_cleanup
  • TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
  • TestAccCloudRunService_cloudRunServiceGpuExample
  • TestAccContainerCluster_withAutopilotResourceManagerTags
  • TestAccDataSourceGoogleBackupDRManagementServer_basic
  • TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
  • TestAccProjectIamMemberRemove_memberInMultipleBindings
  • TestAccPubsubSubscription_pubsubSubscriptionTagsExample

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccAccessContextManager__access_level [Debug log]
TestAccAccessContextManager__access_level_condition [Debug log]
TestAccAccessContextManager__access_level_custom [Debug log]
TestAccAccessContextManager__access_level_full [Debug log]
TestAccAccessContextManager__access_levels [Debug log]
TestAccAccessContextManager__access_policy [Debug log]
TestAccAccessContextManager__access_policy_iam_binding [Debug log]
TestAccAccessContextManager__access_policy_iam_member [Debug log]
TestAccAccessContextManager__access_policy_scoped [Debug log]
TestAccAccessContextManager__authorized_orgs_desc [Debug log]
TestAccAccessContextManager__data_source_access_policy_basic [Debug log]
TestAccAccessContextManager__data_source_access_policy_scoped [Debug log]
TestAccAccessContextManager__gcp_user_access_binding [Debug log]
TestAccAccessContextManager__service_perimeter [Debug log]
TestAccAccessContextManager__service_perimeter_dry_run_egress_policy [Debug log]
TestAccAccessContextManager__service_perimeter_dry_run_ingress_policy [Debug log]
TestAccAccessContextManager__service_perimeter_dry_run_resource [Debug log]
TestAccAccessContextManager__service_perimeter_egress_policy [Debug log]
TestAccAccessContextManager__service_perimeter_ingress_policy [Debug log]
TestAccAccessContextManager__service_perimeter_resource [Debug log]
TestAccAccessContextManager__service_perimeter_update [Debug log]
TestAccAccessContextManager__service_perimeters [Debug log]
TestAccProjectIamMemberRemove_memberInMultipleBindings [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccAccessContextManager__access_policy_iam_policy [Error message] [Debug log]
TestAccApigeeOrganization_apigeeOrganizationCloudBasicDisableVpcPeeringTestExample [Error message] [Debug log]
TestAccApigeeOrganization_apigeeOrganizationCloudFullDisableVpcPeeringTestExample [Error message] [Debug log]
TestAccArtifactRegistryRepository_artifactRegistryRepositoryCleanupExample [Error message] [Debug log]
TestAccArtifactRegistryRepository_cleanup [Error message] [Debug log]
TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample [Error message] [Debug log]
TestAccCloudRunService_cloudRunServiceGpuExample [Error message] [Debug log]
TestAccContainerCluster_withAutopilotResourceManagerTags [Error message] [Debug log]
TestAccDataSourceGoogleBackupDRManagementServer_basic [Error message] [Debug log]
TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample [Error message] [Debug log]
TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample [Error message] [Debug log]
TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample [Error message] [Debug log]
TestAccPubsubSubscription_pubsubSubscriptionTagsExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@melinath
Copy link
Copy Markdown
Member Author

VCR failures look unrelated to this change.

@melinath
Copy link
Copy Markdown
Member Author

Compared provider schema before/after this change with:

TF_CLI_CONFIG_FILE="./tf-dev-override.tfrc" terraform providers schema -json

Didn't see a diff (but feel free to double-check me.)

@melinath melinath marked this pull request as ready for review April 16, 2026 22:19
@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 292 files changed, 961 insertions(+), 2945 deletions(-))
google-beta provider: Diff ( 308 files changed, 1130 insertions(+), 3257 deletions(-))
terraform-google-conversion: Diff ( 8 files changed, 153 insertions(+), 2501 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 6311
Passed tests: 5596
Skipped tests: 651
Affected tests: 64

Click here to see the affected service packages

All service packages are affected

Action taken

Found 64 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeOrganization_apigeeOrganizationCloudBasicDisableVpcPeeringTestExample
  • TestAccApigeeOrganization_apigeeOrganizationCloudFullDisableVpcPeeringTestExample
  • TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
  • TestAccCESApp_update
  • TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample
  • TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample_update
  • TestAccCloudRunService_cloudRunServiceGpuExample
  • TestAccContainerCluster_updateVersion
  • TestAccContainerCluster_withAutopilotResourceManagerTags
  • TestAccContainerCluster_withDatabaseEncryption
  • TestAccContainerCluster_withNodeConfigKubeletConfigSettingsInNodePool
  • TestAccContainerNodePool_withHostMaintenancePolicy
  • TestAccDNSManagedZone_dnsManagedZonePrivateGkeExample
  • TestAccDNSManagedZone_privateUpdate
  • TestAccDNSResponsePolicy_dnsResponsePolicyBasicExample
  • TestAccDNSResponsePolicy_update
  • TestAccDataSourceGoogleBackupDRManagementServer_basic
  • TestAccDataSourceGoogleGkeHubMembership_basic
  • TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
  • TestAccDataprocVirtualCluster_basic
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
  • TestAccFolderIamPolicy_basic
  • TestAccGKEBackupBackupPlanIamBindingGenerated
  • TestAccGKEBackupBackupPlanIamMemberGenerated
  • TestAccGKEBackupBackupPlanIamPolicyGenerated
  • TestAccGKEBackupBackupPlan_gkebackupBackupplanAutopilotExample
  • TestAccGKEBackupBackupPlan_gkebackupBackupplanBasicExample
  • TestAccGKEBackupBackupPlan_gkebackupBackupplanCmekExample
  • TestAccGKEBackupBackupPlan_gkebackupBackupplanFullExample
  • TestAccGKEBackupBackupPlan_gkebackupBackupplanNslabelsExample
  • TestAccGKEBackupBackupPlan_gkebackupBackupplanPermissiveExample
  • TestAccGKEBackupBackupPlan_gkebackupBackupplanRpoDailyWindowExample
  • TestAccGKEBackupBackupPlan_gkebackupBackupplanRpoWeeklyWindowExample
  • TestAccGKEBackupBackupPlan_update
  • TestAccGKEBackupRestorePlanIamBindingGenerated
  • TestAccGKEBackupRestorePlanIamMemberGenerated
  • TestAccGKEBackupRestorePlanIamPolicyGenerated
  • TestAccGKEBackupRestorePlan_gkebackupRestoreplanAllClusterResourcesExample
  • TestAccGKEBackupRestorePlan_gkebackupRestoreplanAllNamespacesExample
  • TestAccGKEBackupRestorePlan_gkebackupRestoreplanGitopsModeExample
  • TestAccGKEBackupRestorePlan_gkebackupRestoreplanProtectedApplicationExample
  • TestAccGKEBackupRestorePlan_gkebackupRestoreplanRenameNamespaceExample
  • TestAccGKEBackupRestorePlan_gkebackupRestoreplanRestoreOrderExample
  • TestAccGKEBackupRestorePlan_gkebackupRestoreplanRollbackNamespaceExample
  • TestAccGKEBackupRestorePlan_gkebackupRestoreplanSecondTransformationExample
  • TestAccGKEBackupRestorePlan_gkebackupRestoreplanVolumeResExample
  • TestAccGKEBackupRestorePlan_update
  • TestAccGKEHub2MembershipBinding_gkehubMembershipBindingBasicExample
  • TestAccGKEHub2MembershipRBACRoleBinding_gkehubMembershipRbacRoleBindingBasicExample
  • TestAccGKEHubFeatureMembership_gkehubFeatureAcmAllFields
  • TestAccGKEHubFeatureMembership_gkehubFeatureAcmOci
  • TestAccGKEHubFeatureMembership_gkehubFeatureAcmUpdate
  • TestAccGKEHubFeatureMembership_gkehubFeatureMesh
  • TestAccGKEHubFeatureMembership_gkehubFeaturePolicyController
  • TestAccGKEHubFeature_WorkloadIdentity
  • TestAccGKEHubFeature_gkehubFeatureMciUpdate
  • TestAccGKEHubMembershipIamBindingGenerated
  • TestAccGKEHubMembershipIamMemberGenerated
  • TestAccGKEHubMembershipIamPolicyGenerated
  • TestAccGKEHubMembership_gkehubMembershipBasicExample
  • TestAccGKEHubMembership_gkehubMembershipIssuerExample
  • TestAccGKEHubMembership_gkehubMembershipRegionalExample
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
  • TestAccPubsubSubscription_pubsubSubscriptionTagsExample

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccDNSManagedZone_dnsManagedZonePrivateGkeExample [Debug log]
TestAccDNSManagedZone_privateUpdate [Debug log]
TestAccDNSResponsePolicy_dnsResponsePolicyBasicExample [Debug log]
TestAccDNSResponsePolicy_update [Debug log]
TestAccDataSourceGoogleGkeHubMembership_basic [Debug log]
TestAccDataprocVirtualCluster_basic [Debug log]
TestAccFolderIamPolicy_basic [Debug log]
TestAccGKEBackupBackupPlanIamBindingGenerated [Debug log]
TestAccGKEBackupBackupPlanIamMemberGenerated [Debug log]
TestAccGKEBackupBackupPlanIamPolicyGenerated [Debug log]
TestAccGKEBackupBackupPlan_gkebackupBackupplanAutopilotExample [Debug log]
TestAccGKEBackupBackupPlan_gkebackupBackupplanBasicExample [Debug log]
TestAccGKEBackupBackupPlan_gkebackupBackupplanCmekExample [Debug log]
TestAccGKEBackupBackupPlan_gkebackupBackupplanFullExample [Debug log]
TestAccGKEBackupBackupPlan_gkebackupBackupplanNslabelsExample [Debug log]
TestAccGKEBackupBackupPlan_gkebackupBackupplanPermissiveExample [Debug log]
TestAccGKEBackupBackupPlan_gkebackupBackupplanRpoDailyWindowExample [Debug log]
TestAccGKEBackupBackupPlan_gkebackupBackupplanRpoWeeklyWindowExample [Debug log]
TestAccGKEBackupBackupPlan_update [Debug log]
TestAccGKEBackupRestorePlanIamBindingGenerated [Debug log]
TestAccGKEBackupRestorePlanIamMemberGenerated [Debug log]
TestAccGKEBackupRestorePlanIamPolicyGenerated [Debug log]
TestAccGKEBackupRestorePlan_gkebackupRestoreplanAllClusterResourcesExample [Debug log]
TestAccGKEBackupRestorePlan_gkebackupRestoreplanAllNamespacesExample [Debug log]
TestAccGKEBackupRestorePlan_gkebackupRestoreplanGitopsModeExample [Debug log]
TestAccGKEBackupRestorePlan_gkebackupRestoreplanProtectedApplicationExample [Debug log]
TestAccGKEBackupRestorePlan_gkebackupRestoreplanRenameNamespaceExample [Debug log]
TestAccGKEBackupRestorePlan_gkebackupRestoreplanRestoreOrderExample [Debug log]
TestAccGKEBackupRestorePlan_gkebackupRestoreplanRollbackNamespaceExample [Debug log]
TestAccGKEBackupRestorePlan_gkebackupRestoreplanSecondTransformationExample [Debug log]
TestAccGKEBackupRestorePlan_gkebackupRestoreplanVolumeResExample [Debug log]
TestAccGKEBackupRestorePlan_update [Debug log]
TestAccGKEHub2MembershipBinding_gkehubMembershipBindingBasicExample [Debug log]
TestAccGKEHub2MembershipRBACRoleBinding_gkehubMembershipRbacRoleBindingBasicExample [Debug log]
TestAccGKEHubFeatureMembership_gkehubFeatureAcmAllFields [Debug log]
TestAccGKEHubFeatureMembership_gkehubFeatureAcmOci [Debug log]
TestAccGKEHubFeatureMembership_gkehubFeatureAcmUpdate [Debug log]
TestAccGKEHubFeatureMembership_gkehubFeatureMesh [Debug log]
TestAccGKEHubFeatureMembership_gkehubFeaturePolicyController [Debug log]
TestAccGKEHubFeature_WorkloadIdentity [Debug log]
TestAccGKEHubFeature_gkehubFeatureMciUpdate [Debug log]
TestAccGKEHubMembershipIamBindingGenerated [Debug log]
TestAccGKEHubMembershipIamMemberGenerated [Debug log]
TestAccGKEHubMembershipIamPolicyGenerated [Debug log]
TestAccGKEHubMembership_gkehubMembershipBasicExample [Debug log]
TestAccGKEHubMembership_gkehubMembershipIssuerExample [Debug log]
TestAccGKEHubMembership_gkehubMembershipRegionalExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccApigeeOrganization_apigeeOrganizationCloudBasicDisableVpcPeeringTestExample [Error message] [Debug log]
TestAccApigeeOrganization_apigeeOrganizationCloudFullDisableVpcPeeringTestExample [Error message] [Debug log]
TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample [Error message] [Debug log]
TestAccCESApp_update [Error message] [Debug log]
TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample [Error message] [Debug log]
TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample_update [Error message] [Debug log]
TestAccCloudRunService_cloudRunServiceGpuExample [Error message] [Debug log]
TestAccContainerCluster_updateVersion [Error message] [Debug log]
TestAccContainerCluster_withAutopilotResourceManagerTags [Error message] [Debug log]
TestAccContainerCluster_withDatabaseEncryption [Error message] [Debug log]
TestAccContainerCluster_withNodeConfigKubeletConfigSettingsInNodePool [Error message] [Debug log]
TestAccContainerNodePool_withHostMaintenancePolicy [Error message] [Debug log]
TestAccDataSourceGoogleBackupDRManagementServer_basic [Error message] [Debug log]
TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample [Error message] [Debug log]
TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample [Error message] [Debug log]
TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample [Error message] [Debug log]
TestAccPubsubSubscription_pubsubSubscriptionTagsExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@melinath
Copy link
Copy Markdown
Member Author

melinath commented Apr 17, 2026

I think that I'll need to add a TGC-next registry (in a separate PR) before this one can be merged; the changes are too difficult to exclude / handle separately. So the order would be:

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 296 files changed, 1292 insertions(+), 3116 deletions(-))
google-beta provider: Diff ( 313 files changed, 1494 insertions(+), 3450 deletions(-))
terraform-google-conversion: Diff ( 166 files changed, 1075 insertions(+), 2930 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 6329
Passed tests: 5660
Skipped tests: 650
Affected tests: 19

Click here to see the affected service packages

All service packages are affected

Action taken

Found 19 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeOrganization_apigeeOrganizationCloudBasicDisableVpcPeeringTestExample
  • TestAccApigeeOrganization_apigeeOrganizationCloudFullDisableVpcPeeringTestExample
  • TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
  • TestAccCESApp_update
  • TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample
  • TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample_update
  • TestAccCloudRunService_cloudRunServiceGpuExample
  • TestAccContainerCluster_updateVersion
  • TestAccContainerCluster_withAutopilotResourceManagerTags
  • TestAccContainerCluster_withDatabaseEncryption
  • TestAccContainerCluster_withSandboxConfig
  • TestAccContainerNodePool_withHostMaintenancePolicy
  • TestAccDataSourceGoogleProjectService_basic
  • TestAccDataformConfig_update
  • TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
  • TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
  • TestAccPubsubSubscription_pubsubSubscriptionTagsExample

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccContainerCluster_withSandboxConfig [Debug log]
TestAccDataformConfig_update [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccApigeeOrganization_apigeeOrganizationCloudBasicDisableVpcPeeringTestExample [Error message] [Debug log]
TestAccApigeeOrganization_apigeeOrganizationCloudFullDisableVpcPeeringTestExample [Error message] [Debug log]
TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample [Error message] [Debug log]
TestAccCESApp_update [Error message] [Debug log]
TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample [Error message] [Debug log]
TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample_update [Error message] [Debug log]
TestAccCloudRunService_cloudRunServiceGpuExample [Error message] [Debug log]
TestAccContainerCluster_updateVersion [Error message] [Debug log]
TestAccContainerCluster_withAutopilotResourceManagerTags [Error message] [Debug log]
TestAccContainerCluster_withDatabaseEncryption [Error message] [Debug log]
TestAccContainerNodePool_withHostMaintenancePolicy [Error message] [Debug log]
TestAccDataSourceGoogleProjectService_basic [Error message] [Debug log]
TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample [Error message] [Debug log]
TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample [Error message] [Debug log]
TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample [Error message] [Debug log]
TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample [Error message] [Debug log]
TestAccPubsubSubscription_pubsubSubscriptionTagsExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@github-actions
Copy link
Copy Markdown

This PR is approved and has been waiting for merge for 1 week. Is it ready to merge? Use the label disable-review-reminders to disable these notifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants