terraform-provider-zitadel
terraform-provider-zitadel copied to clipboard
Can't create label policy with files
When applying a default label policy like this:
resource "zitadel_default_label_policy" "label_policy" {
primary_color = "#000000"
warn_color = "#cd3d56"
background_color = "#ffffff"
font_color = "#4a4a4a"
primary_color_dark = "#ffffff"
background_color_dark = "#111827"
warn_color_dark = "#ff3b5b"
font_color_dark = "#ffffff"
hide_login_name_suffix = true
disable_watermark = true
set_active = true
logo_hash = filemd5("../resources/logo.png")
logo_path = "../resources/logo.png"
logo_dark_hash = filemd5("../resources/logo.png")
logo_dark_path = "../resources/logo.png"
icon_hash = filemd5("../resources/icon.png")
icon_path = "../resources/icon.png"
icon_dark_hash = filemd5("../resources/icon.png")
icon_dark_path = "../resources/icon.png"
font_hash = filemd5("../resources/font.ttf")
font_path = "../resources/font.ttf"
}
it fails with the following error:
Error: failed to upload logo: [{0 either 'jwt_profile_file' or 'jwt_profile_json' is required []}]
│
│ with zitadel_default_label_policy.label_policy,
│ on main.tf line 908, in resource "zitadel_default_label_policy" "label_policy":
│ 908: resource "zitadel_default_label_policy" "label_policy" {
Despite the error, all colors, files and fonts are set as intended. However, when terraform is run again it does not recognize this and tries to apply the changes again, failing with the same error.
If I remove the files (logo, icon, fonts) from the terraform script it works.
I'm using ZITADEL with a PostgreSQL database.