Skip to content

Commit bd84bfe

Browse files
committed
test 3
1 parent 4f73c9a commit bd84bfe

File tree

3 files changed

+5
-20
lines changed

3 files changed

+5
-20
lines changed

articles/terraform/terraform-backend.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,35 +62,20 @@ Each of these values can be specified in the Terraform configuration file or on
6262

6363
Create an environment variable named `ARM_ACCESS_KEY` with the value of the Azure Storage access key.
6464

65-
```console
65+
```azurecli-interactive
6666
export ARM_ACCESS_KEY=<storage access key>
6767
```
6868

6969
To further protect the Azure Storage account access key, store it in Azure Key Vault. The environment variable can then be set using a command similar to the following. For more information on Azure Key Vault, see the [Azure Key Vault documentation][azure-key-vault].
7070

71-
```console
71+
```azurecli-interactive
7272
export ARM_ACCESS_KEY=$(az keyvault secret show --name terraform-backend-key --vault-name myKeyVault --query value -o tsv)
7373
```
7474

7575
To configure Terraform to use the backend, include a *backend* configuration with a type of *azurerm* inside of the Terraform configuration. Add the *storage_account_name*, *container_name*, and *key* values to the configuration block.
7676

7777
The following example configures a Terraform backend and creates an Azure resource group. Replace the values with values from your environment.
7878

79-
```terraform
80-
terraform {
81-
backend "azurerm" {
82-
storage_account_name = "tstate09762"
83-
container_name = "tstate"
84-
key = "terraform.tfstate"
85-
}
86-
}
87-
88-
resource "azurerm_resource_group" "state-demo-secure" {
89-
name = "state-demo"
90-
location = "eastus"
91-
}
92-
```
93-
9479
```hcl
9580
terraform {
9681
backend "azurerm" {

articles/terraform/terraform-cloud-shell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Terraform is installed and immediately available in Cloud Shell. Terraform scrip
2828

2929
Azure Terraform modules require credentials to access and make changes to the resources in your Azure subscription. When working in the Cloud Shell, add the following code to your scripts to use Azure Terraform modules in the Cloud Shell:
3030

31-
```tf
31+
```hcl
3232
# Configure the Microsoft Azure Provider
3333
provider "azurerm" {
3434
}

articles/terraform/terraform-create-k8s-cluster-with-aks-applicationgateway-ingress.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ In this tutorial, you learn how to perform the following tasks in creating a [Ku
3333
- **Azure service principal**: Follow the directions in the section of the **Create the service principal** section in the article, [Create an Azure service principal with Azure CLI](/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest). Take note of the values for the appId, displayName, and password.
3434
- Note the Object ID of the Service Principal by running the following command
3535

36-
```bash
36+
```azurecli-interactive
3737
az ad sp list --display-name <displayName>
3838
```
3939
@@ -48,7 +48,7 @@ The first step is to create the directory that holds your Terraform configuratio
4848
4949
1. Change directories to the `clouddrive` directory.
5050
51-
```bash
51+
```azurecli-interactive
5252
cd clouddrive
5353
```
5454

0 commit comments

Comments
 (0)