Getting the object_id from spacelift_azure_integration Terraform resource
Last updated: September 9, 2025
The spacelift_azure_integration Terraform resource currently outputs the application_id (Azure AD Application/Client ID) but does not directly output the object_id that is required for some Azure IAM Terraform resources.
Retrieving the object_id
To get the object_id for use with Azure IAM resources, you can retrieve it by looking up the service principal using the AzureAD provider's data source:
Use the azuread_service_principal data source to look up the service principal by the application_id from your Spacelift Azure integration.
This approach allows you to access the object_id needed for Azure IAM configurations while using the existing output from the Spacelift resource.
Additional Resources
For more information about Azure integration with Spacelift, see the Azure integration documentation.
You can also view the complete spacelift_azure_integration resource documentation for all available outputs and configuration options.