Skip to content

Support empty spec sub-blocks for GKE Hub Feature (workloadidentity /… - #18834

Open
cowsking wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
cowsking:fix-gkehub-feature-empty-spec
Open

Support empty spec sub-blocks for GKE Hub Feature (workloadidentity /…#18834
cowsking wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
cowsking:fix-gkehub-feature-empty-spec

Conversation

@cowsking

@cowsking cowsking commented Aug 28, 2026

Copy link
Copy Markdown

When users configure features that require empty sub-blocks (such as spec { workloadidentity {} } or spec { fleetobservability {} }), the generated expander previously dropped empty maps due to !IsEmptyValue() checks. This caused the GKE Hub API to reject the request with 400: MissingFieldError for field spec: should be set.

This PR adds send_empty_value: true to the workloadidentity and fleetobservability NestedObject definitions under spec in Feature.yaml so that empty spec objects are preserved in the payload.

Closes hashicorp/terraform-provider-google#29014

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Aug 28, 2026
@github-actions
github-actions Bot requested a review from SirGitsalot August 28, 2026 22:30
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-approval Pull requests that need reviewer's approval to run presubmit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

google_gke_hub_feature: an empty spec sub-block is dropped, making workloadidentity/fleetobservability impossible to create

2 participants