Skip to content

Commit 47b0896

Browse files
committed
removed terraform tabs
1 parent 9b24618 commit 47b0896

File tree

1 file changed

+1
-72
lines changed

1 file changed

+1
-72
lines changed

articles/aks/cluster-container-registry-integration.md

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The AKS to ACR integration assigns the [**AcrPull** role][acr-pull] to the [Azur
2626
* To avoid needing one of these roles, you can instead use an existing managed identity to authenticate ACR from AKS. For more information, see [Use an Azure managed identity to authenticate to an ACR](../container-registry/container-registry-authentication-managed-identity.md).
2727
* If you're using Azure CLI, this article requires that you're running Azure CLI version 2.7.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][azure-cli-install].
2828
* If you're using Azure PowerShell, this article requires that you're running Azure PowerShell version 5.9.0 or later. Run `Get-InstalledModule -Name Az` to find the version. If you need to install or upgrade, see [Install Azure PowerShell][azure-powershell-install].
29+
* Examples and syntax to use Terraform for managing ACR can be found in the [Terraform reference][terraform-reference].
2930

3031
## Create a new AKS cluster with ACR integration
3132

@@ -55,31 +56,6 @@ $MYACR = 'myContainerRegistry'
5556
New-AzContainerRegistry -Name $MYACR -ResourceGroupName myContainerRegistryResourceGroup -Sku Basic
5657
```
5758

58-
#### [Terraform](#tab/terraform-example)
59-
60-
```terraform
61-
# Example Usage
62-
resource "azurerm_container_registry" "acr" {
63-
name = "containerRegistry1"
64-
resource_group_name = azurerm_resource_group.example.name
65-
location = azurerm_resource_group.example.location
66-
sku = "Premium"
67-
admin_enabled = false
68-
georeplications {
69-
location = "East US"
70-
zone_redundancy_enabled = true
71-
tags = {}
72-
}
73-
georeplications {
74-
location = "North Europe"
75-
zone_redundancy_enabled = true
76-
tags = {}
77-
}
78-
}
79-
```
80-
81-
For more information about the syntax and argument reference, see [Terraform reference][terraform-reference].
82-
8359
---
8460

8561
### Create a new AKS cluster and integrate with an existing ACR
@@ -125,39 +101,6 @@ New-AzAksCluster -Name myAKSCluster -ResourceGroupName myResourceGroup -Generate
125101
126102
This command may take several minutes to complete.
127103

128-
#### [Terraform](#tab/terraform-example)
129-
130-
```terraform
131-
# Example Usage
132-
resource "azurerm_kubernetes_cluster" "example" {
133-
name = "example-aks1"
134-
location = azurerm_resource_group.example.location
135-
resource_group_name = azurerm_resource_group.example.name
136-
dns_prefix = "exampleaks1"
137-
default_node_pool {
138-
name = "default"
139-
node_count = 1
140-
vm_size = "Standard_D2_v2"
141-
}
142-
identity {
143-
type = "SystemAssigned"
144-
}
145-
tags = {
146-
Environment = "Production"
147-
}
148-
}
149-
resource "azurerm_role_assignment" "example" {
150-
principal_id = azurerm_kubernetes_cluster.example.kubelet_identity[0].object_id
151-
role_definition_name = "AcrPull"
152-
scope = azurerm_container_registry.example.id
153-
skip_service_principal_aad_check = true
154-
}
155-
```
156-
157-
For more information about the syntax and argument reference, see [Terraform reference][terraform-reference].
158-
159-
This method may take several minutes to complete.
160-
161104
---
162105

163106
## Configure ACR integration for existing AKS clusters
@@ -190,20 +133,6 @@ Set-AzAksCluster -Name myAKSCluster -ResourceGroupName myResourceGroup -AcrNameT
190133
> [!NOTE]
191134
> Running the `Set-AzAksCluster -AcrNameToAttach` cmdlet uses the permissions of the user running the command to create the role ACR assignment. This role is assigned to the [kubelet][kubelet] managed identity. For more information on AKS managed identities, see [Summary of managed identities][summary-msi].
192135
193-
#### [Terraform](#tab/terraform-example)
194-
195-
```terraform
196-
# Example Usage
197-
resource "azurerm_role_assignment" "example" {
198-
principal_id = azurerm_kubernetes_cluster.example.kubelet_identity[0].object_id
199-
role_definition_name = "AcrPull"
200-
scope = azurerm_container_registry.example.id
201-
skip_service_principal_aad_check = true
202-
}
203-
```
204-
205-
For more information about the syntax and argument reference, see [Terraform reference][terraform-reference].
206-
207136
---
208137

209138
### Detach an ACR from an AKS cluster

0 commit comments

Comments
 (0)