
pogij (pogij) asked a question.
Hi,
I'm writing some configurations via terraform and trying to figure out how to get the outputs from okta. For example here is my structure is below. I'm wondering how I can set the ID of the group creation module and app creation module so that I can use the group_assignment resource instead
/
/modules
apps/main.tf
groups/main.tf
inside of asset.thing.tf:
module "group" {
source = "./modules/groups"
name = "my_app_group"
description = "some description"
}
* ---------------------------------------------------------------------------------------------------------------------
* CREATE THE OKTA APP
* ---------------------------------------------------------------------------------------------------------------------
module "app" {
source = "./modules/apps"
label = "MyApp"
type = "web"
grant_types = ["authorization_code"]
redirect_uris = ["https://example.com/"]
response_types = ["code"]
groups = ["my_app_group"]
}

Hi Jason, this is Eusebiu from Okta support.
This question would be better addressed in a ticket as we can provide more help there and we can study the issue in detail.
However, until you have the time to do so, we have some documentation here: https://www.okta.com/blog/2019/08/better-together-using-the-okta-integration-with-hashicorp-terraform/
Thank you!
Thanks for the reply! I was able to figure it out!
resource okta_app_group_assignment app-myapp_group-myapp {
app_id = module.app.id
group_id = module.group.id
priority = 1
}