You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/linux/terraform-create-complete-vm.md
+16-18Lines changed: 16 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,19 +3,17 @@ title: Use Terraform to create a complete Linux VM in Azure | Microsoft Docs
3
3
description: Learn how to use Terraform to create and manage a complete Linux virtual machine environment in Azure
4
4
services: virtual-machines-linux
5
5
documentationcenter: virtual-machines
6
-
author: echuvyrov
6
+
author: tomarchermsft
7
7
manager: gwallace
8
8
editor: na
9
9
tags: azure-resource-manager
10
-
11
10
ms.assetid:
12
11
ms.service: virtual-machines-linux
13
-
14
12
ms.topic: article
15
13
ms.tgt_pltfrm: vm-linux
16
14
ms.workload: infrastructure
17
-
ms.date: 09/14/2017
18
-
ms.author: gwallace
15
+
ms.date: 09/20/2019
16
+
ms.author: tarcher
19
17
---
20
18
21
19
# Create a complete Linux virtual machine infrastructure in Azure with Terraform
@@ -32,7 +30,7 @@ The `provider` section tells Terraform to use an Azure provider. To get values f
32
30
> [!TIP]
33
31
> If you create environment variables for the values or are using the [Azure Cloud Shell Bash experience](/azure/cloud-shell/overview) , you don't need to include the variable declarations in this section.
To access resources across the Internet, create and assign a public IP address to your VM. The following section creates a public IP address named *myPublicIP*:
Network Security Groups control the flow of network traffic in and out of your VM. The following section creates a network security group named *myNetworkSecurityGroup* and defines a rule to allow SSH traffic on TCP port 22:
A virtual network interface card (NIC) connects your VM to a given virtual network, public IP address, and network security group. The following section in a Terraform template creates a virtual NIC named *myNIC* connected to the virtual networking resources you have created:
To store boot diagnostics for a VM, you need a storage account. These boot diagnostics can help you troubleshoot problems and monitor the status of your VM. The storage account you create is only to store the boot diagnostics data. As each storage account must have a unique name, the following section generates some random text:
158
156
159
-
```tf
157
+
```hcl
160
158
resource "random_id" "randomId" {
161
159
keepers = {
162
160
# Generate a new ID only when a new resource group is defined
Now you can create a storage account. The following section creates a storage account, with the name based on the random text generated in the preceding step:
0 commit comments