ci: import the ruleset by the ID it was created with - #9
Merged
Conversation
Every run planned to create a ruleset that already existed, which is what the open drift issue has been reporting. State is not kept between runs and a ruleset can be imported by numeric ID and no other way, so the ID has to be written down in the configuration -- 20882589, from the apply that created it. The variable that guarded the import is gone with it. It existed only to keep the plan working while no ruleset existed, and there is one now; a plain import block is what the other repository using this setup does too. 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 ruleset exists now (
20882589), so the import can point at it. Until it did, the ID could notbe written down, and every run planned to create a ruleset that was already there — which is what
the open drift issue (#4) has been reporting.
State is not kept between runs and a ruleset can be imported by numeric ID and no other way, so
the ID lives in the configuration. The
ruleset_idvariable that guarded the import is gone withit: it existed only to keep the plan working while no ruleset existed, and a plain import block is
what the other repository using this setup does.
Verifying
The plan this PR posts is the check. It should now show the ruleset being imported rather than
created, and no changes to it — if the ID were wrong, the plan would fail on the import instead.
tofu fmt -checkandtofu validatepass locally against the pinned provider.Generated by Claude Code