I am getting “unknown api error” when I run the code below. If I remove the okta_app_oauth then it correctly creates the new group. I had to remove “https” from the code sample as okta forum says I can only post 2 links in a submission.
terraform {
required_providers {
okta = {
source = “okta/okta”
}
}
}
provider “okta” {
org_name = “mydomain”
base_url = “oktapreview.com”
client_id = “000000000000”
scopes = [“okta.groups.manage”,“okta.apps.manage”]
private_key = file(“c:\devops\keys\keyfile.pem”)
}
resource “okta_group” “testgroup” {
name = “Test TF Group”
}
resource “okta_app_oauth” “sample_dotnet” {
label = “Sample DotNet”
type = “web”
consent_method = “REQUIRED”
login_uri = “localhost:5001/authorization-code/callback”
post_logout_redirect_uris = [“localhost:5001/signout-callback-oidc”]
redirect_uris = [“localhost:5001/signin-oidc”]
omit_secret = false
grant_types = [“authorization_code”]
response_types = [“code”]
}