Skip to content

Add terraform support for CrossSiteNetwork. #22632

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

Conversation

modular-magician
Copy link
Collaborator

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

Derived from GoogleCloudPlatform/magic-modules#13799

Co-authored-by: Nick Elliot <nickelliot@google.com>

[upstream:f64339809373b54c5657870e590ce1ae2f80dc4a]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician requested a review from a team as a code owner May 7, 2025 21:41
@modular-magician modular-magician merged commit b9c7b46 into hashicorp:main May 7, 2025
4 checks passed
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.

1 participant