-
Notifications
You must be signed in to change notification settings - Fork 17
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
zitadel_login_policy resource trows errors #128
Comments
@jobcespedes |
Hi @stebenz,
|
Hi @jobcespedes |
I've just run into this issue:
For context: We already had successfully terraformed the Keeping existing resource parameters untouched is something completely normal in the lifecycle of a Terraform project. |
I'd also like to counter-argument this statement:
I've never seen this behavior with other Terraform providers. Usually, providers just display a warning in the Terraform plan output indicating that something was changed outside of Terraform: More info can be found here. |
I tried to find out how to produce this warning, the problem here is not the content of the resource changed, but that the terraform provider is used to create a resource which is already existing, which results then in an error. As I see it currently we could technically handle this situation, as to check if the resource is already existing during create, but at the same time it is expected as to avoid handling the same resource from 2 different runtimes. |
I am facing error 2 right now: Zitadel Helm Chart: 8.4.0 (meaning AppVersion: 2.61.0) I have a "resource zitadel_login_policy" "default" {" where the only thing that changed was "mfa_init_skip_lifetime" from "720h0m0s" to "0". The update of the login policy works fine and then the tf controller runs at a certain interval. There was no change after the update of the login policy but after running again he tells me... zitadel_login_policy.default: Modifying... [id=]
This then loops on forever and obviously prevents flux from further reconciliation. Any idea how to prevent this would be appreciated. |
As this seems like a similar issue but not the same reason, I would prefer to open up a new issue next time. Besides that, are you sure that you handle the state correctly? Could it be that the state is not persistet? |
The changes can be seen in Zitadel after the first run, so the state is persistet fine he just tries to run again afterwards for whatever reason. How is this different though than described by the original report error 2 case? |
Preflight Checklist
Version
1.0.2
ZITADEL Version
v2.37.2
Describe the problem caused by this bug
Two problems related to 'zitadel_login_policy' resource:
Error: failed to create login policy: rpc error: code = AlreadyExists desc = Login Policy already exists
. I believe this has something to do with manual modifications via "Login Behavior and Security" cloud web UI. If "Reset to instance default" is click in web UI, the error does not occur.Error: failed to update login policy: rpc error: code = FailedPrecondition desc = Errors.Org.LoginPolicy.NotChanged
in the secondterraform apply
after a first successful one.To reproduce
For error 1:
For error 2:
Screenshots
No response
Expected behavior
No errors in both cases
Relevant Configuration
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: