magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

docs: Improve Terraform example for google_vpc_access_connector

Open ppuschmann opened this issue 1 year ago • 27 comments

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.


ppuschmann avatar Feb 23 '24 08:02 ppuschmann

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.

github-actions[bot] avatar Feb 23 '24 08:02 github-actions[bot]

This is my first PR in this project and hopefully I get everything right.

ppuschmann avatar Feb 23 '24 08:02 ppuschmann

/gcbrun

trodge avatar Feb 23 '24 22:02 trodge

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(-))

modular-magician avatar Feb 23 '24 22:02 modular-magician

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

Get to know how VCR tests work

modular-magician avatar Feb 23 '24 22:02 modular-magician

$\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

modular-magician avatar Feb 23 '24 22:02 modular-magician

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

ppuschmann avatar Feb 27 '24 11:02 ppuschmann

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.

ppuschmann avatar Feb 27 '24 15:02 ppuschmann

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

trodge avatar Feb 27 '24 22:02 trodge

/gcbrun

trodge avatar Apr 11 '24 20:04 trodge

/gcbrun

trodge avatar Apr 17 '24 19:04 trodge

A rebase may help with the CI failure happening in this PR.

trodge avatar Apr 17 '24 22:04 trodge

@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.

github-actions[bot] avatar May 22 '24 09:05 github-actions[bot]

@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.

github-actions[bot] avatar May 29 '24 09:05 github-actions[bot]

@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.

github-actions[bot] avatar Jun 05 '24 09:06 github-actions[bot]

@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.

github-actions[bot] avatar Jun 12 '24 09:06 github-actions[bot]

@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.

github-actions[bot] avatar Jun 19 '24 09:06 github-actions[bot]

@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.

github-actions[bot] avatar Jun 26 '24 09:06 github-actions[bot]

@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.

github-actions[bot] avatar Jul 03 '24 09:07 github-actions[bot]

@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.

github-actions[bot] avatar Jul 10 '24 09:07 github-actions[bot]

@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.

github-actions[bot] avatar Jul 17 '24 09:07 github-actions[bot]

@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.

github-actions[bot] avatar Jul 24 '24 09:07 github-actions[bot]

@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.

github-actions[bot] avatar Jul 31 '24 09:07 github-actions[bot]

@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.

github-actions[bot] avatar Aug 07 '24 09:08 github-actions[bot]

@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.

github-actions[bot] avatar Aug 14 '24 09:08 github-actions[bot]

@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.

github-actions[bot] avatar Aug 21 '24 09:08 github-actions[bot]