@@ -19,27 +19,21 @@ In this quickstart, you create an Azure Windows virtual machine (VM) and associa
19
19
[ !INCLUDE [ About Terraform] ( ~/azure-dev-docs-pr/articles/terraform/includes/abstract.md )]
20
20
21
21
> [ !div class="checklist"]
22
- > * Specify the required version of Terraform and the required providers.
23
- > * Configure the Azure provider with Backup recovery services features.
24
- > * Declare variables for the resource group location, resource group name prefix, and an enabled soft delete status.
25
- > * Generate a random pet name for the resource group.
26
- > * Create an Azure resource group with the generated pet name.
27
- > * Generate a random string of 12 lowercase characters.
22
+
23
+ > * Create an Azure resource group with a unique name.
28
24
> * Create a virtual network with a unique name and a specified address space.
29
25
> * Create a subnet within the virtual network with a unique name and a specified address prefix.
30
26
> * Create a public IP address with a unique name.
31
27
> * Create a network security group with two security rules for remote desk protocol and web traffic.
32
28
> * Create a network interface with a unique name, and attach it to the subnet and public IP address.
33
29
> * Associate the network security group with the network interface.
34
- > * Create a storage account for boot diagnostics.
35
- > * Create a Windows VM with a unique name, is a specified size, and is attached to the network interface.
36
30
> * Generate a random ID for a unique storage account name.
31
+ > * Create a storage account for boot diagnostics.
32
+ > * Create a Windows VM with a unique name.
37
33
> * Generate a random password for the VM.
38
34
> * Create a Backup recovery services vault with a unique name.
39
35
> * Create a Backup policy for the VM with daily frequency and a retention period of seven days.
40
36
> * Protect the VM with the created Backup policy.
41
- > * Output the names of the resource group, Backup recovery services vault, Backup policy, and VM.
42
- > * Output the public IP address and admin password of the VM.
43
37
44
38
## Prerequisites
45
39
@@ -86,39 +80,39 @@ In this quickstart, you create an Azure Windows virtual machine (VM) and associa
86
80
87
81
1 . Get the Azure resource group name.
88
82
89
- ``` console
90
- resource_group_name = $(terraform outout -raw azurerm_resource_group_name)
91
- ```
83
+ ``` console
84
+ resource_group_name = $(terraform outout -raw azurerm_resource_group_name)
85
+ ```
92
86
93
87
1. Get the Backup recovery services vault name.
94
88
95
- ``` console
96
- recovery_services_vault_name = $(terraform output -raw azurerm_recovery_services_vault_name)
97
- ```
89
+ ```console
90
+ recovery_services_vault_name = $(terraform output -raw azurerm_recovery_services_vault_name)
91
+ ```
98
92
99
93
1. Get the Windows VM name.
100
94
101
- ``` console
102
- windows_virtual_machine_name = $(terraform output -raw azurerm_windows_virtual_machine_name)
103
- ```
95
+ ```console
96
+ windows_virtual_machine_name = $(terraform output -raw azurerm_windows_virtual_machine_name)
97
+ ```
104
98
105
99
1. Run [az backup protection backup-now]( /cli/azure/backup/protection #az-backup-protection-backup-now) to start a backup job.
106
100
107
- ``` azcli
108
- az backup protection backup-now --resource-group $resource_group_name \
109
- --vault-name $recovery_services_vault_name \
110
- --container-name $windows_virtual_machine_name \
111
- --item-name $windows_virtual_machine_name \
112
- --backup-management-type AzureIaaSVM
113
- ```
101
+ ```azcli
102
+ az backup protection backup-now --resource-group $resource_group_name \
103
+ --vault-name $recovery_services_vault_name \
104
+ --container-name $windows_virtual_machine_name \
105
+ --item-name $windows_virtual_machine_name \
106
+ --backup-management-type AzureIaaSVM
107
+ ```
114
108
115
109
1. Run [az backup job list]( /cli/azure/backup/job #az-backup-job-list) to monitor the backup job.
116
110
117
- ``` azcli
118
- az backup job list --resource-group $resource_group_name \
119
- --vault-name $recovery_services_vault_name \
120
- --output table
121
- ```
111
+ ```azcli
112
+ az backup job list --resource-group $resource_group_name \
113
+ --vault-name $recovery_services_vault_name \
114
+ --output table
115
+ ```
122
116
123
117
The output is similar to the following example, which shows the backup job is *InProgress*:
124
118
0 commit comments