terraform-provider-okta icon indicating copy to clipboard operation
terraform-provider-okta copied to clipboard

siteURL api error when trying to create SWA application

Open Robogeek95 opened this issue 2 years ago • 3 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v1.2.5
on darwin_arm64
+ provider registry.terraform.io/okta/okta v3.28.0

Affected Resource(s)

  • okta_app_swa

Terraform Configuration Files

resource "okta_app_swa" "test" {
  preconfigured_app                        = "workday"
  label                                                 = "Commercial Workday"
  status                                               = "ACTIVE"
  url                                                      = "https://wd2-impl-services1.workday.com"
  auto_submit_toolbar                       = true
  user_name_template_type            = "BUILT_IN"
  accessibility_self_service              = false

Debug Output

https://gist.github.com/Robogeek95/1eb7b126c198dfb8c14724c98da51ef7

Panic Output

Expected Behavior

Workday preconfigured SWA application should be integrated

Actual Behavior

terraform plan command returns:

 Error: failed to create SWA application: the API returned an error: Api validation failed: siteURL. Causes: errorSummary: siteURL: The field cannot be left blank
│ 
│   with module.okta.okta_app_swa.test,
│   on ../../modules/okta/workday.tf line 1, in resource "okta_app_swa" "test":
│    1: resource "okta_app_swa" "test" {
│ 

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000

Robogeek95 avatar Aug 18 '22 20:08 Robogeek95

Thanks @Robogeek95 we'll have to add an app_settings_json on okta_app_swa so siteURL can be applied ad hoc like can be done on okta_app_saml. I double checked the code in case that was there and not documented, but it is not. So I'll call this a bug.

fyi, okta_app_saml example https://registry.terraform.io/providers/okta/okta/latest/docs/resources/app_saml

resource "okta_app_saml" "test" {
  app_settings_json = <<JSON
{
    "groupFilter": "app1.*",
    "siteURL": "https://www.okta.com"
}
JSON
  label = "SharePoint (On-Premise)"
  preconfigured_app = "sharepoint_onpremise"
  saml_version = "1.1"
  status = "ACTIVE"
  user_name_template = "$${source.login}"
  user_name_template_type = "BUILT_IN"
}

Please open a support ticket if this needs to be escalated.

monde avatar Aug 18 '22 21:08 monde

Hi @monde Thanks for your swift response.

I just tried adding an app_settings_json attribute on okta_app_swa so I can apply the siteURL setting but I got an error

│ Error: Unsupported argument
│ 
│   on ../../modules/okta/workday.tf line 13, in resource "okta_app_swa" "test":
│   13:   app_settings_json          = <<JSON
│ 
│ An argument named "app_settings_json" is not expected here.
╵

it seems like app_settings_json is not yet supported for okta_app_swa

Robogeek95 avatar Aug 18 '22 21:08 Robogeek95

Okta internal reference: https://oktainc.atlassian.net/browse/OKTA-526327

monde avatar Aug 22 '22 16:08 monde

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Oct 22 '22 00:10 github-actions[bot]

@Robogeek95 email me at [email protected] I have some questions about this issue for you.

monde avatar Oct 24 '22 18:10 monde

Also having issues using custom settings, mainly preconfigured apps with otka_app_swa.

Being able to pass custom (per preconfigured app) settings in an app_settings_json would be ideal.

robgero avatar Oct 25 '22 12:10 robgero

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Dec 25 '22 00:12 github-actions[bot]

also facing the same issue. we want to manage the preconfigured github.com app in terraform

zlitberg avatar Jan 11 '23 06:01 zlitberg

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Mar 13 '23 00:03 github-actions[bot]