magic-modules
magic-modules copied to clipboard
docs: Improve Terraform example for google_vpc_access_connector
Improve the Terraform example for google_vpc_access_connector
with Shared-VPC. The current example does not work properly, because the lookup of the subnet is not working perfectly.
Since the network management in the context of Shared-VPC is mostly done centrally, the new example uses a data source for the serverless subnetwork google_compute_subnetwork
.
Hello! I am a robot. Tests will require approval from a repository maintainer to run.
@trodge, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.
You can help make sure that review is quick by doing a self-review and by running impacted tests locally.
This is my first PR in this project and hopefully I get everything right.
/gcbrun
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.
Terraform GA: Diff ( 2 files changed, 14 insertions(+), 24 deletions(-)) Terraform Beta: Diff ( 2 files changed, 14 insertions(+), 24 deletions(-)) TF OiCS: Diff ( 1 file changed, 7 insertions(+), 12 deletions(-))
Tests analytics
Total tests: 4
Passed tests: 3
Skipped tests: 0
Affected tests: 1
Click here to see the affected service packages
- vpcaccess
Action taken
Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccVPCAccessConnector_vpcAccessConnectorSharedVpcExample
$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccVPCAccessConnector_vpcAccessConnectorSharedVpcExample
[Error message] [Debug log]
$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$ View the build log or the debug log for each test
Okay, then I'll investigate locally first.
By the way: this helped me a lot: https://github.com/rbenv/ruby-build/discussions/1933#discussioncomment-2131144
Hi @trodge , I tried to run the test and all locally, but cannot find the issue. I can't access the error-log and debug-log from above.
This is the error the test is failing with:
2024-02-23T22:33:54.669Z [WARN] sdk.helper_resource: Error running Terraform CLI command: test_terraform_path=/bin/terraform test_step_number=1
error=
| exit status 1
|
| Error: Reference to undeclared resource
|
| on terraform_plugin_test.tf line 5, in resource "google_vpc_access_connector" "connector":
| 5: name = google_compute_subnetwork.custom_test.name
|
| A managed resource "google_compute_subnetwork" "custom_test" has not been
| declared in the root module.
|
| Did you mean the data resource data.google_compute_subnetwork.custom_test?
|
| Error: Reference to undeclared input variable
|
| on terraform_plugin_test.tf line 14, in data "google_compute_subnetwork" "custom_test":
| 14: region = var.region
|
| An input variable with the name "region" has not been declared. This variable
| can be declared with a variable "region" {} block.
test_working_directory=/tmp/plugintest1475029740 test_name=TestAccVPCAccessConnector_vpcAccessConnectorSharedVpcExample
/gcbrun
/gcbrun
A rebase may help with the CI failure happening in this PR.
@GoogleCloudPlatform/terraform-team This PR has been waiting for review for 3 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.
@GoogleCloudPlatform/terraform-team This PR has been waiting for review for 4 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.
@GoogleCloudPlatform/terraform-team This PR has been waiting for review for 5 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 6 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 7 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 8 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 9 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 10 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 11 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 12 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 13 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 14 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 15 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 16 weeks. Please take a look! Use the label disable-review-reminders
to disable these notifications.