How can I create an azure enterprise application with Terraform. I search a lot and I can just see this but it is for application, not enterprise application.
I have the same problem as this-problem
There is an issue for this in the provider. You could create an Enterprise Application (Service Principal) with this:
resource "azuread_service_principal" "this" {
application_id = azuread_application.this.application_id
tags = [
"AppServiceIntegratedApp",
"WindowsAzureActiveDirectoryIntegratedApp",
]
}
Definition of Enterprise Application: https://web.archive.org/web/20240527224058/https://www.seb8iaan.com/the-difference-between-azuread-app-registrations-and-enterprise-applications-explained/
Newer versions of the AzureAD Terraform provider have included the feature_tags block, which makes this process a little easier.
Here's an example from the Enterprise Application I'm creating for ArgoCD (Idk if it actually works for Argo, but it at least creats the application in the portal properly)
data "azurerm_client_config" "main" {}
resource "azuread_application" "argocd" {
display_name = "shared-cluster-argocd"
feature_tags {
custom_single_sign_on = true
}
owners = [
data.azurerm_client_config.main.object_id
]
identifier_uris = [
"https://argocd.mysite.ca/api/dex/callback"
]
web {
redirect_uris = [
"https://argocd.mysite.ca/api/dex/callback",
]
implicit_grant {
access_token_issuance_enabled = false
id_token_issuance_enabled = false
}
}
}
resource "azuread_service_principal" "argocd" {
application_id = azuread_application.argocd.application_id
owners = azuread_application.argocd.owners
preferred_single_sign_on_mode = "saml"
login_url = "https://argocd.mysite.ca/auth/login"
feature_tags {
custom_single_sign_on = true
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With