Skip to content

Made ReplaceVars error if it fails to replace with non-empty values#17419

Open
melinath wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
melinath:replacevars-should-error
Open

Made ReplaceVars error if it fails to replace with non-empty values#17419
melinath wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
melinath:replacevars-should-error

Conversation

@melinath
Copy link
Copy Markdown
Member

@melinath melinath commented May 5, 2026

This is a follow-up to #17321 (comment)

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

provider: changed behavior of URL building to error if a value is missing (instead of using an empty string). This will more clearly surface bugs in URL building.

@modular-magician

This comment was marked as outdated.

@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 5, 2026

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 8 files changed, 72 insertions(+), 95 deletions(-)
google-beta provider View Diff 9 files changed, 72 insertions(+), 104 deletions(-)
terraform-google-conversion View Diff 1 file changed, 23 insertions(+), 27 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
6397 5637 655 105
Affected Service Packages
  • All service packages are affected

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 105 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
  • TestAccAppEngineApplicationUrlDispatchRules_appEngineApplicationUrlDispatchRulesBasicExample
  • TestAccBackupDRServiceConfig_backupDrServiceConfigExample
  • TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
  • TestAccBillingProjectInfo_update
  • TestAccCloudBillingProjectInfo_billingProjectInfoBasicExample
  • TestAccCloudRunService_cloudRunServiceGpuExample
  • TestAccComputeInstanceSettings_instanceSettingsBasicExample
  • TestAccComputeInstanceSettings_update
  • TestAccComputeProjectCloudArmorTier_basic
  • TestAccComputeProjectCloudArmorTier_modify
  • TestAccComputeRegionSecurityPolicy_regionSecurityPolicyWithRulesNetworkMatch
  • TestAccComputeSnapshotSettings_snapshotSettings_update
  • TestAccContainerCluster_updateVersion
  • TestAccContainerNodePool_withHostMaintenancePolicy
  • TestAccDataSourceGoogleCloudRunService_basic
  • TestAccDataSourceGoogleCloudRunService_optionalProject
  • TestAccDataSourceVertexAIIndex_basic
  • TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
  • TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
  • TestAccDialogflowCXEntityType_dialogflowcxEntityTypeFullExample
  • TestAccDialogflowCXEntityType_update
  • TestAccDialogflowCXEnvironment_dialogflowcxEnvironmentFullExample
  • TestAccDialogflowCXEnvironment_dialogflowcxEnvironmentRegionalExample
  • TestAccDialogflowCXEnvironment_update
  • TestAccDialogflowCXFlow_defaultStartFlow
  • TestAccDialogflowCXFlow_dialogflowcxFlowBasicExample
  • TestAccDialogflowCXFlow_dialogflowcxFlowDefaultStartFlowExample
  • TestAccDialogflowCXFlow_dialogflowcxFlowFullExample
  • TestAccDialogflowCXFlow_update
  • TestAccDialogflowCXGenerativeSettings_dialogflowcxGenerativeSettingsFullExample
  • TestAccDialogflowCXGenerativeSettings_update
  • TestAccDialogflowCXGenerator_dialogflowcxGeneratorBasicExample
  • TestAccDialogflowCXGenerator_dialogflowcxGeneratorUpdate
  • TestAccDialogflowCXIntent_defaultIntents
  • TestAccDialogflowCXIntent_dialogflowcxIntentDefaultNegativeIntentExample
  • TestAccDialogflowCXIntent_dialogflowcxIntentDefaultWelcomeIntentExample
  • TestAccDialogflowCXIntent_dialogflowcxIntentFullExample
  • TestAccDialogflowCXIntent_update
  • TestAccDialogflowCXPage_dialogflowcxPageFullExample
  • TestAccDialogflowCXPage_update
  • TestAccDialogflowCXPlaybook_dialogflowcxPlaybookBasicExample
  • TestAccDialogflowCXPlaybook_dialogflowcxPlaybookBasicExample_update
  • TestAccDialogflowCXPlaybook_dialogflowcxPlaybookFulfillmentExample
  • TestAccDialogflowCXTestCase_dialogflowcxTestCaseFullExample
  • TestAccDialogflowCXTestCase_update
  • TestAccDialogflowCXToolVersion_dialogflowcxToolVersionConnectorExample
  • TestAccDialogflowCXToolVersion_dialogflowcxToolVersionDataStoreExample
  • TestAccDialogflowCXToolVersion_dialogflowcxToolVersionFunctionExample
  • TestAccDialogflowCXToolVersion_dialogflowcxToolVersionOpenApiExample
  • TestAccDialogflowCXTool_dialogflowcxToolConnectorExample
  • TestAccDialogflowCXTool_dialogflowcxToolConnectorExample_update
  • TestAccDialogflowCXTool_dialogflowcxToolDataStoreExample
  • TestAccDialogflowCXTool_dialogflowcxToolFunctionExample
  • TestAccDialogflowCXTool_dialogflowcxToolOpenApiExample
  • TestAccDialogflowCXTool_update
  • TestAccDialogflowCXVersion_dialogflowcxVersionFullExample
  • TestAccDialogflowCXVersion_dialogflowcxVersionRegionalExample
  • TestAccDialogflowCXVersion_update
  • TestAccDialogflowCXWebhook_dialogflowcxWebhookFlexibleExample
  • TestAccDialogflowCXWebhook_dialogflowcxWebhookServiceDirectoryFlexibleExample
  • TestAccDialogflowCXWebhook_dialogflowcxWebhookServiceDirectoryStandardExample
  • TestAccDialogflowCXWebhook_dialogflowcxWebhookServiceDirectoryWithServiceAccountAuthExample
  • TestAccDialogflowCXWebhook_dialogflowcxWebhookStandardExample
  • TestAccDialogflowCXWebhook_dialogflowcxWebhookWithServiceAccountAuthExample
  • TestAccDialogflowCXWebhook_update
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
  • TestAccDiscoveryEngineSitemap_discoveryengineSitemapBasicExample
  • TestAccDocumentAIProcessorDefaultVersion_documentaiDefaultVersionExample
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
  • TestAccMonitoringDashboard_basic
  • TestAccMonitoringDashboard_rowLayout
  • TestAccMonitoringDashboard_update
  • TestAccOSLoginSSHPublicKey_osLoginSshKeyBasicExample
  • TestAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterFullExample
  • TestAccOracleDatabaseDbServers_basic
  • TestAccPubsubSubscription_pubsubSubscriptionTagsExample
  • TestAccServiceNetworkingVPCServiceControls_serviceNetworkingVpcServiceControlsBasicExample
  • TestAccServiceNetworkingVPCServiceControls_update
  • TestAccTagsLocationTagBinding_locationTagBindingBasicWithProjectId
  • TestAccTagsLocationTagBinding_locationTagBindingzonal
  • TestAccTags__tagsLocationTagBindingBasic
  • TestAccTags__tagsLocationTagBindingBasicDynamic
  • TestAccTags__tagsLocationTagBindingZonal
  • TestAccTags__tagsLocationTagBindingZonalDynamic
  • TestAccVertexAIEndpointIamBinding
  • TestAccVertexAIEndpointIamBindingGenerated
  • TestAccVertexAIEndpointIamMember
  • TestAccVertexAIEndpointIamMemberGenerated
  • TestAccVertexAIEndpointIamPolicy
  • TestAccVertexAIEndpointIamPolicyGenerated
  • TestAccVertexAIEndpointWithModelGardenDeployment_basic
  • TestAccVertexAIEndpointWithModelGardenDeployment_huggingfaceModel
  • TestAccVertexAIEndpointWithModelGardenDeployment_multipleModelsInSequence
  • TestAccVertexAIEndpointWithModelGardenDeployment_pscEndpoint
  • TestAccVertexAIEndpointWithModelGardenDeployment_pscEndpointAutomated
  • TestAccVertexAIEndpointWithModelGardenDeployment_withConfigs
  • TestAccVertexAIFeaturestoreEntitytypeIamBindingGenerated
  • TestAccVertexAIFeaturestoreEntitytypeIamMemberGenerated
  • TestAccVertexAIFeaturestoreEntitytypeIamPolicyGenerated
  • TestAccVertexAIIndex_updated
  • TestAccVertexAIMetadataStore_vertexAiMetadataStoreExample
  • TestAccWorkloadIdentityServiceAgent_AllFieldsPresent
  • TestAccWorkloadIdentityServiceAgent_workloadIdentityServiceAgentTestExample

