Skip to content

Commit 488aa77

Browse files
committed
trying to reduce permissions for deployment storage
1 parent b79957c commit 488aa77

File tree

2 files changed

+8
-21
lines changed

2 files changed

+8
-21
lines changed

infra/main.search_configuration.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,11 @@ resource "time_sleep" "wait_for_rbac" {
235235
azurerm_role_assignment.terraform_deployment_container_storage_access,
236236
azurerm_role_assignment.terraform_deployment_container_file_access,
237237
# Script identity storage permissions
238-
azurerm_role_assignment.script_deployment_container_storage_contributor,
239-
azurerm_role_assignment.script_deployment_container_blob_owner,
238+
# azurerm_role_assignment.script_deployment_container_storage_contributor,
239+
azurerm_role_assignment.script_deployment_container_blob_contributor,
240240
azurerm_role_assignment.script_deployment_container_file_owner,
241241
# Main storage permissions (write access needed for upload_data.py to upload data files)
242-
azurerm_role_assignment.script_main_storage_queue_contributor,
242+
# azurerm_role_assignment.script_main_storage_queue_contributor,
243243
azurerm_role_assignment.script_main_storage_blob_owner,
244244
azurerm_role_assignment.script_main_storage_file_contributor,
245245
# AI Search permissions
@@ -455,11 +455,11 @@ resource "null_resource" "verify_rbac_propagation" {
455455
depends_on = [
456456
time_sleep.wait_for_rbac,
457457
# Storage permissions
458-
azurerm_role_assignment.script_main_storage_queue_contributor,
458+
# azurerm_role_assignment.script_main_storage_queue_contributor,
459459
azurerm_role_assignment.script_main_storage_blob_owner,
460460
azurerm_role_assignment.script_main_storage_file_contributor,
461-
azurerm_role_assignment.script_deployment_container_storage_contributor,
462-
azurerm_role_assignment.script_deployment_container_blob_owner,
461+
# azurerm_role_assignment.script_deployment_container_storage_contributor,
462+
azurerm_role_assignment.script_deployment_container_blob_contributor,
463463
azurerm_role_assignment.script_deployment_container_file_owner,
464464
# AI Search permissions
465465
azurerm_role_assignment.script_search_service_contributor,

infra/main.security.tf

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ resource "azurerm_role_assignment" "script_search_service_contributor" {
4949
}
5050

5151
# --- Main Storage Account Permissions ---
52-
53-
resource "azurerm_role_assignment" "script_main_storage_queue_contributor" {
54-
principal_id = azurerm_user_assigned_identity.script_identity.principal_id
55-
scope = module.storage_account_and_container.resource_id
56-
role_definition_name = "Storage Queue Data Contributor"
57-
}
58-
5952
resource "azurerm_role_assignment" "script_main_storage_blob_owner" {
6053
principal_id = azurerm_user_assigned_identity.script_identity.principal_id
6154
scope = module.storage_account_and_container.resource_id
@@ -81,16 +74,10 @@ resource "azurerm_role_assignment" "script_main_storage_account_contributor" {
8174
}
8275

8376
# --- Deployment Container Storage Account ---
84-
resource "azurerm_role_assignment" "script_deployment_container_storage_contributor" {
77+
resource "azurerm_role_assignment" "script_deployment_container_blob_contributor" {
8578
principal_id = azurerm_user_assigned_identity.script_identity.principal_id
8679
scope = azurerm_storage_account.deployment_container.id
87-
role_definition_name = "Storage Account Contributor"
88-
}
89-
90-
resource "azurerm_role_assignment" "script_deployment_container_blob_owner" {
91-
principal_id = azurerm_user_assigned_identity.script_identity.principal_id
92-
scope = azurerm_storage_account.deployment_container.id
93-
role_definition_name = "Storage Blob Data Owner"
80+
role_definition_name = "Storage Blob Data Contributor"
9481
}
9582

9683
resource "azurerm_role_assignment" "script_deployment_container_file_owner" {

0 commit comments

Comments
 (0)