Panfactum / stack

The Panfactum Stack
https://panfactum.com
Other
16 stars 5 forks source link

[Bug]: authentik_core_resources "Provider produced inconsistent final plan" #67

Open jlevydev opened 5 months ago

jlevydev commented 5 months ago

Prior Search

What happened?

When attempting to re-apply the authentik_core_resources module I got the following output. Odd because when looking at the module a sort seems to already be in place to resolve this issue, but maybe there's a manual step I have to do here to fix. Uncertain why the sort isn't solving on its own. This is on the latest stable release (24-05.0).

Screenshot from 2024-06-27 00-17-59 Screenshot from 2024-06-27 00-16-37

Steps to Reproduce

Apply the authentik_core_resources module in such a way that it either adds to or changes the order of the authenticator validator stages

Version

main (development branch)

Relevant log output

No response

fullykubed commented 5 months ago

Interesting. This is definitely a bug in the upstream provider: https://github.com/goauthentik/terraform-provider-authentik/issues/377. In fact, it is something I have already posted about in that thread.

If you 👍🏻 that thread, that will help create more visibility.

Here is my guess for what is happening:

  1. When the resource is first created, the configuration_stages field is sorted in alphanum order.
  2. When new stages are added, configuration_stages is sorted by when the stage was added.

Unfortunately, there isn't anything we can do to resolve the issue until the provider is fixed.

However, if you do a targeted delete of this resource and then a targeted apply, that may fix the issue you are experiencing personally.

I am going to leave this thread open until the upstream issue is resolved as a reminder for others who run into a similar issue.