Skip to content

Add terraform support for CrossSiteNetwork. #13799

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NandiniAgrawal15
Copy link

@NandiniAgrawal15 NandiniAgrawal15 commented Apr 28, 2025

`google_compute_cross_site_network`

Represents a cross-site-network resource.A CrossSiteNetwork is used to establish L2 connectivity between groups of Interconnects.

~> Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider.
See Provider Versions for more details on beta resources.

To get more information about CrossSiteNetwork, see:

Example Usage - Compute Cross Site Network Basic

data "google_project" "project" {
  provider = google-beta
}

resource "google_compute_cross_site_network" "example-cross-site-network" {
  name                 = "test-cross-site-network"
  description         = "Example cross site network"
  provider = google-beta
}

Argument Reference

The following arguments are supported:

  • name -
    (Required)
    Name of the resource. Provided by the client when the resource is created. The name must be
    1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
    long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first
    character must be a lowercase letter, and all following characters must be a dash,
    lowercase letter, or digit, except the last character, which cannot be a dash.

  • description -
    (Optional)
    An optional description of this resource. Provide this property when you create the resource.

  • project - (Optional) The ID of the project in which the resource belongs.
    If it is not provided, the provider project is used.

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format projects/{{project}}/global/crossSiteNetworks/{{name}}

Timeouts

This resource provides the following
Timeouts configuration options:

  • create - Default is 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

CrossSiteNetwork can be imported using any of these accepted formats:

  • projects/{{project}}/global/crossSiteNetworks/{{name}}
  • {{project}}/{{name}}
  • {{name}}

In Terraform v1.5.0 and later, use an import block to import CrossSiteNetwork using one of the formats above. For example:

import {
  id = "projects/{{project}}/global/crossSiteNetworks/{{name}}"
  to = google_compute_cross_site_network.default
}

When using the terraform import command, CrossSiteNetwork can be imported using one of the formats above. For example:

$ terraform import google_compute_cross_site_network.default projects/{{project}}/global/crossSiteNetworks/{{name}}
$ terraform import google_compute_cross_site_network.default {{project}}/{{name}}
$ terraform import google_compute_cross_site_network.default {{name}}

User Project Overrides

This resource supports User Project Overrides.

@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 ( 2 files changed, 123 insertions(+))
google-beta provider: Diff ( 7 files changed, 910 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 81 insertions(+))

Missing service labels

The following new resources do not have corresponding service labels:

  • google_compute_cross_site_network

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: 1176
Passed tests: 1090
Skipped tests: 84
Affected tests: 2

Click here to see the affected service packages
  • compute

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
  • TestAccComputeCrossSiteNetwork_computeCrossSiteNetworkBasicExample
  • TestAccComputeCrossSiteNetwork_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccComputeCrossSiteNetwork_computeCrossSiteNetworkBasicExample [Debug log]
TestAccComputeCrossSiteNetwork_update [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@NandiniAgrawal15 NandiniAgrawal15 marked this pull request as ready for review April 28, 2025 06:27
@github-actions github-actions bot requested a review from NickElliot April 28, 2025 06:27
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: see go/terraform-auto-test-runs to set up automatic test runs.

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

Copy link

github-actions bot commented May 1, 2025

@NickElliot 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
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

a couple docs edits but otherwise LGTM!

---
name: 'CrossSiteNetwork'
description: |
Represents a cross-site-network resource.A CrossSiteNetwork is used to establish L2 connectivity between groups of Interconnects.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Represents a cross-site-network resource.A CrossSiteNetwork is used to establish L2 connectivity between groups of Interconnects.
Represents a cross-site-network resource. A CrossSiteNetwork is used to establish L2 connectivity between groups of Interconnects.

- name: 'description'
type: String
description: |
An optional description of this resource. Provide this property when you create the resource.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
An optional description of this resource. Provide this property when you create the resource.
An optional description of this resource.

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.

3 participants