frontegg / terraform-provider-frontegg

Terraform Provider for Frontegg
Mozilla Public License 2.0
8 stars 15 forks source link

Social logins removed on terraform apply #84

Open amita-seal opened 1 year ago

amita-seal commented 1 year ago

We're using terraform to configure frontegg. We noticed that every time we run terraform apply, most settings act as expected, but the social logins we defined in the builder are removed from the actual login page. This can be fixed by manually publishing some change to the environment in portal.frontegg.com, but this defeats the purpose of using terraform

Terraform version

1.3.4

Affected resources

social logins

Terraform configuration files

resource "frontegg_workspace" "frontegg" {
  allowed_origins     = ...
  backend_stack       = "Python"
  country             = "IL"
  frontegg_domain     = ...
  frontend_stack      = "React"
  name                = ...
  open_saas_installed = false

  password_policy {
    allow_passphrases = false
    history           = 0
    max_length        = 128
    min_length        = 8
    min_phrase_length = 6
    min_tests         = 2
  }
  lockout_policy {
    max_attempts = 10
  }
  hosted_login {
    allowed_redirect_urls = ...
  }
  auth_policy {
    allow_signups                = true
    allow_unverified_users       = true
    auth_strategy                = "EmailAndPassword"
    enable_api_tokens            = true
    enable_roles                 = true
    jwt_access_token_expiration  = 60 * 60 * 24 # 24 hours
    jwt_algorithm                = "RS256"
    jwt_refresh_token_expiration = 60 * 60 * 24 * 30 # 30 days
    same_site_cookie_policy      = "none"
  }
  mfa_policy {
    allow_remember_device = true
    device_expiration     = 60 * 60 * 24 * 14 # 14 days
    enforce               = "off"
  }
  mfa_authentication_app {
    service_name = ...
  }
  admin_portal {
    enable_account_settings    = true
    enable_api_tokens          = true
    enable_audit_logs          = true
    enable_personal_api_tokens = false
    enable_privacy             = true
    enable_profile             = true
    enable_roles               = false
    enable_security            = true
    enable_sso                 = true
    enable_subscriptions       = false
    enable_usage               = false
    enable_users               = true
    enable_webhooks            = false
    palette {
      error {
        light         = "#FFF4F4"
        main          = "#EA5C5C"
        contrast_text = ""
        dark          = ""
      }
      info {
        light         = "#EBF3FF"
        main          = "#498AEB"
        contrast_text = ""
        dark          = ""
      }
      primary {
        active        = "rgb(36, 112, 191)"
        dark          = "rgb(36, 112, 191)"
        hover         = "rgb(40, 127, 216)"
        light         = "rgb(99, 176, 255)"
        main          = "rgb(48, 150, 255)"
        contrast_text = ""
      }
      secondary {
        active        = "rgb(36, 112, 191)"
        dark          = "rgb(36, 112, 191)"
        hover         = "rgb(40, 127, 216)"
        light         = "rgb(99, 176, 255)"
        main          = "rgb(48, 150, 255)"
        contrast_text = ""
      }
      success {
        light         = "#F0FCEC"
        main          = "#4DA82D"
        contrast_text = ""
        dark          = ""
      }
      warning {
        light         = "#FFF7EC"
        main          = "#F0A534"
        contrast_text = ""
        dark          = ""
      }
    }
  }

Expected Behavior

The social logins should not have been removed.

Actual Behavior

The social logins are removed from the login page. They are still configured correctly in the builder, but not in the real login page.

Steps to reproduce

  1. terraform apply
netanel-haber-deci commented 1 year ago

Is this being fixed? This is a severe, crucial bug.