# Azure source setup workaround Because of an issue with communication between Azure portal and console dot caused by CORS settings, which is bit too strict on our side for Azure needs this helps to setup Azure source "the longer way around". ## Creating Azure Source 1. Download or copy paste content of url to a file https://console.redhat.com/api/provisioning/v1/azure_offering_template - For example by running in your terminal: - `get https://console.redhat.com/api/provisioning/v1/azure_offering_template -O offering_template.json` 2. Go to Azure Lighthouse > Service Providers https://portal.azure.com/#view/Microsoft_Azure_CustomerHub/ServiceProvidersBladeV2/~/providers 3. In the top left click [+ Add offer] -> [Add via template] ![](https://hackmd.io/_uploads/By916hMNn.png) 4. In the pop up that opens up select `Browse for files` 5. Select the downloaded file from step `1.` 6. Confirm by clicking on [Upload] 7. On screen that appears select Subscription you want to use. ![](https://hackmd.io/_uploads/Hyf5a3fN3.png) 8. Confirm by clicking on [Review and create] 9. Go to Resource groups for the selected subscription 10. Create an empty resource group `redhat-deployed` 11. Go to Subscriptions in Azure portal 12. Copy UUID of the subscription selected in step `7.` 13. Navigate to Create Sources on ConsoleDot https://console.redhat.com/beta/settings/sources/new?sort_by[]=created_at:desc&limit=50&offset=0&category=Cloud 14. Select Azure, click [Next] 15. Fill out name for your source and click [Next] 16. Select `Launch images` application and click [Next] 17. Click on the `Take me to Lighthouse` so the form lets you to click [Next], but be aware this will fail, feel free to close the freshly opened tab and click [Next] in the wizard, that is now enabled. 18. Fill out the UUID copied in step `10.` and click [Next] 19. Confirm by [Create Source] ## Creating first Azure image 1. Navigate to https://console.redhat.com/beta/insights/image-builder/imagewizard 2. Select RHEL version you want to build image for, 3. select Azure and click [Next] 4. Select the Source you've created following the procedure above 5. Click on the [Authorize Image builder] button. 6. Approve on Azure portal 7. Still in Azure navigate to redhat-deployed Resource Group to it's access control (IAM) ![](https://hackmd.io/_uploads/r11XeTGVh.png) 8. Select [+ Add] -> `Role assignment` 9. Select `Contributor` role and click [Next] 10. Now click [+ Select members] and left popup will open 11. Search for `Red Hat Image Builder` and select the found user. 12. Confirm by [Review + assign] 13. Close the Azure portal tab and go back to the Image Builder wizard in the previous tab 14. Select `redhat-deployed` Resource group from the toggle box and confirm by clicking [Next]. 15. Continue with setting up you image, other options are on you :)