Skip to content

Commit a3156b8

Browse files
authored
Merge pull request #1967 from bbmilan/msi-cognitive-user-role-assignment
MSI role assignment for accessing the Azure Open AI service
2 parents 61f82e1 + 0e4bfcc commit a3156b8

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
global_settings = {
2+
default_region = "region1"
3+
regions = {
4+
region1 = "uksouth"
5+
}
6+
}
7+
8+
resource_groups = {
9+
rg1 = {
10+
name = "example-msi-openai-rg1"
11+
}
12+
}
13+
14+
cognitive_services_account = {
15+
primer = {
16+
resource_group = {
17+
key = "rg1"
18+
}
19+
name = "pinecone-llm-demoopenai"
20+
kind = "OpenAI"
21+
sku_name = "S0"
22+
custom_subdomain_name = "cs-alz-caf-llm-demoopenai"
23+
}
24+
}
25+
26+
managed_identities = {
27+
workload-msi = {
28+
name = "example-msi-openai-rolemap-msi"
29+
resource_group_key = "rg1"
30+
}
31+
}
32+
33+
role_mapping = {
34+
built_in_role_mapping = {
35+
cognitive_services_account = {
36+
primer = {
37+
"Cognitive Services User" = {
38+
managed_identities = {
39+
keys = ["workload-msi"]
40+
}
41+
}
42+
}
43+
}
44+
}
45+
}

roles.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ locals {
124124
azurerm_firewalls = local.combined_objects_azurerm_firewalls
125125
backup_vaults = local.combined_objects_backup_vaults
126126
batch_accounts = local.combined_objects_batch_accounts
127+
cognitive_services_account = local.combined_objects_cognitive_services_accounts
127128
data_factory = local.combined_objects_data_factory
128129
databricks_workspaces = local.combined_objects_databricks_workspaces
129130
dns_zones = local.combined_objects_dns_zones

0 commit comments

Comments
 (0)