Skip to content

networkconnectivity: add interconnect_key_group resource - #19795

Draft
amanMahendroo wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
amanMahendroo:tf-byok-interconnect-key-group
Draft

amanMahendroo wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
amanMahendroo:tf-byok-interconnect-key-group

Conversation

@amanMahendroo

@amanMahendroo amanMahendroo commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Adds the beta-only google_network_connectivity_interconnect_key_group resource: a regional group of customer-provided MACsec keys (CKN/CAK) that Cloud Interconnect connections can use for MACsec ("bring your own key").

  • keys.cak_wo is write-only (Terraform 1.11+), so the CAK is never stored in state or plan files. The API never returns it either.
  • Keys are immutable in the API. Updates send only the added and removed keys, each as its own keys.<name> update-mask path, so existing CAKs are never re-sent. In-place changes to start_time or ckn are rejected at plan time.
  • keys is a list (write-only attributes can't be in sets). Reordering keys is not a diff.
  • interconnects (output) lists the names of the Interconnects that use the key group.
  • Key names must be lowercase alphanumeric: the API only accepts alphanumeric names, and the name is used in update-mask paths, which are case-converted.

Draft for initial review. Manually tested against prod (create, import, reorder, cak-only change, rejected in-place change, key rotation, PSK -> key group migration with the follow-up PR). The acceptance tests need the IKG_PREVIEW visibility label on the CI projects; that request is in progress. Rotating keys on a key group attached to a Z2Z (test) Interconnect isn't supported by the API yet; that support is rolling out separately. The acceptance test doesn't add keys after creation (a new key's start time must be at least 6 hours in the future, which VCR can't replay); that path was verified manually.

Part of b/482272248
Fixes b/568177309

`google_network_connectivity_interconnect_key_group` (beta)

@modular-magician

modular-magician commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 4924baf:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 255 insertions(+)
google-beta provider View Diff 6 files changed, 1917 insertions(+)
terraform-google-conversion View Diff 1 file changed, 344 insertions(+)

Missing test report

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

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

resource "google_network_connectivity_interconnect_key_group" "primary" {
  interconnects {
    interconnect = # value needed
  }
}

Unreadable test report

Missing test detection may be incomplete because the following tests can't be read. Each test step's Config should call a function that returns a single fmt.Sprintf or acctest.Nprintf template.

  • TestAccNetworkConnectivityInterconnectKeyGroup_update: errors reading test func TestAccNetworkConnectivityInterconnectKeyGroup_update: [errors reading test steps: [failed to find variable declaration description failed to find variable declaration description failed to find variable declaration description failed to find variable declaration description…

Test report

Important

Manual Verification Required

VCR cannot automatically execute the following tests added in this PR. Please verify them manually:

🔴 TestAccNetworkConnectivityInterconnectKeyGroup_update

Analytics

Total Tests Passed Skipped Affected
43 40 2 1
Affected Service Packages
  • networkconnectivity

Learn how VCR tests work


Step 1: Replaying Mode

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

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Findings Test Name
❌ Error · Log - TestAccNetworkConnectivityInterconnectKeyGroup_networkConnectivityInterconnectKeyGroupBasicExample

Caution

Issues requiring attention before PR completion

🔴 Manual Verification Required: New tests were added that are skipped in presubmit tests. See the "Manual Verification Required" section at the top for details.

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@amanMahendroo VCR tests complete for 4924baf!

@amanMahendroo
amanMahendroo force-pushed the tf-byok-interconnect-key-group branch from 4924baf to 64f4362 Compare October 29, 2026 02:38
@modular-magician

modular-magician commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 64f4362:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 246 insertions(+)
google-beta provider View Diff 6 files changed, 1936 insertions(+)
terraform-google-conversion View Diff 1 file changed, 344 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
43 40 1 2
Affected Service Packages
  • networkconnectivity

Learn how VCR tests work


Step 1: Replaying Mode

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
  • TestAccNetworkConnectivityInterconnectKeyGroup_networkConnectivityInterconnectKeyGroupBasicExample
  • TestAccNetworkConnectivityInterconnectKeyGroup_update

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Findings Test Name
❌ Error · Log - TestAccNetworkConnectivityInterconnectKeyGroup_networkConnectivityInterconnectKeyGroupBasicExample
❌ Error · Log - TestAccNetworkConnectivityInterconnectKeyGroup_update

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@amanMahendroo VCR tests complete for 64f4362!

@amanMahendroo
amanMahendroo force-pushed the tf-byok-interconnect-key-group branch from 64f4362 to 457dc94 Compare October 30, 2026 02:36
@modular-magician

modular-magician commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 457dc94:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 246 insertions(+)
google-beta provider View Diff 6 files changed, 1936 insertions(+)
terraform-google-conversion View Diff 1 file changed, 346 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
43 40 1 2
Affected Service Packages
  • networkconnectivity

Learn how VCR tests work


Step 1: Replaying Mode

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
  • TestAccNetworkConnectivityInterconnectKeyGroup_networkConnectivityInterconnectKeyGroupBasicExample
  • TestAccNetworkConnectivityInterconnectKeyGroup_update

View the replaying VCR build log


Step 2: Recording Mode

Skipped RECORDING mode because a newer commit (68b18f4) was pushed to the PR.

@amanMahendroo
amanMahendroo force-pushed the tf-byok-interconnect-key-group branch from 457dc94 to 68b18f4 Compare October 30, 2026 02:47
@modular-magician

modular-magician commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 68b18f4:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 246 insertions(+)
google-beta provider View Diff 6 files changed, 1936 insertions(+)
terraform-google-conversion View Diff 1 file changed, 346 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
43 40 1 2
Affected Service Packages
  • networkconnectivity

Learn how VCR tests work


Step 1: Replaying Mode

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
  • TestAccNetworkConnectivityInterconnectKeyGroup_networkConnectivityInterconnectKeyGroupBasicExample
  • TestAccNetworkConnectivityInterconnectKeyGroup_update

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Findings Test Name
❌ Error · Log - TestAccNetworkConnectivityInterconnectKeyGroup_networkConnectivityInterconnectKeyGroupBasicExample
❌ Error · Log - TestAccNetworkConnectivityInterconnectKeyGroup_update

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@amanMahendroo VCR tests complete for 68b18f4!

This branch has not been deployed

No deployments
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.

2 participants