I have two azure application registrations which are used for authentication & authorization. I would like to know how I can export them into terraform code with keeping their settings and configurations. I have been checking Azure/Aztfexport however I could not export my existing app registrations. Is there a way to do this? If so, how?
This is one of the app registrations that I have for demo purpose:
2
Answers
As per answer from
aztfexport
developers that you can find here:Which means it is currently not possible to export an
azuread
application registration as terraform codeYes, you can export an existing Azure AD Application to terraform.tfstate using the below Terraform code.
Here is the Terraform code to export the Azure AD Application.
Terraform Result.
terraform.tfstate
Reference: azuread_application