Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Terraform objects in drift-detection-only mode hang in Initializing status #1371

Open
hirenko-v opened this issue Jul 2, 2024 · 1 comment · May be fixed by #1370
Open

New Terraform objects in drift-detection-only mode hang in Initializing status #1371

hirenko-v opened this issue Jul 2, 2024 · 1 comment · May be fixed by #1370

Comments

@hirenko-v
Copy link

It seems like new objects reconciliation are skipping any actions by design, so I am wondering how we could deploy new objects just in drift-detection mode.

https://github.com/flux-iac/tofu-controller/blob/main/controllers/tf_controller_drift_detect.go#L29-L33

I've done some tests and with the change introduced in the PR things going well.
If it works for the community we could merge it.

@dgem
Copy link
Contributor

dgem commented Sep 21, 2024

Hi @hirenko-v,
Reading the PR, it makes me think this is a bug than a by design - wouldn't expect this to be by design :)

This PR fixes the issue for new objects created in drift-detection-only mode.
Current logic leaves Terraform CRD in Initializing status if it is created in drift detection mode.

A workaround requires manual intervention by setting approvePlan to something but not disable

The fix, assuming it works (I have not tested it and have nothing to validate it on, not a comment on the PR) then thanks :)

It would be good to have a test, so the behaviour doesn't change. not sure how much effort that would be. any thoughts ?

cheers
Dan

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 a pull request may close this issue.

2 participants