Skip to content

Commit

Permalink
Fixing sample code in the documentation (hashicorp#26036)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chambras authored May 23, 2024
1 parent 8c087c2 commit a54f86a
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,19 @@ resource "azurerm_kubernetes_cluster_extension" "example" {
}
}
resource "azurerm_role_assignment" "extension_and_storage_account_permission" {
resource "azurerm_role_assignment" "test_extension_and_storage_account_permission" {
scope = azurerm_storage_account.example.id
role_definition_name = "Storage Account Contributor"
principal_id = azurerm_kubernetes_cluster_extension.example.aks_assigned_identity[0].principal_id
}
resource "azurerm_role_assignment" "vault_msi_read_on_cluster" {
resource "azurerm_role_assignment" "test_vault_msi_read_on_cluster" {
scope = azurerm_kubernetes_cluster.example.id
role_definition_name = "Reader"
principal_id = azurerm_data_protection_backup_vault.example.identity[0].principal_id
}
resource "azurerm_role_assignment" "vault_msi_read_on_snap_rg" {
resource "azurerm_role_assignment" "test_vault_msi_read_on_snap_rg" {
scope = azurerm_resource_group.snap.id
role_definition_name = "Reader"
principal_id = azurerm_data_protection_backup_vault.example.identity[0].principal_id
Expand All @@ -112,22 +112,22 @@ resource "azurerm_role_assignment" "vault_msi_read_on_snap_rg" {
resource "azurerm_role_assignment" "test_vault_msi_snapshot_contributor_on_snap_rg" {
scope = azurerm_resource_group.snap.id
role_definition_name = "Disk Snapshot Contributor"
principal_id = azurerm_data_protection_backup_vault.test.identity[0].principal_id
principal_id = azurerm_data_protection_backup_vault.example.identity[0].principal_id
}
resource "azurerm_role_assignment" "test_vault_data_operator_on_snap_rg" {
scope = azurerm_resource_group.snap.id
role_definition_name = "Data Operator for Managed Disks"
principal_id = azurerm_data_protection_backup_vault.test.identity[0].principal_id
principal_id = azurerm_data_protection_backup_vault.example.identity[0].principal_id
}
resource "azurerm_role_assignment" "test_vault_data_contributor_on_storage" {
scope = azurerm_storage_account.test.id
scope = azurerm_storage_account.example.id
role_definition_name = "Storage Blob Data Contributor"
principal_id = azurerm_data_protection_backup_vault.test.identity[0].principal_id
principal_id = azurerm_data_protection_backup_vault.example.identity[0].principal_id
}
resource "azurerm_role_assignment" "cluster_msi_contributor_on_snap_rg" {
resource "azurerm_role_assignment" "test_cluster_msi_contributor_on_snap_rg" {
scope = azurerm_resource_group.snap.id
role_definition_name = "Contributor"
principal_id = azurerm_kubernetes_cluster.example.identity[0].principal_id
Expand Down

0 comments on commit a54f86a

Please sign in to comment.