In this post, I will attempt to explain what the some usefull resources and how they can be used with an examples. Generate Random String # Generate a random string name You can use random resource in order to create a unique name for some resources where you can't use the same name i.g creating resource group you can use this resource as below: name = "${random_string.name.result}" Wait Resource: this resource is very helpful if you want for sometime to get the resource ready before creating or executing different operation. i.g wait till you get the VM up and running before you run Shell script on it. resource "time_sleep" "wait_60_seconds" { Null resource, which is very helpful if you want to run/execute command on remote machine as example resource "null_resource" "configure_identity" { Dynamic Block, You can dynamically construct repeatable nested blocks like setting using a special dynamic block type, which is supported inside resource, data, provider, and provisioner blocks: resource "azurerm_network_security_group" "nsg" {
2 Comments
Jarrah
3/30/2022 01:47:15 am
Thanks for this post! Great info!
Reply
6/1/2022 06:11:47 pm
Hello Mohammad Al Rousan!! Am really impressed with this Azure blog because this blog is very easy to learn and understand clearly. am pretty much pleased with your good work. Thanks for sharing.
Reply
Leave a Reply. |
Author
Mohammad Al Rousan is a Microsoft MVP (Azure), Microsoft Certified Solution Expert (MCSE) in Cloud Platform & Azure DevOps & Infrastructure, An active community blogger and speaker.
Al Rousan has over 8 years of professional experience in IT Infrastructure and very passionate about Microsoft technologies and products. Top 10 Microsoft Azure Blogs
Archives
September 2023
Categories
All
|