ci: stop planning two settings GitHub does not keep - #10
Merged
Conversation
The drift issue stayed open on one repository change that no apply could clear: merge_commit_title and merge_commit_message. Merge commits are off here, and GitHub does not keep a title or message for a merge method the repository does not allow -- an apply wrote them and the next read from an empty state gave the defaults back, so every run planned to write them again. A local run hid it, having kept the written values in its state. Squash is the only merge method allowed, and its title and message are still set. ignore_vulnerability_alerts_during_read went the same way for the same reason as archive_on_destroy: it is a provider flag about how to read a repository rather than a setting on one, so an imported resource never carries it and every plan showed it being set. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M6rDhYwHnJwtMQn8nPA1de
Contributor
OpenTofu Plan |
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.
The drift issue (#4) is down to one repository change that no apply can clear. After the ruleset
import landed and the maintainer applied, the plan on
mainreads:A local
tofu applysays "No changes" for the same configuration, because it compares against astate file that kept the values it wrote. CI keeps no state: it imports and reads the repository
fresh every run, and gets the defaults back.
Why the values do not stick
allow_merge_commit = false, and GitHub does not keep a title or message for a merge method therepository does not allow. The write is accepted and then forgotten, so it can be planned and
applied forever without ever being true. Squash is the only merge method allowed here and its
title and message are still set — nothing about how this repository merges changes.
ignore_vulnerability_alerts_during_readis not a repository setting at all: it is a (deprecated)provider flag about how to read one. An imported resource never carries it, so every plan showed
it being set. It joins
archive_on_destroyinignore_changes, which is there for the samereason.
Verifying
The plan this PR posts is the check: the repository resource should show no changes at all, and
the run on
mainafter merging should close #4.tofu fmt -checkpasses andtofu validatesucceeds — with a deprecation warning for theattribute named in
ignore_changes, which is the attribute itself being deprecated upstream.Generated by Claude Code