![]() Resource_group_name = azurerm_resource_group.rg. Location = azurerm_resource_group.rg.location See more articles and sample code showing how to use Terraform to manage Azure resourcesĬreate a directory in which to test the sample Terraform code and make it the current directory.Ĭreate a file named providers.tf and insert the following code: terraform -public-ip" You can view the log file containing the test results from current and previous versions of Terraform. Let us generate the key pair using the following command. Later we are going to associate both public and private keys with AWS EC2 instances. The sample code for this article is located in the Azure Terraform GitHub repo. Before you start playing with AWS console and terraform script we need to first generate the key-pair (public key, private key) using ssh-keygen. Azure subscription: If you don't have an Azure subscription, create a free account before you begin.Create a Windows VM extension using azurerm_virtual_machine_extension.Create a Windows VM with an IIS web server using azurerm_windows_virtual_machine.Create a storage account for boot diagnostics using azurerm_storage_account.Generate a random value for a unique storage account name using random_id.Create an association between the network security group and the network interface using azurerm_network_interface_security_group_association.Create a network interface using azurerm_network_interface.Create a network security group using azurerm_network_security_group. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |