|
| 1 | +```release-note:enhancement |
| 2 | +compute: added `wire_groups` field to `google_compute_interconnect` resource (beta) |
| 3 | +``` |
| 4 | +```release-note:enhancement |
| 5 | +compute: added `CROSS_SITE_NETWORK` enum option to `requested_features` field in `google_compute_interconnect` resource |
| 6 | +``` |
| 7 | +subcategory: "Compute Engine" |
| 8 | +description: |- |
| 9 | + Represents an Interconnect resource. |
| 10 | +--- |
| 11 | + |
| 12 | +# google_compute_interconnect |
| 13 | + |
| 14 | +Represents an Interconnect resource. The Interconnect resource is a dedicated connection between |
| 15 | +Google's network and your on-premises network. |
| 16 | + |
| 17 | + |
| 18 | +To get more information about Interconnect, see: |
| 19 | + |
| 20 | +* [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/interconnects) |
| 21 | +* How-to Guides |
| 22 | + * [Create a Dedicated Interconnect](https://cloud.google.com/network-connectivity/docs/interconnect/concepts/dedicated-overview) |
| 23 | + |
| 24 | +## Example Usage - Compute Interconnect Basic |
| 25 | + |
| 26 | + |
| 27 | +```hcl |
| 28 | +data "google_project" "project" {} |
| 29 | + |
| 30 | +resource "google_compute_interconnect" "example-interconnect" { |
| 31 | + name = "example-interconnect" |
| 32 | + customer_name = "example_customer" |
| 33 | + interconnect_type = "DEDICATED" |
| 34 | + link_type = "LINK_TYPE_ETHERNET_10G_LR" |
| 35 | + location = "https://www.googleapis.com/compute/v1/${data.google_project.project.id}/global/interconnectLocations/iad-zone1-1" |
| 36 | + requested_link_count = 1 |
| 37 | +} |
| 38 | +``` |
| 39 | + |
| 40 | +## Argument Reference |
| 41 | + |
| 42 | +The following arguments are supported: |
| 43 | + |
| 44 | + |
| 45 | +* `name` - |
| 46 | + (Required) |
| 47 | + Name of the resource. Provided by the client when the resource is created. The name must be |
| 48 | + 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters |
| 49 | + long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first |
| 50 | + character must be a lowercase letter, and all following characters must be a dash, |
| 51 | + lowercase letter, or digit, except the last character, which cannot be a dash. |
| 52 | + |
| 53 | +* `location` - |
| 54 | + (Required) |
| 55 | + URL of the InterconnectLocation object that represents where this connection is to be provisioned. |
| 56 | + Specifies the location inside Google's Networks. |
| 57 | + |
| 58 | +* `link_type` - |
| 59 | + (Required) |
| 60 | + Type of link requested. Note that this field indicates the speed of each of the links in the |
| 61 | + bundle, not the speed of the entire bundle. Can take one of the following values: |
| 62 | + - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics. |
| 63 | + - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. |
| 64 | + - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics |
| 65 | + Possible values are: `LINK_TYPE_ETHERNET_10G_LR`, `LINK_TYPE_ETHERNET_100G_LR`, `LINK_TYPE_ETHERNET_400G_LR4`. |
| 66 | + |
| 67 | +* `requested_link_count` - |
| 68 | + (Required) |
| 69 | + Target number of physical links in the link bundle, as requested by the customer. |
| 70 | + |
| 71 | +* `interconnect_type` - |
| 72 | + (Required) |
| 73 | + Type of interconnect. Note that a value IT_PRIVATE has been deprecated in favor of DEDICATED. |
| 74 | + Can take one of the following values: |
| 75 | + - PARTNER: A partner-managed interconnection shared between customers though a partner. |
| 76 | + - DEDICATED: A dedicated physical interconnection with the customer. |
| 77 | + Possible values are: `DEDICATED`, `PARTNER`, `IT_PRIVATE`. |
| 78 | + |
| 79 | + |
| 80 | +- - - |
| 81 | + |
| 82 | + |
| 83 | +* `description` - |
| 84 | + (Optional) |
| 85 | + An optional description of this resource. Provide this property when you create the resource. |
| 86 | + |
| 87 | +* `admin_enabled` - |
| 88 | + (Optional) |
| 89 | + Administrative status of the interconnect. When this is set to true, the Interconnect is |
| 90 | + functional and can carry traffic. When set to false, no packets can be carried over the |
| 91 | + interconnect and no BGP routes are exchanged over it. By default, the status is set to true. |
| 92 | + |
| 93 | +* `noc_contact_email` - |
| 94 | + (Optional) |
| 95 | + Email address to contact the customer NOC for operations and maintenance notifications |
| 96 | + regarding this Interconnect. If specified, this will be used for notifications in addition to |
| 97 | + all other forms described, such as Cloud Monitoring logs alerting and Cloud Notifications. |
| 98 | + This field is required for users who sign up for Cloud Interconnect using workforce identity |
| 99 | + federation. |
| 100 | + |
| 101 | +* `customer_name` - |
| 102 | + (Optional) |
| 103 | + Customer name, to put in the Letter of Authorization as the party authorized to request a |
| 104 | + crossconnect. This field is required for Dedicated and Partner Interconnect, should not be specified |
| 105 | + for cross-cloud interconnect. |
| 106 | + |
| 107 | +* `labels` - |
| 108 | + (Optional) |
| 109 | + Labels for this resource. These can only be added or modified by the setLabels |
| 110 | + method. Each label key/value pair must comply with RFC1035. Label values may be empty. |
| 111 | + |
| 112 | + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. |
| 113 | + Please refer to the field `effective_labels` for all of the labels present on the resource. |
| 114 | + |
| 115 | +* `macsec` - |
| 116 | + (Optional) |
| 117 | + Configuration that enables Media Access Control security (MACsec) on the Cloud |
| 118 | + Interconnect connection between Google and your on-premises router. |
| 119 | + Structure is [documented below](#nested_macsec). |
| 120 | + |
| 121 | +* `macsec_enabled` - |
| 122 | + (Optional) |
| 123 | + Enable or disable MACsec on this Interconnect connection. |
| 124 | + MACsec enablement fails if the MACsec object is not specified. |
| 125 | + |
| 126 | +* `remote_location` - |
| 127 | + (Optional) |
| 128 | + Indicates that this is a Cross-Cloud Interconnect. This field specifies the location outside |
| 129 | + of Google's network that the interconnect is connected to. |
| 130 | + |
| 131 | +* `requested_features` - |
| 132 | + (Optional) |
| 133 | + interconnects.list of features requested for this Interconnect connection. Options: IF_MACSEC ( |
| 134 | + If specified then the connection is created on MACsec capable hardware ports. If not |
| 135 | + specified, the default value is false, which allocates non-MACsec capable ports first if |
| 136 | + available). Note that MACSEC is still technically allowed for compatibility reasons, but it |
| 137 | + does not work with the API, and will be removed in an upcoming major version. |
| 138 | + Each value may be one of: `MACSEC`, `CROSS_SITE_NETWORK`, `IF_MACSEC`. |
| 139 | + |
| 140 | +* `project` - (Optional) The ID of the project in which the resource belongs. |
| 141 | + If it is not provided, the provider project is used. |
| 142 | + |
| 143 | + |
| 144 | +<a name="nested_macsec"></a>The `macsec` block supports: |
| 145 | + |
| 146 | +* `pre_shared_keys` - |
| 147 | + (Required) |
| 148 | + A keychain placeholder describing a set of named key objects along with their |
| 149 | + start times. A MACsec CKN/CAK is generated for each key in the key chain. |
| 150 | + Google router automatically picks the key with the most recent startTime when establishing |
| 151 | + or re-establishing a MACsec secure link. |
| 152 | + Structure is [documented below](#nested_macsec_pre_shared_keys). |
| 153 | + |
| 154 | +* `fail_open` - |
| 155 | + (Optional) |
| 156 | + If set to true, the Interconnect connection is configured with a should-secure |
| 157 | + MACsec security policy, that allows the Google router to fallback to cleartext |
| 158 | + traffic if the MKA session cannot be established. By default, the Interconnect |
| 159 | + connection is configured with a must-secure security policy that drops all traffic |
| 160 | + if the MKA session cannot be established with your router. |
| 161 | + |
| 162 | + |
| 163 | +<a name="nested_macsec_pre_shared_keys"></a>The `pre_shared_keys` block supports: |
| 164 | + |
| 165 | +* `name` - |
| 166 | + (Required) |
| 167 | + A name for this pre-shared key. The name must be 1-63 characters long, and |
| 168 | + comply with RFC1035. Specifically, the name must be 1-63 characters long and match |
| 169 | + the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character |
| 170 | + must be a lowercase letter, and all following characters must be a dash, lowercase |
| 171 | + letter, or digit, except the last character, which cannot be a dash. |
| 172 | + |
| 173 | +* `start_time` - |
| 174 | + (Optional) |
| 175 | + A RFC3339 timestamp on or after which the key is valid. startTime can be in the |
| 176 | + future. If the keychain has a single key, startTime can be omitted. If the keychain |
| 177 | + has multiple keys, startTime is mandatory for each key. The start times of keys must |
| 178 | + be in increasing order. The start times of two consecutive keys must be at least 6 |
| 179 | + hours apart. |
| 180 | + |
| 181 | +* `fail_open` - |
| 182 | + (Optional, Deprecated) |
| 183 | + If set to true, the Interconnect connection is configured with a should-secure |
| 184 | + MACsec security policy, that allows the Google router to fallback to cleartext |
| 185 | + traffic if the MKA session cannot be established. By default, the Interconnect |
| 186 | + connection is configured with a must-secure security policy that drops all traffic |
| 187 | + if the MKA session cannot be established with your router. |
| 188 | + |
| 189 | + ~> **Warning:** `failOpen` is deprecated and will be removed in a future major release. Use other `failOpen` instead. |
| 190 | + |
| 191 | +## Attributes Reference |
| 192 | + |
| 193 | +In addition to the arguments listed above, the following computed attributes are exported: |
| 194 | + |
| 195 | +* `id` - an identifier for the resource with format `projects/{{project}}/global/interconnects/{{name}}` |
| 196 | + |
| 197 | +* `creation_timestamp` - |
| 198 | + Creation timestamp in RFC3339 text format. |
| 199 | + |
| 200 | +* `operational_status` - |
| 201 | + The current status of this Interconnect's functionality, which can take one of the following: |
| 202 | + - OS_ACTIVE: A valid Interconnect, which is turned up and is ready to use. Attachments may |
| 203 | + be provisioned on this Interconnect. |
| 204 | + - OS_UNPROVISIONED: An Interconnect that has not completed turnup. No attachments may be |
| 205 | + provisioned on this Interconnect. |
| 206 | + - OS_UNDER_MAINTENANCE: An Interconnect that is undergoing internal maintenance. No |
| 207 | + attachments may be provisioned or updated on this Interconnect. |
| 208 | + |
| 209 | +* `provisioned_link_count` - |
| 210 | + Number of links actually provisioned in this interconnect. |
| 211 | + |
| 212 | +* `interconnect_attachments` - |
| 213 | + A list of the URLs of all InterconnectAttachments configured to use this Interconnect. |
| 214 | + |
| 215 | +* `peer_ip_address` - |
| 216 | + IP address configured on the customer side of the Interconnect link. |
| 217 | + The customer should configure this IP address during turnup when prompted by Google NOC. |
| 218 | + This can be used only for ping tests. |
| 219 | + |
| 220 | +* `google_ip_address` - |
| 221 | + IP address configured on the Google side of the Interconnect link. |
| 222 | + This can be used only for ping tests. |
| 223 | + |
| 224 | +* `google_reference_id` - |
| 225 | + Google reference ID to be used when raising support tickets with Google or otherwise to debug |
| 226 | + backend connectivity issues. |
| 227 | + |
| 228 | +* `expected_outages` - |
| 229 | + A list of outages expected for this Interconnect. |
| 230 | + Structure is [documented below](#nested_expected_outages). |
| 231 | + |
| 232 | +* `circuit_infos` - |
| 233 | + A list of CircuitInfo objects, that describe the individual circuits in this LAG. |
| 234 | + Structure is [documented below](#nested_circuit_infos). |
| 235 | + |
| 236 | +* `label_fingerprint` - |
| 237 | + A fingerprint for the labels being applied to this Interconnect, which is essentially a hash |
| 238 | + of the labels set used for optimistic locking. The fingerprint is initially generated by |
| 239 | + Compute Engine and changes after every request to modify or update labels. |
| 240 | + You must always provide an up-to-date fingerprint hash in order to update or change labels, |
| 241 | + otherwise the request will fail with error 412 conditionNotMet. |
| 242 | + |
| 243 | +* `state` - |
| 244 | + The current state of Interconnect functionality, which can take one of the following values: |
| 245 | + - ACTIVE: The Interconnect is valid, turned up and ready to use. |
| 246 | + Attachments may be provisioned on this Interconnect. |
| 247 | + - UNPROVISIONED: The Interconnect has not completed turnup. No attachments may b |
| 248 | + provisioned on this Interconnect. |
| 249 | + - UNDER_MAINTENANCE: The Interconnect is undergoing internal maintenance. No attachments may |
| 250 | + be provisioned or updated on this Interconnect. |
| 251 | + |
| 252 | +* `satisfies_pzs` - |
| 253 | + Reserved for future use. |
| 254 | + |
| 255 | +* `available_features` - |
| 256 | + interconnects.list of features available for this Interconnect connection. Can take the value: |
| 257 | + MACSEC. If present then the Interconnect connection is provisioned on MACsec capable hardware |
| 258 | + ports. If not present then the Interconnect connection is provisioned on non-MACsec capable |
| 259 | + ports and MACsec isn't supported and enabling MACsec fails). |
| 260 | + |
| 261 | +* `wire_groups` - |
| 262 | + ([Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) |
| 263 | + A list of the URLs of all CrossSiteNetwork WireGroups configured to use this Interconnect.[The Interconnect cannot be deleted if this list is non-empty.] |
| 264 | + |
| 265 | +* `interconnect_groups` - |
| 266 | + URLs of InterconnectGroups that include this Interconnect. |
| 267 | + Order is arbitrary and items are unique. |
| 268 | + |
| 269 | +* `terraform_labels` - |
| 270 | + The combination of labels configured directly on the resource |
| 271 | + and default labels configured on the provider. |
| 272 | + |
| 273 | +* `effective_labels` - |
| 274 | + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. |
| 275 | + |
| 276 | + |
| 277 | +<a name="nested_expected_outages"></a>The `expected_outages` block contains: |
| 278 | + |
| 279 | +* `name` - |
| 280 | + (Output) |
| 281 | + Unique identifier for this outage notification. |
| 282 | + |
| 283 | +* `description` - |
| 284 | + (Output) |
| 285 | + A description about the purpose of the outage. |
| 286 | + |
| 287 | +* `source` - |
| 288 | + (Output) |
| 289 | + The party that generated this notification. Note that the value of NSRC_GOOGLE has been |
| 290 | + deprecated in favor of GOOGLE. Can take the following value: |
| 291 | + - GOOGLE: this notification as generated by Google. |
| 292 | + |
| 293 | +* `state` - |
| 294 | + (Output) |
| 295 | + State of this notification. Note that the versions of this enum prefixed with "NS_" have |
| 296 | + been deprecated in favor of the unprefixed values. Can take one of the following values: |
| 297 | + - ACTIVE: This outage notification is active. The event could be in the past, present, |
| 298 | + or future. See startTime and endTime for scheduling. |
| 299 | + - CANCELLED: The outage associated with this notification was cancelled before the |
| 300 | + outage was due to start. |
| 301 | + - COMPLETED: The outage associated with this notification is complete. |
| 302 | + |
| 303 | +* `issue_type` - |
| 304 | + (Output) |
| 305 | + Form this outage is expected to take. Note that the versions of this enum prefixed with |
| 306 | + "IT_" have been deprecated in favor of the unprefixed values. Can take one of the |
| 307 | + following values: |
| 308 | + - OUTAGE: The Interconnect may be completely out of service for some or all of the |
| 309 | + specified window. |
| 310 | + - PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole should remain |
| 311 | + up, but with reduced bandwidth. |
| 312 | + |
| 313 | +* `affected_circuits` - |
| 314 | + (Output) |
| 315 | + If issueType is IT_PARTIAL_OUTAGE, a list of the Google-side circuit IDs that will be |
| 316 | + affected. |
| 317 | + |
| 318 | +* `start_time` - |
| 319 | + (Output) |
| 320 | + Scheduled start time for the outage (milliseconds since Unix epoch). |
| 321 | + |
| 322 | +* `end_time` - |
| 323 | + (Output) |
| 324 | + Scheduled end time for the outage (milliseconds since Unix epoch). |
| 325 | + |
| 326 | +<a name="nested_circuit_infos"></a>The `circuit_infos` block contains: |
| 327 | + |
| 328 | +* `google_circuit_id` - |
| 329 | + (Output) |
| 330 | + Google-assigned unique ID for this circuit. Assigned at circuit turn-up. |
| 331 | + |
| 332 | +* `google_demarc_id` - |
| 333 | + (Output) |
| 334 | + Google-side demarc ID for this circuit. Assigned at circuit turn-up and provided by |
| 335 | + Google to the customer in the LOA. |
| 336 | + |
| 337 | +* `customer_demarc_id` - |
| 338 | + (Output) |
| 339 | + Customer-side demarc ID for this circuit. |
| 340 | + |
| 341 | +## Timeouts |
| 342 | + |
| 343 | +This resource provides the following |
| 344 | +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| 345 | + |
| 346 | +- `create` - Default is 20 minutes. |
| 347 | +- `update` - Default is 20 minutes. |
| 348 | +- `delete` - Default is 20 minutes. |
| 349 | + |
| 350 | +## Import |
| 351 | + |
| 352 | + |
| 353 | +Interconnect can be imported using any of these accepted formats: |
| 354 | + |
| 355 | +* `projects/{{project}}/global/interconnects/{{name}}` |
| 356 | +* `{{project}}/{{name}}` |
| 357 | +* `{{name}}` |
| 358 | + |
| 359 | + |
| 360 | +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Interconnect using one of the formats above. For example: |
| 361 | + |
| 362 | +```tf |
| 363 | +import { |
| 364 | + id = "projects/{{project}}/global/interconnects/{{name}}" |
| 365 | + to = google_compute_interconnect.default |
| 366 | +} |
| 367 | +``` |
| 368 | + |
| 369 | +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Interconnect can be imported using one of the formats above. For example: |
| 370 | + |
| 371 | +``` |
| 372 | +$ terraform import google_compute_interconnect.default projects/{{project}}/global/interconnects/{{name}} |
| 373 | +$ terraform import google_compute_interconnect.default {{project}}/{{name}} |
| 374 | +$ terraform import google_compute_interconnect.default {{name}} |
| 375 | +``` |
0 commit comments