Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Direct VPC egress support for Cloud Run V2 resources #8932

Merged
merged 6 commits into from
Sep 15, 2023

Conversation

yanweiguo
Copy link
Member

Fixes hashicorp/terraform-provider-google#15568

Release Note Template for Downstream PRs (will be copied)

cloudrunv2: added fields `network_interfaces` to resource `google_cloud_run_v2_job` to support Direct VPC egress.
cloudrunv2: added fields `network_interfaces` to resource `google_cloud_run_v2_service` to support Direct VPC egress.

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will run automatically.

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

@modular-magician
Copy link
Collaborator

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 ( 6 files changed, 456 insertions(+))
Terraform Beta: Diff ( 6 files changed, 456 insertions(+))
TF Conversion: Diff ( 2 files changed, 110 insertions(+))
TF OiCS: Diff ( 8 files changed, 244 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_cloud_run_v2_service (25 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_cloud_run_v2_service" "primary" {
  template {
    vpc_access {
      network_interfaces {
        subnetwork = # value needed
        tags       = # value needed
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3039
Passed tests 2736
Skipped tests: 297
Affected tests: 6

Action taken

Found 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudRunV2Job_cloudrunv2JobDirectvpcExample|TestAccCloudRunV2Service_cloudrunv2ServiceDirectvpcExample|TestAccGKEHub2Scope_gkehubScopeBasicExample|TestAccGKEHub2ScopeIamMemberGenerated|TestAccGKEHub2ScopeIamBindingGenerated|TestAccGKEHub2ScopeIamPolicyGenerated

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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 ( 6 files changed, 460 insertions(+))
Terraform Beta: Diff ( 6 files changed, 460 insertions(+))
TF Conversion: Diff ( 2 files changed, 110 insertions(+))
TF OiCS: Diff ( 8 files changed, 246 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3039
Passed tests 2733
Skipped tests: 297
Affected tests: 9

Action taken

Found 9 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample|TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccCloudRunV2Service_cloudrunv2ServiceDirectvpcExample|TestAccCloudRunV2Job_cloudrunv2JobDirectvpcExample|TestAccGKEHub2Scope_gkehubScopeBasicExample|TestAccGKEHub2ScopeIamBindingGenerated|TestAccGKEHub2ScopeIamMemberGenerated|TestAccGKEHub2ScopeIamPolicyGenerated

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample[Debug log]
TestAccCloudRunV2Service_cloudrunv2ServiceDirectvpcExample[Debug log]
TestAccCloudRunV2Job_cloudrunv2JobDirectvpcExample[Debug log]
TestAccGKEHub2Scope_gkehubScopeBasicExample[Debug log]
TestAccGKEHub2ScopeIamBindingGenerated[Debug log]
TestAccGKEHub2ScopeIamMemberGenerated[Debug log]
TestAccGKEHub2ScopeIamPolicyGenerated[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are any of these fields support in-place update? If so, would you mind adding/ modifying an update test to the update functionality of it?

@yanweiguo
Copy link
Member Author

Are any of these fields support in-place update? If so, would you mind adding/ modifying an update test to the update functionality of it?

Added tests. For Service, I can only use existing "default" network. For Job, non-existing networks are fine.

While adding the tests, found that existing egress field lacks default setting. Added default_from_api: true since our API set a default value for this field.

@modular-magician
Copy link
Collaborator

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 ( 8 files changed, 632 insertions(+))
Terraform Beta: Diff ( 8 files changed, 632 insertions(+))
TF Conversion: Diff ( 2 files changed, 110 insertions(+))
TF OiCS: Diff ( 8 files changed, 246 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3049
Passed tests 2747
Skipped tests: 298
Affected tests: 4

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudRunV2Job_cloudrunv2JobWithDirectVPCUpdate|TestAccCloudRunV2Service_cloudrunv2ServiceWithDirectVPCUpdate|TestAccCloudRunV2Service_cloudrunv2ServiceDirectvpcExample|TestAccCloudRunV2Job_cloudrunv2JobDirectvpcExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccCloudRunV2Job_cloudrunv2JobWithDirectVPCUpdate[Debug log]
TestAccCloudRunV2Service_cloudrunv2ServiceWithDirectVPCUpdate[Debug log]
TestAccCloudRunV2Service_cloudrunv2ServiceDirectvpcExample[Debug log]
TestAccCloudRunV2Job_cloudrunv2JobDirectvpcExample[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google_cloud_run_v2_service and google_cloud_run_v2_job do not support Direct VPC egress with a VPC network
3 participants