fix: replace authoritative project metadata with non-authoritative items (B1)#24
Merged
Merged
Conversation
google_compute_project_metadata is authoritative — on first apply it deletes all other project-level metadata (OS Login config, SSH keys, etc.) managed outside this module. Switch to google_compute_project_metadata_item which only manages the individual keys this module needs, leaving other metadata untouched. Co-authored-by: Ona <no-reply@ona.com>
cezarelnazli
approved these changes
May 7, 2026
nandajavarma
added a commit
that referenced
this pull request
May 8, 2026
revert: restore google_compute_project_metadata (revert #24)
easyCZ
pushed a commit
that referenced
this pull request
May 21, 2026
fix: replace authoritative project metadata with non-authoritative items (B1)
easyCZ
pushed a commit
that referenced
this pull request
May 21, 2026
revert: restore google_compute_project_metadata (revert #24)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
google_compute_project_metadatais an authoritative resource — on firstterraform applyit deletes all other project-level metadata (OS Login config, SSH keys, etc.) managed outside this module. This silently destroys customer metadata.Fix
Replace with
google_compute_project_metadata_itemresources, which only manage the individual keys this module needs (enable-oslogin,gitpod-runner-id), leaving all other project metadata untouched.Migration
Existing deployments will see Terraform plan to destroy the
google_compute_project_metadataresource and create twogoogle_compute_project_metadata_itemresources. The metadata values themselves don't change — only the Terraform resource type managing them.before the next
terraform applyto avoid a brief metadata gap. Alternatively, just apply — the items will be recreated immediately.Audit reference
Customer security audit item B1.