Overview

GitHub is a collaborative development platform to host projects using the Git version control system and allows us to create repositories for our projects. The code of the projects hosted on GitHub is typically stored publicly, although using a payment account, it also allows hosting of private repositories.
https://github.com/

What is Azure Resource Manager?

Azure Resource Manager (ARM) allows you to implement, update or delete resources for your solution in the cloud in a single coordinated operation. Resources can include virtual machines, storage accounts, virtual networks, services or any components that are managed.

Why use ARM?

  • You can implement, manage and monitor all the resources in your solution as a group, known as a resource group, instead of managing these resources individually.
  • You can repeatedly deploy your solution throughout the development life cycle and have confidence that your resources are deployed in a consistent state.
  • You can use declarative templates to define your implementation.
  • You can define the dependencies between resources so that they are implemented in the correct order.
  • You can apply access control to all services in your resource group because Role-Based Access Control (RBAC) is natively integrated into the management platform.
  • You can apply labels to the resources to logically organize all the resources in your subscription.
  • You can clarify your organization's billing by seeing the accumulated costs for the entire group or for a group of resources that share the same label.
  • Azure Resource Manager allows you to implement, monitor and manage group solution resources. More info.
In this post, we will talk about how to implement an ARM template using GitHub.

Implement an ARM template from GitHub

At the steps below we will see how to implement an  ARM template from GitHub using the "Deploy to Azure" button.



We will start from the base in which we already have a GitHub account created and we can create repositories.

  1. We will create a repository that we will use to deploy the template in Azure.
  2. We will create a file called README.md
  3. We upload the .JSON template to the created repository.
  4. We click on the template.
  5. We select RAW as shown in the following image.

  6. Copy the URL of the browser and go to the following URL https://www.urlencoder.org/
  7. Paste the URL in the box" Type (or paste) here..." as shown in the following image

  8. We click on the button "ENCODE".
  9. We copy the result of the URL that shows us, similar to the following https%3A%2F%2Fraw.githubusercontent.com%2FRGalanteG%2FAzure-PAYG%2Fmaster%2FB1%2Fazuredeploy.json

  10. Copy the following URL and paste it into the README.md file that we created in our repository. We replace the URL that I have marked in bold with our URL generated on the web https://urlencoder.org/ <a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FRGalanteG%2FAzure-PAYG%2Fmaster%2FB1%2Fazuredeploy.json " target="_blank"> <img src="http://azuredeploy.net/deploybutton.png"/> </a>

  11. We save the changes made to the README.md file by clicking on the button "Commit changes".

  12. We return to the repository and we will see that an "Azure to deploy" button has been created. Clicking on "Azure to deploy" will display the template in the Azure account that we select.