Skip to content

Added new resource "LbEdgeExtension"#15456

Merged
melinath merged 8 commits intoGoogleCloudPlatform:mainfrom
matheusaleixo-cit:add-new-resource-for-networkservices-lb-edge-extensions
Nov 25, 2025
Merged

Added new resource "LbEdgeExtension"#15456
melinath merged 8 commits intoGoogleCloudPlatform:mainfrom
matheusaleixo-cit:add-new-resource-for-networkservices-lb-edge-extensions

Conversation

@matheusaleixo-cit
Copy link
Contributor

Adds new resource google_network_services_lb_edge_extension.

Fixes: #24173

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

`google_network_services_lb_edge_extension`

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Oct 22, 2025
@matheusaleixo-cit matheusaleixo-cit marked this pull request as ready for review November 11, 2025 21:09
@github-actions github-actions bot requested a review from melinath November 11, 2025 21:10
@github-actions
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

Googlers: For automatic test runs see go/terraform-auto-test-runs.

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

@melinath
Copy link
Member

/gcbrun

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

I've kicked off a test run in case there are failures. I looked through the code & it generally looks reasonable; just one change suggestion for the update tests.

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 12, 2025
@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.

google provider: Diff ( 7 files changed, 2090 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 2090 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 332 insertions(+))

Missing test report

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

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

resource "google_network_services_lb_edge_extension" "primary" {
  extension_chains {
    extensions {
      authority = # value needed
      timeout   = # value needed
    }
  }
}

Missing service labels

The following new resources do not have corresponding service labels:

  • google_network_services_lb_edge_extension

If you believe this detection to be incorrect please raise the concern with your reviewer. Googlers: This error is safe to ignore once you've completed go/fix-missing-service-labels.
An override-missing-service-label label can be added to allow merging.

@modular-magician
Copy link
Collaborator

Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccNetworkServicesLbEdgeExtension_networkServicesLbEdgeExtensionBasicExample

Tests analytics

Total tests: 73
Passed tests: 67
Skipped tests: 4
Affected tests: 2

Click here to see the affected service packages
  • networkservices

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccNetworkServicesGateway_swpUpdate
  • TestAccNetworkServicesLbEdgeExtension_networkServicesLbEdgeExtensionBasicUpdate

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccNetworkServicesLbEdgeExtension_networkServicesLbEdgeExtensionBasicUpdate [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccNetworkServicesGateway_swpUpdate [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 12, 2025
@github-actions github-actions bot requested a review from melinath November 12, 2025 20:57
lb_edge_extension_name: 'elb-edge-ext'
wasm_plugin_name: 'elb-wasm-plugin-data'
repository_name: 'repository-standard'
skip_test: https://github.com/GoogleCloudPlatform/magic-modules/pull/12275#discussion_r2283175770
Copy link
Member

Choose a reason for hiding this comment

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

It looks like you found a way to set up a wasm_plugin in the update test - very cool! In that case, rather than generating a skipped test here, you can just exclude the example from test generation altogether.

Suggested change
skip_test: https://github.com/GoogleCloudPlatform/magic-modules/pull/12275#discussion_r2283175770
exclude_test: true

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

please also fix the missing tests.

- Removed extension fields authority and timeout;
@github-actions github-actions bot requested a review from melinath November 13, 2025 19:54
@matheusaleixo-cit
Copy link
Contributor Author

Hi, I removed the two extension fields authority and timeout since according to the API docs they are not supported for plugin extensions.

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 13, 2025
@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.

google provider: Diff ( 6 files changed, 1864 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 1864 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 310 insertions(+))

Missing test report

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

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

resource "google_network_services_lb_edge_extension" "primary" {
  description = # value needed
  extension_chains {
    extensions {
      fail_open        = # value needed
      forward_headers  = # value needed
      name             = # value needed
      service          = # value needed
      supported_events = # value needed
    }
    match_condition {
      cel_expression = # value needed
    }
    name = # value needed
  }
  forwarding_rules      = # value needed
  labels                = # value needed
  load_balancing_scheme = # value needed
  location              = # value needed
  name                  = # value needed
}

Missing service labels

The following new resources do not have corresponding service labels:

  • google_network_services_lb_edge_extension

If you believe this detection to be incorrect please raise the concern with your reviewer. Googlers: This error is safe to ignore once you've completed go/fix-missing-service-labels.
An override-missing-service-label label can be added to allow merging.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 72
Passed tests: 68
Skipped tests: 3
Affected tests: 1

Click here to see the affected service packages
  • networkservices

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
  • TestAccNetworkServicesGateway_swpUpdate

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccNetworkServicesGateway_swpUpdate [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

Could you add the missing tests? These were previously in the (skipped) example so they weren't detected as "missing" (even though they were).

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 14, 2025
@github-actions github-actions bot requested a review from melinath November 14, 2025 22:34
@github-actions
Copy link

@melinath This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

It looks like the tests aren't getting detected due to the use of fmt.Sprint. I'm actually not 100% sure whether switching to string concatenation will fix the problem, but fmt.Sprint isn't a common pattern / both args are strings, so I'd prefer to eliminate it regardless. If the tests still aren't detected I'll just verify that all fields are present manually.

P.S. Thanks for making sure updatable fields were being updated!

}

func testAccNetworkServicesLbEdgeExtension_networkServicesLbEdgeExtensionBasicCreate(context map[string]interface{}) string {
return fmt.Sprint(testAccNetworkServicesWasmPlugin_artifactRegistryRepositorySetup(context), acctest.Nprintf(`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return fmt.Sprint(testAccNetworkServicesWasmPlugin_artifactRegistryRepositorySetup(context), acctest.Nprintf(`
return testAccNetworkServicesWasmPlugin_artifactRegistryRepositorySetup(context) + acctest.Nprintf(`

}

func testAccNetworkServicesLbEdgeExtension_networkServicesLbEdgeExtensionBasicUpdate(context map[string]interface{}) string {
return fmt.Sprint(testAccNetworkServicesWasmPlugin_artifactRegistryRepositorySetup(context), acctest.Nprintf(`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return fmt.Sprint(testAccNetworkServicesWasmPlugin_artifactRegistryRepositorySetup(context), acctest.Nprintf(`
return testAccNetworkServicesWasmPlugin_artifactRegistryRepositorySetup(context) + acctest.Nprintf(`

}
}
}
`, context))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`, context))
`, context)

}
}
}
`, context))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`, context))
`, context)

