cheelim1 / terraform-provider-jumpcloud

A Terraform provider for JumpCloud
MIT License
6 stars 2 forks source link

Plugin crashes when trying to create application #18

Open saar-win opened 1 month ago

saar-win commented 1 month ago
resource "jumpcloud_application" "create_applications" {
  name = TEST
  display_label = TEST
  idp_entity_id = TEST
  sp_entity_id = TEST
  acs_url = TEST
  sso_url = TEST
  idp_certificate = ""
  idp_private_key = ""
  constant_attributes {
      name = TEST
      value = TEST
  }
}

using the latest provider. Screenshot 2024-10-14 at 15 21 46

It crashes when using this block; has anyone tackled this issue?

cheelim1 commented 1 month ago

Thanks for reporting, may i have the full error logs, rather than just the screenshot. Thanks.

cheelim1 commented 1 month ago

You can try with version 0.3.18

saar-win12 commented 1 month ago

Screenshot 2024-10-14 at 17 53 51

Screenshot 2024-10-14 at 17 53 39

cheelim1 commented 1 month ago

Seems like a validation error thrown by jumpcloud currently. Do ensure you're passing the value for idp_certificate & idp_private_key in are valid.

saar-win12 commented 1 month ago

Should it be in base64 encoding?

cheelim1 commented 1 month ago

Don't think it needs to be base64 encoded, but you can verify as well. Perhaps you can ensure it's in the proper PEM format. What i usually would do, would be to store the PEM cert calue in AWS SSM parameter store and reference it.

data "aws_ssm_parameter" "example" {
  name = "/example/cert"
}

idp_certificate  = data.aws_ssm_parameter.example.value