This is a simple Pulumi demonstration for creating Azure resources.
- Storage Account
- Container
- App Service
- KeyVault
- Secret
- Create a new directory.
mkdir pulumi-demo
- Create a new Pulumi project.
cd pulumi-demo
pulumi new
- Choose azure-csharp template and complete the project options(you may use default values)
- Set environment varibles for your Azure Subscription.
pulumi config set azure:clientId <XXXXXXXXXXXXX>
pulumi config set azure:clientSecret <XXXXXXXXXXXXX> --secret
pulumi config set azure:tenantId <XXXXXXXXXXXXX>
pulumi config set azure:subscriptionId <XXXXXXXXXXXXX>
- Change MyStack.cs file content with Infrastructure.cs file and rename MyStack class in Program.cs
- Run pulumi up to see new infrastructure resources.
pulumi up
- Check the output and follow the screen instructions.
.......
....
...
Resources:
+ 2 to create
~ 1 to update
- 1 to delete
4 changes. 6 unchanged
Do you want to perform this update? [Use arrows to move, enter to select, type to filter]
yes
> no
details
- If you have choosen yes after some time the deployment of your resources will finish, time to go and check Azure Portal.