Exercises to learn how to use Pulumi (3rd session)
In this session, you will learn how to create a fully functional VirtualNetwork and a virtual machine. You'll also learn how to use 3rd party library to perform tasks more efficiently and in a reliable way. You'll have another opportunity to use string concatenation on Output<T>
.
- Switch to
exercise/
folder, create a new stack and install the node modules (npm install
) - Create the following resources, and make sure they are all nested under the correct parent
- A Virtual Network (10.42.0.0/16)
- A public Subnet (/20)
- A public IP address
- A network interface
- The necessarity network security group and rule
- Create a virtual machine
- Use a small virtual machine to limit/reduce cost
- Using the most recent Ubuntu 20.04 LTS
- Generate a random password
- ensure you can SSH into it
- Create stack outputs for:
- The VM host name or IP address
- The random password
- A configuration admin user name for the VM
- Use a 3rd pary module to compute subnets CIDR
- Ensure the project can easily be configured (ie, no hardcoded values where possible)
- Pulumi examples
You will find all the answers here.