+61 (0) 481355646
reply@assureditinfra.com.au
Victoria, 3029 Australia
Follow On:
Let’s implement ‘Azure Bastion’ through Terraform as part of our Terraform hands-on scenarios/series
Do you already know what is ‘Azure Bastion’ ? if not, please refer here for details
Let’s first look at our Architecture diagram shown below to understand what all is needed for the successful implementation
In order to achieve the above, we need to first break down in to small steps— Let’s do that now as shown below
Build the basic Terraform Folder Structure
2. Create a VNet and a Subnet in that Resource Group
3. Create Azure Bastion Host and necessary components required
4. Use Azure Key Vault and create Secret for the LinuxVM
5. Create the LinuxVM
6. Define the NSG Rules for AzureBastionHost and also for LinuxVM
[When the file contains many lines, it is not feasible to show in one shot and explain at the same time, hence I’ve divided them in to multiple snippets such as rules_main.tf Snippet_*, where * represents numbering like 1,2,3 and so on…. I believe that allows you to follow the sequence of code accordingly. Same is true for files such as main.tf. You can notice that as main.tf Snippet_*]
7. Deploy and Validate the Infrastructure
Finally perform terraform destroy –auto-approve to destroy all the resources in the Azure Portal to free up consuming the $
Hope you find this information helpful.
Thanks for taking time to read!