Open magic-happenz opened 1 year ago
Terraform v1.5.4 azuread version 2.41.0
azuread_service_principal
resource "azuread_application" "example" { display_name = "example" feature_tags { enterprise = true gallery = false } } resource "azuread_service_principal" "example" { application_id = azuread_application.example.application_id use_existing = true } resource "azuread_synchronization_secret" "example" { service_principal_id = azuread_service_principal.example.id credential { key = "BaseAddress" value = "https://exampleapp.net/api/2.0/preview/scim" } credential { key = "SecretToken" value = "some-token" } } resource "azuread_synchronization_job" "example" { service_principal_id = azuread_service_principal.example.id template_id = "scim" enabled = true }
The deployment creates a SCIM provisioning job on the non-gallery application.
The deployment fails with the error that the "scim" template can not be found.
terraform init
terraform apply
Feature was implemented in https://github.com/hashicorp/terraform-provider-azuread/pull/830 However, for this in order to work the actual "scim" template need to exist on the API (https://graph.microsoft.com/v1.0/servicePrincipals/%3cprincipal-object-id/synchronization/templates) which it does not. To make it actually work the templates on the app needs to be initiated https://learn.microsoft.com/en-us/graph/api/applicationtemplate-instantiate?view=graph-rest-1.0&tabs=http. Apparently none of the resources is doing that and there is no other resource that does it.
This bug still exists in version 3 of the provider. I wonder why it has not been addressed yet?
Community Note
Terraform (and AzureAD Provider) Version
Terraform v1.5.4 azuread version 2.41.0
Affected Resource(s)
azuread_service_principal
Terraform Configuration Files
Expected Behavior
The deployment creates a SCIM provisioning job on the non-gallery application.
Actual Behavior
The deployment fails with the error that the "scim" template can not be found.
Steps to Reproduce
terraform init
terraform apply
Important Factoids
Feature was implemented in https://github.com/hashicorp/terraform-provider-azuread/pull/830 However, for this in order to work the actual "scim" template need to exist on the API (https://graph.microsoft.com/v1.0/servicePrincipals/%3cprincipal-object-id/synchronization/templates) which it does not. To make it actually work the templates on the app needs to be initiated https://learn.microsoft.com/en-us/graph/api/applicationtemplate-instantiate?view=graph-rest-1.0&tabs=http. Apparently none of the resources is doing that and there is no other resource that does it.