Open japtain-cack opened 2 weeks ago
As a temporary workaround, you can set attributes = "{}"
in the resource
This doesn't appear to work either. It's producing the same error as above. I did test my token and curled the authentik api, which worked successfully, so it doesn't appear to be an api/connectivity issue.
resource "authentik_brand" "talos" {
domain = "talos.example.org"
default = false
branding_title = "Talos"
attributes = "{}"
}
I think it might also be due to this https://github.com/goauthentik/terraform-provider-authentik/blob/main/internal/provider/resource_brand_test.go#L33-L43
I'm not sure this is related to the brand resource. I completely blew away my terraform state/files, and tried adding a group instead.
I'm getting the same error message.
terraform {
required_providers {
authentik = {
source = "goauthentik/authentik"
}
}
}
provider "authentik" {
url = "https://authentik.talos.example.com"
insecure = true
# Optionally add extra headers
# headers {
# X-my-header = "foo"
# }
# Set token with `export AUTHENTIK_TOKEN='<your-token>'`
}
resource "authentik_group" "jellyfin_users" {
name = "jellyfin-users"
users = []
is_superuser = false
}
resource "authentik_group" "jellyfin_admins" {
name = "jellyfin-admins"
users = []
is_superuser = false
}
authentik_group.jellyfin_users: Creating...
authentik_group.jellyfin_admins: Creating...
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to authentik_group.jellyfin_users, provider "provider[\"registry.terraform.io/goauthentik/authentik\"]" produced an unexpected new value:
│ Root object was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to authentik_group.jellyfin_admins, provider "provider[\"registry.terraform.io/goauthentik/authentik\"]" produced an unexpected new value:
│ Root object was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Authentik: 2024.8.3 Platform: Kubernetes Terraform: v1.9.8 Tofu: v1.8.4 Provider version: 2024.8.4
Brand new install of Authentik. All I did is perform the initial user setup and get an api token.
terraform:
trace logs
Click to expand code
```text 2024-10-25T03:33:16.378Z [INFO] Terraform version: 1.9.8 2024-10-25T03:33:16.378Z [DEBUG] using github.com/hashicorp/go-tfe v1.58.0 2024-10-25T03:33:16.378Z [DEBUG] using github.com/hashicorp/hcl/v2 v2.20.0 2024-10-25T03:33:16.378Z [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1 2024-10-25T03:33:16.378Z [DEBUG] using github.com/zclconf/go-cty v1.14.4 2024-10-25T03:33:16.378Z [INFO] Go runtime version: go1.22.7 2024-10-25T03:33:16.378Z [INFO] CLI args: []string{"terraform", "apply"} 2024-10-25T03:33:16.379Z [TRACE] Stdout is not a terminal 2024-10-25T03:33:16.379Z [TRACE] Stderr is not a terminal 2024-10-25T03:33:16.379Z [TRACE] Stdin is not a terminal 2024-10-25T03:33:16.379Z [DEBUG] Attempting to open CLI config file: /home/japtain-cack/.terraformrc 2024-10-25T03:33:16.379Z [DEBUG] File doesn't exist, but doesn't need to. Ignoring. 2024-10-25T03:33:16.379Z [DEBUG] ignoring non-existing provider search directory terraform.d/plugins 2024-10-25T03:33:16.379Z [DEBUG] ignoring non-existing provider search directory /home/japtain-cack/.terraform.d/plugins 2024-10-25T03:33:16.379Z [DEBUG] ignoring non-existing provider search directory /home/japtain-cack/.local/share/terraform/plugins 2024-10-25T03:33:16.379Z [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins 2024-10-25T03:33:16.379Z [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins 2024-10-25T03:33:16.379Z [INFO] CLI command args: []string{"apply"} 2024-10-25T03:33:16.380Z [TRACE] Meta.Backend: no config given or present on disk, so returning nil config 2024-10-25T03:33:16.380Z [TRACE] Meta.Backend: backend has not previously been initialized in this working directory 2024-10-25T03:33:16.380Z [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend) 2024-10-25T03:33:16.380Z [TRACE] Meta.Backend: instantiated backend of type