Azure OnBoarding Process (Automatic)

Modified on Wed, 23 Apr at 5:13 PM

Pre-requirements:


  1. Permissions of Owner or Contributor on On-Boarded Azure Subscription

  2. Azure CloudShell register 

  • Script Breakdown:

    The script involves several steps, including the creation of an App registration, a Storage Account, and the setup of Cost Management and Billing export. Below is a summary of the script's key functionalities:

     

    1.    Login to Azure:

       - The script initiates by logging into the Azure account and retrieves the current subscription and tenant IDs.

     

    2.    Subscription Verification:

       - The script verifies the correct subscription ID is set. If not, it exits with an error message.

     

    3.    Resource Provider Registration:

       - The script checks if the Microsoft.Storage resource provider is registered. If not, it registers the provider.

     

    4.    Resource Group Setup:

       - The user is prompted to enter a resource group name and select a region from a predefined list. The script then checks if the resource group exists, creates it if necessary, and verifies its existence.

     

    5.    App Registration and Service Principal:

       - The script checks if a service principal for the app (wiv_account) exists. If not, it creates one and generates a new client secret.

      

    6.    Role Assignments:

       - The script assigns the necessary roles to the service principal:

         - Cost Management Reader

         - Monitoring Reader

         - Directory Readers (Optional)



    8. Admin Consent:

        - The script grants admin consent for the application to access required permissions.

     

    9. Completion and Outputs:

        - Upon successful completion, the script provides the following details:

          - Application Display Name

          - Application (Client) ID

          - Directory (Tenant) ID

          - Client Secret Value

         

     

     

    This script ensures that all necessary components and permissions are correctly configured to onboard a new subscription to the Wiv platform.

 

Integration:


Open Azure CloudShell https://shell.azure.com/

 Run the following command:

curl -sO https://raw.githubusercontent.com/wiv-ai/AzureOnBoarding/main/.cloudshell/startup.sh && chmod +x startup.sh && ./startup.sh


  1. Follow script prompt instructions

     

  2. Take note of the script output    

          - Application (Client) ID

          - Directory (Tenant) ID

          - Client Secret Value

       

  3. Login to Wiv Platform

     

  4. Navigate Integrations Page

  5. Click on Azure

     

  6. click on New Azure Integration

     

  7. Provide an integration name

     

  8. Complete the App ID, Client Secret and Tenant ID which were noted from script output:

     

  9. Click Save

     

 

 

 

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article