File tree Expand file tree Collapse file tree 1 file changed +7
-25
lines changed
Expand file tree Collapse file tree 1 file changed +7
-25
lines changed Original file line number Diff line number Diff line change @@ -70,29 +70,11 @@ resource "azurerm_role_assignment" "aks_cluster_admin" {
7070 principal_id = data. azurerm_client_config . current . object_id
7171}
7272
73- // https://github.com/Azure/terraform-azurerm-avm-res-authorization-roleassignment
74- module "acr-role" {
75- count = local. deploy_azure_container_registry ? 1 : 0
76- source = " Azure/avm-res-authorization-roleassignment/azurerm"
77- version = " 0.3.0"
78- user_assigned_managed_identities_by_principal_id = {
79- kubelet_identity = module.aks.kubelet_identity_id
80- }
81- role_definitions = {
82- acr_pull_role = {
83- name = " AcrPull"
84- }
85- }
86- role_assignments_for_scopes = {
87- acr_role_assignments = {
88- scope = module.acr[0 ].resource_id
89- role_assignments = {
90- role_assignment_1 = {
91- role_definition = " acr_pull_role"
92- user_assigned_managed_identities = [" kubelet_identity" ]
93- }
94- }
95- }
96- }
97- depends_on = [module . aks ]
73+ // Assign AcrPull role to kubelet identity on ACR
74+ resource "azurerm_role_assignment" "acr_pull" {
75+ count = local. deploy_azure_container_registry ? 1 : 0
76+ scope = module. acr [0 ]. resource_id
77+ role_definition_name = " AcrPull"
78+ principal_id = module. aks . kubelet_identity_id
79+ depends_on = [module . aks ]
9880}
You can’t perform that action at this time.
0 commit comments