goauthentik / terraform-provider-authentik

Manage https://goauthentik.io with terraform.
https://registry.terraform.io/providers/goauthentik/authentik/latest/docs
GNU General Public License v3.0
69 stars 18 forks source link

Cannot upgrade to 2024.08.0 #560

Closed ishioni closed 1 month ago

ishioni commented 1 month ago

It looks like authentik_scope_mapping is now authentik_property_mapping_provider_scope, but there is no migration inside of the provider, and so a resource is now dangling in the state with no schema

I have a

resource "authentik_scope_mapping" "openid-nextcloud" {
  name       = "OAuth Mapping: OpenID 'nextcloud'"
  scope_name = "nextcloud"
  expression = <<EOF
return {
  "nextcloudAdmin": user.attributes.get("nextcloudAdmin"),
  "nextcloudQuota": user.attributes.get("nextcloudQuota",user.group_attributes().get("defaultQuota", "100 MB"))
}
EOF
}

I have modified the code, but the provider is complaining that

╷
│ Warning: Missing resource schema from provider
│ 
│ No resource schema found for authentik_scope_mapping when decoding prior state
╵
╷
│ Error: no schema available for authentik_scope_mapping.openid-nextcloud while reading state; this is a bug in OpenTofu and should be reported
│ 
│ 
╵