Skip to content

Commit b345f7a

Browse files
authored
Merge branch 'MicrosoftDocs:main' into cosmos-populate-nosql-7
2 parents 6655607 + 2cd5c41 commit b345f7a

File tree

11 files changed

+143
-109
lines changed

11 files changed

+143
-109
lines changed

.openpublishing.redirection.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24050,7 +24050,12 @@
2405024050
},
2405124051
{
2405224052
"source_path_from_root": "/articles/virtual-machines/virtual-machines-reliability.md",
24053-
"redirect_url": "/azure/virtual-machines/reliability-virtual-machines",
24053+
"redirect_url": "/azure/reliability/reliability-virtual-machines",
24054+
"redirect_document_id": false
24055+
},
24056+
{
24057+
"source_path_from_root": "/articles/virtual-machines/reliability-virtual-machines.md",
24058+
"redirect_url": "/azure/reliability/reliability-virtual-machines",
2405424059
"redirect_document_id": false
2405524060
},
2405624061
{

articles/azure-resource-manager/management/move-support-resources.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,6 +1689,15 @@ Before starting your move operation, review the [checklist](./move-resource-grou
16891689
> | secrets | **Yes** | **Yes** | No |
16901690
> | volumes | **Yes** | **Yes** | No |
16911691
1692+
## Microsoft.ServiceNetworking
1693+
1694+
> [!div class="mx-tableFixed"]
1695+
> | Resource type | Resource group | Subscription | Region move |
1696+
> | ------------- | ----------- | ---------- | ----------- |
1697+
> | trafficcontrollers | No | No | No |
1698+
> | associations | No | No | No |
1699+
> | frontends | No | No | No |
1700+
16921701
## Microsoft.Services
16931702

16941703
> [!div class="mx-tableFixed"]

articles/migrate/whats-new.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Learn more on how to perform [software inventory](how-to-discover-applications.m
6868

6969
## Update (October 2022)
7070

71-
- Support for export of errors and notifications from the portal for software inventory and agentless dependency.
71+
- Support for export of errors and notifications from the portal for software inventory and agentless dependency. [Learn more](troubleshoot-dependencies.md)
7272

7373
## Update (September 2022)
7474

articles/reliability/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
- name: Azure Virtual Machine Scale Sets
251251
href: ../virtual-machines/availability.md?toc=/azure/reliability/toc.json&bc=/azure/reliability/breadcrumb/toc.json
252252
- name: Azure Virtual Machines
253-
href: ../virtual-machines/reliability-virtual-machines.md?toc=/azure/reliability/toc.json&bc=/azure/reliability/breadcrumb/toc.json
253+
href: reliability-virtual-machines.md
254254
- name: Azure Virtual Network
255255
href: ../vpn-gateway/create-zone-redundant-vnet-gateway.md?toc=/azure/reliability/toc.json&bc=/azure/reliability/breadcrumb/toc.json
256256
- name: Azure VPN Gateway

articles/reliability/reliability-guidance-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Azure reliability guidance contains the following:
3636
[Azure Storage: Blob Storage](../storage/common/storage-disaster-recovery-guidance.md?toc=/azure/reliability/toc.json&bc=/azure/reliability/breadcrumb/toc.json)|
3737
[Azure Storage Mover](reliability-azure-storage-mover.md)|
3838
[Azure Virtual Machine Scale Sets](../virtual-machines/availability.md?toc=/azure/reliability/toc.json&bc=/azure/reliability/breadcrumb/toc.json)|
39-
[Azure Virtual Machines](../virtual-machines/reliability-virtual-machines.md?toc=/azure/reliability/toc.json&bc=/azure/reliability/breadcrumb/toc.json)|
39+
[Azure Virtual Machines](reliability-virtual-machines.md)|
4040
[Azure Virtual Network](../vpn-gateway/create-zone-redundant-vnet-gateway.md?toc=/azure/reliability/toc.json&bc=/azure/reliability/breadcrumb/toc.json)|
4141
[Azure VPN Gateway](../vpn-gateway/about-zone-redundant-vnet-gateways.md?toc=/azure/reliability/toc.json&bc=/azure/reliability/breadcrumb/toc.json)|
4242

articles/virtual-machines/reliability-virtual-machines.md renamed to articles/reliability/reliability-virtual-machines.md

Lines changed: 64 additions & 69 deletions
Large diffs are not rendered by default.

articles/service-health/service-health-notifications-properties.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Properties.communicationId | The communication with which this event is associat
5656
- Warning - Emergency maintenance
5757
- Informational - Standard planned maintenance
5858

59-
**Information** (properties.incidentType == Information)
59+
**Information** (properties.incidentType == Informational)
6060
- Informational - Administrator may be required to prevent impact to existing services.
6161

6262
**Security** (properties.incidentType == Security)

articles/virtual-machines/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1918,7 +1918,7 @@
19181918
items:
19191919
- name: Reliability in Virtual Machines
19201920
displayName: Reliability in Virtual Machines
1921-
href: reliability-virtual-machines.md
1921+
href: ../reliability/reliability-virtual-machines.md?toc=/azure/virtual-machines/toc.json&bc=/azure/virtual-machines/breadcrumb/toc.json
19221922
- name: Service disruptions
19231923
href: virtual-machines-disaster-recovery-guidance.md
19241924
- name: Back up VMs
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
items:
12
- name: Azure
23
tocHref: /azure/
34
topicHref: /azure/index
45
items:
56
- name: Virtual Machines
67
tocHref: /azure/
78
topicHref: /azure/virtual-machines/index
9+
- name: Virtual Machines
10+
tocHref: /azure/reliability

articles/virtual-machines/linux/quick-create-terraform.md

Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ ms.service: virtual-machines
66
ms.collection: linux
77
ms.topic: quickstart
88
ms.workload: infrastructure
9-
ms.date: 08/31/2022
9+
ms.date: 07/24/2023
1010
ms.author: tarcher
1111
ms.custom: devx-track-terraform
12+
content_well_notification:
13+
- AI-contribution
1214
---
1315

1416
# Quickstart: Use Terraform to create a Linux VM
@@ -17,55 +19,58 @@ ms.custom: devx-track-terraform
1719

1820
Article tested with the following Terraform and Terraform provider versions:
1921

20-
- [Terraform v1.2.7](https://releases.hashicorp.com/terraform/)
21-
- [AzureRM Provider v.3.20.0](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs)
22-
2322
This article shows you how to create a complete Linux environment and supporting resources with Terraform. Those resources include a virtual network, subnet, public IP address, and more.
2423

2524
[!INCLUDE [Terraform abstract](~/azure-dev-docs-pr/articles/terraform/includes/abstract.md)]
2625

2726
In this article, you learn how to:
2827
> [!div class="checklist"]
29-
30-
> * Create a virtual network
31-
> * Create a subnet
32-
> * Create a public IP address
33-
> * Create a network security group and SSH inbound rule
34-
> * Create a virtual network interface card
35-
> * Connect the network security group to the network interface
36-
> * Create a storage account for boot diagnostics
37-
> * Create SSH key
38-
> * Create a virtual machine
39-
> * Use SSH to connect to virtual machine
40-
41-
> [!NOTE]
42-
> The example code in this article is located in the [Microsoft Terraform GitHub repo](https://github.com/Azure/terraform/tree/master/quickstart/101-vm-with-infrastructure). See more [articles and sample code showing how to use Terraform to manage Azure resources](/azure/terraform)
28+
> * Create a random value for the Azure resource group name using [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet).
29+
> * Create an Azure resource group using [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group).
30+
> * Create a virtual network (VNET) using [azurerm_virtual_network](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network).
31+
> * Create a subnet using [azurerm_subnet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet).
32+
> * Create a public IP using [azurerm_public_ip](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip).
33+
> * Create a network security group using [azurerm_network_security_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_group).
34+
> * Create a network interface using [azurerm_network_interface](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface).
35+
> * Create an association between the network security group and the network interface using [azurerm_network_interface_security_group_association](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface_security_group_association).
36+
> * Generate a random value for a unique storage account name using [random_id](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id).
37+
> * Create a storage account for boot diagnostics using [azurerm_storage_account](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account).
38+
> * Create a Linux VM using [azurerm_linux_virtual_machine](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine)
39+
> * Create an AzAPI resource [azapi_resource](https://registry.terraform.io/providers/Azure/azapi/latest/docs/resources/azapi_resource).
40+
> * Create an AzAPI resource to generate an SSH key pair using [azapi_resource_action](https://registry.terraform.io/providers/Azure/azapi/latest/docs/resources/azapi_resource_action).
4341
4442
## Prerequisites
4543

46-
[!INCLUDE [open-source-devops-prereqs-azure-subscription.md](~/azure-dev-docs-pr/articles/includes/open-source-devops-prereqs-azure-subscription.md)]
47-
4844
- [Install and configure Terraform](/azure/developer/terraform/quickstart-configure)
4945

5046
## Implement the Terraform code
5147

48+
> [!NOTE]
49+
> The sample code for this article is located in the [Azure Terraform GitHub repo](https://github.com/Azure/terraform/tree/master/quickstart/101-vm-with-infrastructure). You can view the log file containing the [test results from current and previous versions of Terraform](https://github.com/Azure/terraform/tree/master/quickstart/101-vm-with-infrastructure/TestRecord.md).
50+
>
51+
> See more [articles and sample code showing how to use Terraform to manage Azure resources](/azure/terraform)
52+
5253
1. Create a directory in which to test the sample Terraform code and make it the current directory.
5354

5455
1. Create a file named `providers.tf` and insert the following code:
5556

56-
[!code-terraform[master](~/terraform_samples/quickstart/101-vm-with-infrastructure/providers.tf)]
57+
:::code language="Terraform" source="~/terraform_samples/quickstart/101-vm-with-infrastructure/providers.tf":::
58+
59+
1. Create a file named `ssh.tf` and insert the following code:
60+
61+
:::code language="Terraform" source="~/terraform_samples/quickstart/101-vm-with-infrastructure/ssh.tf":::
5762

5863
1. Create a file named `main.tf` and insert the following code:
5964

60-
[!code-terraform[master](~/terraform_samples/quickstart/101-vm-with-infrastructure/main.tf)]
65+
:::code language="Terraform" source="~/terraform_samples/quickstart/101-vm-with-infrastructure/main.tf":::
6166

6267
1. Create a file named `variables.tf` and insert the following code:
6368

64-
[!code-terraform[master](~/terraform_samples/quickstart/101-vm-with-infrastructure/variables.tf)]
69+
:::code language="Terraform" source="~/terraform_samples/quickstart/101-vm-with-infrastructure/variables.tf":::
6570

6671
1. Create a file named `outputs.tf` and insert the following code:
6772

68-
[!code-terraform[master](~/terraform_samples/quickstart/101-vm-with-infrastructure/outputs.tf)]
73+
:::code language="Terraform" source="~/terraform_samples/quickstart/101-vm-with-infrastructure/outputs.tf":::
6974

7075
## Initialize Terraform
7176

@@ -81,28 +86,37 @@ In this article, you learn how to:
8186

8287
## Verify the results
8388

84-
To use SSH to connect to the virtual machine, do the following steps:
89+
#### [Azure CLI](#tab/azure-cli)
8590

86-
1. Run [terraform output](https://www.terraform.io/cli/commands/output) to get the SSH private key and save it to a file.
91+
1. Get the Azure resource group name.
8792

8893
```console
89-
terraform output -raw tls_private_key > id_rsa
94+
resource_group_name=$(terraform output -raw resource_group_name)
9095
```
9196

92-
1. Run [terraform output](https://www.terraform.io/cli/commands/output) to get the virtual machine public IP address.
97+
1. Run [az vm list](/cli/azure/vm#az-vm-list) with a [JMESPath](/cli/azure/query-azure-cli) query to display the names of the virtual machines created in the resource group.
9398

94-
```console
95-
terraform output public_ip_address
99+
```azurecli
100+
az vm list \
101+
--resource-group $resource_group_name \
102+
--query "[].{\"VM Name\":name}" -o table
96103
```
97104

98-
1. Use SSH to connect to the virtual machine.
105+
#### [Azure PowerShell](#tab/azure-powershell)
106+
107+
1. Get the Azure resource group name.
99108

100109
```console
101-
ssh -i id_rsa azureuser@<public_ip_address>
110+
$resource_group_name=$(terraform output -raw resource_group_name)
102111
```
103112

104-
**Key points:**
105-
- Depending on the permissions of your environment, you might get an error when trying to ssh into the virtual machine using the `id_rsa` key file. If you get an error stating that the private key file is unprotected and can't be used, try running the following command: `chmod 600 id_rsa`, which will restrict read and write access to the owner of the file.
113+
1. Run [Get-AzVm](/powershell/module/az.compute/get-azvm) to display the names of all the virtual machines in the resource group.
114+
115+
```azurepowershell
116+
Get-AzVm -ResourceGroupName $resource_group_name
117+
```
118+
119+
---
106120

107121
## Clean up resources
108122

0 commit comments

Comments
 (0)