compute: fix TestAccComputeInstanceFromMachineImage_diffProject - #18826
Conversation
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 8335352: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
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 recording VCR build log or the debug logs folder for detailed results. @SirGitsalot VCR tests complete for 8335352! |
8335352 to
83c6637
Compare
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 83c6637: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
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 recording VCR build log or the debug logs folder for detailed results. @SirGitsalot VCR tests complete for 83c6637! |
83c6637 to
cde23ca
Compare
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit cde23ca: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
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 recording VCR build log or the debug logs folder for detailed results. @SirGitsalot VCR tests complete for cde23ca! |
cde23ca to
ffdd4bf
Compare
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit ffdd4bf: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
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 recording VCR build log or the debug logs folder for detailed results. @SirGitsalot VCR tests complete for ffdd4bf! |
Fixes nightly acceptance test failure for
TestAccComputeInstanceFromMachineImage_diffProject.Fixes hashicorp/terraform-provider-google#26363
Root Cause & Fix
The test creates a new GCP project (
google_project.project) and provisions agoogle_compute_instance.vminside it. However, newly created projects may not have a default VPC network pre-provisioned. Attempting to create the VM usingnetwork = "default"causes API 400 errors (The referenced network resource cannot be found).This fix explicitly creates a
google_compute_network.netin the newly created project withauto_create_subnetworks = trueand attachesgoogle_compute_instance.vmtogoogle_compute_network.net.self_link, allowing the cross-project instance creation from machine image to succeed cleanly without relying on an unprovisioneddefaultnetwork in the secondary project.