switch service networking connection to use create on create rather than update
Fixes https://github.com/hashicorp/terraform-provider-google/issues/10830
I'm not sure if this is a breaking change or not? It's only on create so shouldn't break current configs? But functionality will change.
If this PR is for Terraform, I acknowledge that I have:
- [x] Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
- [x] Generated Terraform, and ran
make testandmake lintto ensure it passes unit and linter tests. - [x] Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
- [x] Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
- [x] Read the Release Notes Guide before writing my release note below.
Release Note Template for Downstream PRs (will be copied)
servicenetworking: fixed bug where `google_service_networking_connection` would update if a service connection of the same type already exists.
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 2 files changed, 79 insertions(+), 22 deletions(-)) Terraform Beta: Diff ( 2 files changed, 79 insertions(+), 22 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccApigeeEnvironmentIamBindingGenerated|TestAccApigeeEnvironmentIamMemberGenerated|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccCloudbuildWorkerPool_withNetwork|TestAccCloudbuildWorkerPool_basic|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccServiceNetworkingPeeredDNSDomain_basic|TestAccServiceNetworkingConnection_create|TestAccServiceNetworkingConnection_update|TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeReplica|TestAccTPUNode_tpuNodeFullExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=256815
It looks like we can't bootstrap the networks with these tests (as is), because once the service connection is deleted in a given network, it can no longer be recreated in that network - unless we do a force update, which would of course defeat the purpose of this PR.
I will update the other tests that use the service networking connection.
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 3 files changed, 105 insertions(+), 48 deletions(-)) Terraform Beta: Diff ( 3 files changed, 105 insertions(+), 48 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccApigeeEnvironmentIamBindingGenerated|TestAccApigeeEnvironmentIamMemberGenerated|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccCloudbuildWorkerPool_basic|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeReplica|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone|TestAccTPUNode_tpuNodeFullExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=257222
Tests failed during RECORDING mode: TestAccTPUNode_tpuNodeFullExample|TestAccCloudbuildWorkerPool_basic|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeReplica|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange Please fix these to complete your PR
It seems that the errors occur when running in parallel, the clone and replica tests work for me, locally, on their own. I hate to remove the ability to run in parallel since these tests take SO long, but i'm not sure what the other option is 😬
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 3 files changed, 105 insertions(+), 56 deletions(-)) Terraform Beta: Diff ( 3 files changed, 105 insertions(+), 56 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccApigeeEnvironmentIamBindingGenerated|TestAccApigeeEnvironmentIamMemberGenerated|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccCloudbuildWorkerPool_basic|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccServiceNetworkingPeeredDNSDomain_basic|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeReplica|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone|TestAccTPUNode_tpuNodeFullExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=258068
@slevenick sorry, i put this off for a bit, but yea, they pass locally, individually (at least 2 of them did), but i think the problem is when they are run alongside other tests, although, here, they still failed after i removed the t.Parallel. But even then, I'm not sure that's a good idea because each one takes about a half hour, I think that's adding 2 more hours to our test runs, which I don't really love the idea of.
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 3 files changed, 105 insertions(+), 56 deletions(-)) Terraform Beta: Diff ( 3 files changed, 105 insertions(+), 56 deletions(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceSqlDatabaseInstance_basic|TestAccApigeeEnvironmentIamBindingGenerated|TestAccApigeeEnvironmentIamMemberGenerated|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccApikeysKey_AndroidKey|TestAccApikeysKey_BasicKey|TestAccApikeysKey_MinimalKey|TestAccApikeysKey_IosKey|TestAccApikeysKey_ServerKey|TestAccArtifactRegistryRepository_create_mvn_snapshot|TestAccArtifactRegistryRepository_create_mvn_release|TestAccBigqueryReservationAssignment_BasicHandWritten|TestAccCGCSnippet_sqlMysqlInstanceBackupExample|TestAccCGCSnippet_sqlPostgresInstanceBackupExample|TestAccCGCSnippet_sqlSqlserverInstanceBackupExample|TestAccCGCSnippet_sqlMysqlInstanceAuthorizedNetworkExample|TestAccCGCSnippet_sqlSqlserverInstanceBackupLocationExample|TestAccCGCSnippet_sqlSqlserverInstanceBackupRetentionExample|TestAccCloudBuildTrigger_cloudbuildTriggerPubsubConfigExample|TestAccCloudBuildTrigger_cloudbuildTriggerWebhookConfigExample|TestAccCloudBuildTrigger_cloudbuildTriggerManualExample|TestAccCloudBuildTrigger_cloudbuildTriggerFilenameExample|TestAccCloudBuildTrigger_cloudbuildTriggerBuildExample|TestAccCloudBuildTrigger_basic|TestAccCloudBuildTrigger_available_secrets_config|TestAccCloudBuildTrigger_cloudbuildTriggerServiceAccountExample|TestAccCloudBuildTrigger_disable|TestAccCloudBuildTrigger_fullStep|TestAccCloudFunctionsFunction_secretEnvVar|TestAccContainerAwsCluster_BasicHandWritten|TestAccContainerAwsNodePool_BasicHandWritten|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccContainerNodePool_gvnic|TestAccDataprocCluster_nonPreemptibleSecondary|TestAccDataprocCluster_updatable|TestAccDataprocCluster_withConfigOverrides|TestAccFirebaserulesRelease_BasicRelease|TestAccFirebaserulesRelease_MinimalRelease|TestAccFirebaserulesRuleset_BasicRuleset|TestAccFirebaserulesRuleset_MinimalRuleset|TestAccServiceNetworkingPeeredDNSDomain_basic|TestAccLoggingLogView_BasicHandWritten|TestAccMonitoringUptimeCheckConfig_uptimeCheckConfigHttpExample|TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginAdvancedExample|TestAccNetworkServicesEdgeCacheOrigin_updateAndImport|TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceAdvancedExample|TestAccNetworkServicesEdgeCacheService_updateAndImport|TestAccOSConfigPatchDeployment_osConfigPatchDeploymentDailyMidnightExample|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeReplica|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone|TestAccStorageTransferJob_omitScheduleEndDate|TestAccTPUNode_tpuNodeFullExample|TestAccStorageTransferJob_basic|TestAccStorageTransferJob_posixSink|TestAccStorageTransferJob_posixSource You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=271250
Changing from acquire -> error if already exists probably counts as a breaking change (and needing to change our tests is a good signal of that), I think?
Tests failed during RECORDING mode: TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccTPUNode_tpuNodeFullExample|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeReplica|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone Please fix these to complete your PR