@github-actions github-actions bot requested a review from melinath November 21, 2025 14:36
@modular-magician modular-magician added service/networkservices-service-extensions and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Nov 21, 2025
@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.

google provider: Diff ( 6 files changed, 1864 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 1864 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 310 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 76
Passed tests: 69
Skipped tests: 3
Affected tests: 4

Click here to see the affected service packages
  • networkservices

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
  • TestAccNetworkServicesGateway_swpUpdate
  • TestAccNetworkServicesLbEdgeExtension_networkServicesLbEdgeExtensionBasicUpdate
  • TestAccNetworkServicesServiceBinding_networkServicesServiceBindingBasicExample
  • TestAccNetworkServicesServiceBinding_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccNetworkServicesLbEdgeExtension_networkServicesLbEdgeExtensionBasicUpdate [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccNetworkServicesGateway_swpUpdate [Error message] [Debug log]
TestAccNetworkServicesServiceBinding_networkServicesServiceBindingBasicExample [Error message] [Debug log]
TestAccNetworkServicesServiceBinding_update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@melinath
Copy link
Member

sweet, looks like that fixed the test detection

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

Overall this looks good. I have a few nits but I'll just apply those & queue this for merge if everything's good.

description: |
A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed.
required: true
- name: 'extensions'
Copy link
Member

Choose a reason for hiding this comment

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

It looks like not all the subfields here are supported; that's not a blocker for the initial implementation but wanted to flag it for potential follow-up: https://docs.cloud.google.com/service-extensions/docs/reference/rest/v1/ExtensionChain#extension Possibly they're not valid for this type of object though!

base_url: '{{op_id}}'
result:
resource_inside_response: false
custom_code:
Copy link
Member

Choose a reason for hiding this comment

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

nit

Suggested change
custom_code:

guides:
'Configure a edge extension': 'https://cloud.google.com/service-extensions/docs/configure-edge-extensions'
api: 'https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.lbEdgeExtensions'
docs:
Copy link
Member

Choose a reason for hiding this comment

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

nit

Suggested change
docs:

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 24, 2025
@github-actions github-actions bot requested a review from melinath November 24, 2025 23:37
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 24, 2025
@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.

google provider: Diff ( 6 files changed, 1864 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 1864 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 310 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 78
Passed tests: 65
Skipped tests: 3
Affected tests: 10

Click here to see the affected service packages
  • networkservices

Action taken

Found 10 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccNetworkServicesGateway_minimalSwp
  • TestAccNetworkServicesGateway_multipleSwpGatewaysDifferentNetwork
  • TestAccNetworkServicesGateway_multipleSwpGatewaysDifferentSubnetwork
  • TestAccNetworkServicesGateway_networkServicesGatewayMultipleSwpSameNetworkExample
  • TestAccNetworkServicesGateway_networkServicesGatewaySecureWebProxyExample
  • TestAccNetworkServicesGateway_networkServicesGatewaySecureWebProxyWithoutAddresses
  • TestAccNetworkServicesGateway_swpAsNextHop
  • TestAccNetworkServicesGateway_swpUpdate
  • TestAccNetworkServicesServiceBinding_networkServicesServiceBindingBasicExample
  • TestAccNetworkServicesServiceBinding_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccNetworkServicesGateway_minimalSwp [Debug log]
TestAccNetworkServicesGateway_multipleSwpGatewaysDifferentNetwork [Debug log]
TestAccNetworkServicesGateway_multipleSwpGatewaysDifferentSubnetwork [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewayMultipleSwpSameNetworkExample [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewaySecureWebProxyExample [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewaySecureWebProxyWithoutAddresses [Debug log]
TestAccNetworkServicesGateway_swpAsNextHop [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccNetworkServicesGateway_swpUpdate [Error message] [Debug log]
TestAccNetworkServicesServiceBinding_networkServicesServiceBindingBasicExample [Error message] [Debug log]
TestAccNetworkServicesServiceBinding_update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

LGTM - failing tests are unrelated

@melinath melinath added this pull request to the merge queue Nov 25, 2025
Merged via the queue into GoogleCloudPlatform:main with commit ce790e6 Nov 25, 2025
30 of 31 checks passed
deliaqi pushed a commit to deliaqi/magic-modules that referenced this pull request Nov 26, 2025
Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
vkanishk15 pushed a commit to vkanishk15/magic-modules that referenced this pull request Dec 11, 2025
Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
@matheusaleixo-cit matheusaleixo-cit deleted the add-new-resource-for-networkservices-lb-edge-extensions branch December 11, 2025 17:35
JianweiQ pushed a commit to JianweiQ/magic-modules that referenced this pull request Feb 20, 2026
Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add new resource to support Cloud Load Balancer Edge extension

3 participants