Skip to content

fix: access state safely before initial synchronization#161

Merged
galargh merged 2 commits intomasterfrom
fix-set-up
Mar 27, 2025
Merged

fix: access state safely before initial synchronization#161
galargh merged 2 commits intomasterfrom
fix-set-up

Conversation

@galargh
Copy link
Copy Markdown
Member

@galargh galargh commented Mar 27, 2025

This PR tries to address feedback received in #160

It adds a warning not to expect Fix workflow to work before initial Sync is complete (it would be nice to produce a better error in the workflow in the future).

It also makes sure we access terraform state safely in locals.tf before it has been synchronized for the first time. The issue is that the state just after initialization looks like this:

{"format_version":"1.0"}

while we already expected it to look like this:

{"format_version":"1.0","values":{"root_module":{"resources":[...]}}}

The latter is only true after the initial synchronization, which puts resources in the state, is complete.

@galargh galargh merged commit 647b086 into master Mar 27, 2025
@galargh galargh deleted the fix-set-up branch March 27, 2025 21:57
@galargh galargh mentioned this pull request Mar 27, 2025
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.

1 participant