Skip to content

Commit

Permalink
Merge pull request #1967 from bbmilan/msi-cognitive-user-role-assignment
Browse files Browse the repository at this point in the history
MSI role assignment for accessing the Azure Open AI service
  • Loading branch information
arnaudlh authored Apr 23, 2024
2 parents 61f82e1 + 0e4bfcc commit a3156b8
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
global_settings = {
default_region = "region1"
regions = {
region1 = "uksouth"
}
}

resource_groups = {
rg1 = {
name = "example-msi-openai-rg1"
}
}

cognitive_services_account = {
primer = {
resource_group = {
key = "rg1"
}
name = "pinecone-llm-demoopenai"
kind = "OpenAI"
sku_name = "S0"
custom_subdomain_name = "cs-alz-caf-llm-demoopenai"
}
}

managed_identities = {
workload-msi = {
name = "example-msi-openai-rolemap-msi"
resource_group_key = "rg1"
}
}

role_mapping = {
built_in_role_mapping = {
cognitive_services_account = {
primer = {
"Cognitive Services User" = {
managed_identities = {
keys = ["workload-msi"]
}
}
}
}
}
}
1 change: 1 addition & 0 deletions roles.tf
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ locals {
azurerm_firewalls = local.combined_objects_azurerm_firewalls
backup_vaults = local.combined_objects_backup_vaults
batch_accounts = local.combined_objects_batch_accounts
cognitive_services_account = local.combined_objects_cognitive_services_accounts
data_factory = local.combined_objects_data_factory
databricks_workspaces = local.combined_objects_databricks_workspaces
dns_zones = local.combined_objects_dns_zones
Expand Down

0 comments on commit a3156b8

Please sign in to comment.