Use Infrastructure as Code and Pulumi to provision Azure resources

Who is this for?

This Learning Path is an introductory topic for developers interested in automating their cloud deployments using Infrastructure as Code (IaC).

What will you learn?

Upon completion of this Learning Path, you will be able to:

  • Automate the deployment of all the Azure resources required to deploy a containerized application to the Azure Container Instance.
  • Set up Pulumi for Infrastructure as Code (IaC).
  • Automate the provisioning of the Azure resources.

Prerequisites

Before starting, you will need the following:

Summary

AI-assisted

This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
You’ll use Pulumi on Windows to provision Azure Container Instances with TypeScript. First, you’ll install the tooling, initialize a project, and inspect its configuration files. Then, you’ll edit index.ts to define an Azure resource group and container group, and apply the program to create the resources. You can use the same code to update or destroy the deployment.

Frequently asked questions

AI-assisted

These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
Which folder should I open in Visual Studio Code to work on the project?
Open the azure-aci directory and run code . from that folder. This loads the TypeScript project and its Pulumi files in Visual Studio Code.
What files should I see to confirm that the Pulumi TypeScript project is set up?
You should see Pulumi.yaml and a Node.js layout with package.json and node_modules. The program entry point index.ts is where you’ll define Azure resources.
What do I change in `index.ts`?
Replace the original contents with the provided code that imports @pulumi/azure-native/resources and @pulumi/azure-native/containerinstance, creates a resource group named rg-arm64-iac, and defines a container group using the sample image mcr.microsoft.com/dotnet/samples:aspnetapp. Save the file before running the deployment.
How do I know that the deployment worked?
After Pulumi applies the changes, a new resource group named rg-arm64-iac and a container instance are created in your subscription. You can confirm that the deployment worked by checking the resource group and container instance in the Azure Portal.
Do I need to build or push a Docker image?
No. The example uses the public image mcr.microsoft.com/dotnet/samples:aspnetapp referenced in index.ts, so no local image build or registry push is required.
Next