Skip to content

tgc: fix TestAccDatastreamPrivateConnection test#17486

Merged
zli82016 merged 1 commit into
GoogleCloudPlatform:mainfrom
zli82016:tgc-fix-datastream
May 8, 2026
Merged

tgc: fix TestAccDatastreamPrivateConnection test#17486
zli82016 merged 1 commit into
GoogleCloudPlatform:mainfrom
zli82016:tgc-fix-datastream

Conversation

@zli82016
Copy link
Copy Markdown
Member

@zli82016 zli82016 commented May 8, 2026

assert_test_files.go:138: TestAccDatastreamPrivateConnection_datastreamPrivateConnectionPscInterfaceExample_step1: Failed after 5 attempts. First real error: retryable: missing fields: [psc_interface_config.network_attachment]

Identified the Root Cause: The API was not returning pscInterfaceConfig in the CAI asset, which violated the exactly_one_of constraint in the Terraform provider schema (requiring either psc_interface_config or vpc_peering_config).

Applied Fixes:

Marked pscInterfaceConfig as is_missing_in_cai: true in PrivateConnection.yaml.
Added a tgc_decoder to inject a dummy pscInterfaceConfig block when both are missing, ensuring the generated HCL is valid for plan.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.


@zli82016 zli82016 marked this pull request as ready for review May 8, 2026 20:51
@modular-magician
Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
terraform-google-conversion View Diff 2 files changed, 19 insertions(+)

@zli82016 zli82016 requested a review from hao-nan-li May 8, 2026 21:14
@zli82016 zli82016 added this pull request to the merge queue May 8, 2026
Merged via the queue into GoogleCloudPlatform:main with commit 8d7f85b May 8, 2026
24 checks passed
@zli82016 zli82016 deleted the tgc-fix-datastream branch May 8, 2026 21:43
inadenenko pushed a commit to inadenenko/magic-modules that referenced this pull request May 12, 2026
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