View the build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log - TestAccTags/tagBindingBasic
✅ Log - TestAccTags/tagBindingBasicDynamic
✅ Log - TestAccTags/tagBindingNamespaced
✅ Log - TestAccTags/tagKeyBasic
✅ Log - TestAccTags/tagKeyBasicWithAllowedValuesRegex
✅ Log - TestAccTags/tagKeyBasicWithPurposeDataGovernance
✅ Log - TestAccTags/tagKeyBasicWithPurposeGceFirewall
✅ Log - TestAccTags/tagKeyIamBinding
✅ Log - TestAccTags/tagKeyIamMember
✅ Log - TestAccTags/tagKeyIamPolicy
✅ Log - TestAccTags/tagKeyUpdate
✅ Log - TestAccTags/tagKeyUpdateAllowedValuesRegex
✅ Log - TestAccTags/tagValueBasic
✅ Log - TestAccTags/tagValueIamBinding
✅ Log - TestAccTags/tagValueIamMember
✅ Log - TestAccTags/tagValueIamPolicy
✅ Log - TestAccTags/tagValueUpdate
✅ Log - TestAccTags/tagsLocationTagBindingZonalNamespaced
❌ Error · Log - TestAccApigeeOrganization_apigeeOrganizationCloudBasicDisableVpcPeeringTestExample
❌ Error · Log - TestAccApigeeOrganization_apigeeOrganizationCloudFullDisableVpcPeeringTestExample
❌ Error · Log - TestAccAppEngineApplicationUrlDispatchRules_appEngineApplicationUrlDispatchRulesBasicExample
❌ Error · Log - TestAccBackupDRServiceConfig_backupDrServiceConfigExample
❌ Error · Log - TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
❌ Error · Log - TestAccBillingProjectInfo_update
❌ Error · Log - TestAccCloudBillingProjectInfo_billingProjectInfoBasicExample
❌ Error · Log - TestAccCloudRunService_cloudRunServiceGpuExample
❌ Error · Log - TestAccComputeInstanceSettings_instanceSettingsBasicExample
❌ Error · Log - TestAccComputeInstanceSettings_update
❌ Error · Log - TestAccComputeProjectCloudArmorTier_basic
❌ Error · Log - TestAccComputeProjectCloudArmorTier_modify
❌ Error · Log - TestAccComputeRegionSecurityPolicy_regionSecurityPolicyWithRulesNetworkMatch
❌ Error · Log - TestAccComputeSnapshotSettings_snapshotSettings_update
❌ Error · Log - TestAccContainerCluster_updateVersion
❌ Error · Log - TestAccContainerNodePool_withHostMaintenancePolicy
❌ Error · Log - TestAccDataSourceGoogleCloudRunService_basic
❌ Error · Log - TestAccDataSourceGoogleCloudRunService_optionalProject
❌ Error · Log - TestAccDataSourceVertexAIIndex_basic
❌ Error · Log - TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
❌ Error · Log - TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
❌ Error · Log - TestAccDialogflowCXEntityType_dialogflowcxEntityTypeFullExample
❌ Error · Log - TestAccDialogflowCXEntityType_update
❌ Error · Log - TestAccDialogflowCXEnvironment_dialogflowcxEnvironmentFullExample
❌ Error · Log - TestAccDialogflowCXEnvironment_dialogflowcxEnvironmentRegionalExample
❌ Error · Log - TestAccDialogflowCXEnvironment_update
❌ Error · Log - TestAccDialogflowCXFlow_defaultStartFlow
❌ Error · Log - TestAccDialogflowCXFlow_dialogflowcxFlowBasicExample
❌ Error · Log - TestAccDialogflowCXFlow_dialogflowcxFlowDefaultStartFlowExample
❌ Error · Log - TestAccDialogflowCXFlow_dialogflowcxFlowFullExample
❌ Error · Log - TestAccDialogflowCXFlow_update
❌ Error · Log - TestAccDialogflowCXGenerativeSettings_dialogflowcxGenerativeSettingsFullExample
❌ Error · Log - TestAccDialogflowCXGenerativeSettings_update
❌ Error · Log - TestAccDialogflowCXGenerator_dialogflowcxGeneratorBasicExample
❌ Error · Log - TestAccDialogflowCXGenerator_dialogflowcxGeneratorUpdate
❌ Error · Log - TestAccDialogflowCXIntent_defaultIntents
❌ Error · Log - TestAccDialogflowCXIntent_dialogflowcxIntentDefaultNegativeIntentExample
❌ Error · Log - TestAccDialogflowCXIntent_dialogflowcxIntentDefaultWelcomeIntentExample
❌ Error · Log - TestAccDialogflowCXIntent_dialogflowcxIntentFullExample
❌ Error · Log - TestAccDialogflowCXIntent_update
❌ Error · Log - TestAccDialogflowCXPage_dialogflowcxPageFullExample
❌ Error · Log - TestAccDialogflowCXPage_update
❌ Error · Log - TestAccDialogflowCXPlaybook_dialogflowcxPlaybookBasicExample
❌ Error · Log - TestAccDialogflowCXPlaybook_dialogflowcxPlaybookBasicExample_update
❌ Error · Log - TestAccDialogflowCXPlaybook_dialogflowcxPlaybookFulfillmentExample
❌ Error · Log - TestAccDialogflowCXTestCase_dialogflowcxTestCaseFullExample
❌ Error · Log - TestAccDialogflowCXTestCase_update
❌ Error · Log - TestAccDialogflowCXToolVersion_dialogflowcxToolVersionConnectorExample
❌ Error · Log - TestAccDialogflowCXToolVersion_dialogflowcxToolVersionDataStoreExample
❌ Error · Log - TestAccDialogflowCXToolVersion_dialogflowcxToolVersionFunctionExample
❌ Error · Log - TestAccDialogflowCXToolVersion_dialogflowcxToolVersionOpenApiExample
❌ Error · Log - TestAccDialogflowCXTool_dialogflowcxToolConnectorExample
❌ Error · Log - TestAccDialogflowCXTool_dialogflowcxToolConnectorExample_update
❌ Error · Log - TestAccDialogflowCXTool_dialogflowcxToolDataStoreExample
❌ Error · Log - TestAccDialogflowCXTool_dialogflowcxToolFunctionExample
❌ Error · Log - TestAccDialogflowCXTool_dialogflowcxToolOpenApiExample
❌ Error · Log - TestAccDialogflowCXTool_update
❌ Error · Log - TestAccDialogflowCXVersion_dialogflowcxVersionFullExample
❌ Error · Log - TestAccDialogflowCXVersion_dialogflowcxVersionRegionalExample
❌ Error · Log - TestAccDialogflowCXVersion_update
❌ Error · Log - TestAccDialogflowCXWebhook_dialogflowcxWebhookFlexibleExample
❌ Error · Log - TestAccDialogflowCXWebhook_dialogflowcxWebhookServiceDirectoryFlexibleExample
❌ Error · Log - TestAccDialogflowCXWebhook_dialogflowcxWebhookServiceDirectoryStandardExample
❌ Error · Log - TestAccDialogflowCXWebhook_dialogflowcxWebhookServiceDirectoryWithServiceAccountAuthExample
❌ Error · Log - TestAccDialogflowCXWebhook_dialogflowcxWebhookStandardExample
❌ Error · Log - TestAccDialogflowCXWebhook_dialogflowcxWebhookWithServiceAccountAuthExample
❌ Error · Log - TestAccDialogflowCXWebhook_update
❌ Error · Log - TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
❌ Error · Log - TestAccDiscoveryEngineSitemap_discoveryengineSitemapBasicExample
❌ Error · Log - TestAccDocumentAIProcessorDefaultVersion_documentaiDefaultVersionExample
❌ Error · Log - TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
❌ Error · Log - TestAccMonitoringDashboard_basic
❌ Error · Log - TestAccMonitoringDashboard_rowLayout
❌ Error · Log - TestAccMonitoringDashboard_update
❌ Error · Log - TestAccOSLoginSSHPublicKey_osLoginSshKeyBasicExample
❌ Error · Log - TestAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterFullExample
❌ Error · Log - TestAccOracleDatabaseDbServers_basic
❌ Error · Log - TestAccPubsubSubscription_pubsubSubscriptionTagsExample
❌ Error · Log - TestAccServiceNetworkingVPCServiceControls_serviceNetworkingVpcServiceControlsBasicExample
❌ Error · Log - TestAccServiceNetworkingVPCServiceControls_update
❌ Error · Log - TestAccTagsLocationTagBinding_locationTagBindingBasicWithProjectId
❌ Error · Log - TestAccTagsLocationTagBinding_locationTagBindingzonal
❌ Error · Log - TestAccTags/tagsLocationTagBindingBasic
❌ Error · Log - TestAccTags/tagsLocationTagBindingBasicDynamic
❌ Error · Log - TestAccTags/tagsLocationTagBindingZonal
❌ Error · Log - TestAccTags/tagsLocationTagBindingZonalDynamic
❌ Error · Log - TestAccVertexAIEndpointIamBinding
❌ Error · Log - TestAccVertexAIEndpointIamBindingGenerated
❌ Error · Log - TestAccVertexAIEndpointIamMember
❌ Error · Log - TestAccVertexAIEndpointIamMemberGenerated
❌ Error · Log - TestAccVertexAIEndpointIamPolicy
❌ Error · Log - TestAccVertexAIEndpointIamPolicyGenerated
❌ Error · Log - TestAccVertexAIEndpointWithModelGardenDeployment_basic
❌ Error · Log - TestAccVertexAIEndpointWithModelGardenDeployment_huggingfaceModel
❌ Error · Log - TestAccVertexAIEndpointWithModelGardenDeployment_multipleModelsInSequence
❌ Error · Log - TestAccVertexAIEndpointWithModelGardenDeployment_pscEndpoint
❌ Error · Log - TestAccVertexAIEndpointWithModelGardenDeployment_pscEndpointAutomated
❌ Error · Log - TestAccVertexAIEndpointWithModelGardenDeployment_withConfigs
❌ Error · Log - TestAccVertexAIFeaturestoreEntitytypeIamBindingGenerated
❌ Error · Log - TestAccVertexAIFeaturestoreEntitytypeIamMemberGenerated
❌ Error · Log - TestAccVertexAIFeaturestoreEntitytypeIamPolicyGenerated
❌ Error · Log - TestAccVertexAIIndex_updated
❌ Error · Log - TestAccVertexAIMetadataStore_vertexAiMetadataStoreExample
❌ Error · Log - TestAccWorkloadIdentityServiceAgent_AllFieldsPresent
❌ Error · Log - TestAccWorkloadIdentityServiceAgent_workloadIdentityServiceAgentTestExample

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the build log or the debug logs folder for detailed results.

@melinath VCR tests complete for f3992f9!

@melinath
Copy link
Copy Markdown
Member Author

melinath commented May 6, 2026

Looks like it's not that easy. Here are a couple of the failure cases from above:

  • google_dialogflow_cx_generator extracts location from the parent field
    • potential fix: Allow passing in an explicit map[string]string of additional replacements.
  • google_vertex_ai_endpoint_with_model_garden_deployment seems to fail on this line which is the first use of VertexAIBasePath... but the previous use of the BaseUrl function worked fine, so it ought to work here too.
    • This seems like probably just a bug in the replacement logic that would need investigating.
  • google_tags_location_tag_binding: There's a failure in the post-test destroy of the tag values and keys that are related to the binding, but I don't see an obvious reason that they'd be trying to use a locational base URL there in the first place.
  • google_oracle_database_servers: fails on this line, where ReplaceVars is used to build the resource ID. This is a real bug - a typo in the field name.
  • google_billing_project_info: fails because {{name}} isn't a field on the resource - this is a real typo.

On the one hand, this is way fewer errors than it could've been! on the other hand, it's enough that it'll take some time to work through.

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.

2 participants