-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added OpenAI module to multitenant spoke deployment (#190)
* Added AI module to multitenant spoke * OpenAI module added to multitenant scenario with private networking config. * fixing bug with repeat go_version definition on appsvc_options * fix: variable hub_settings We have that in the documentation we need it for tfvars, to connect to existing hub * fixed something that didn't work for me --------- Co-authored-by: Thodoris Theodorou <[email protected]>
- Loading branch information
Showing
37 changed files
with
1,335 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 33 additions & 18 deletions
51
scenarios/secure-baseline-multitenant/terraform/spoke/_locals.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
scenarios/secure-baseline-multitenant/terraform/spoke/ai.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
module "openai" { | ||
count = var.deployment_options.deploy_openai ? 1 : 0 | ||
|
||
source = "../../../shared/terraform-modules/cognitive-services/openai" | ||
|
||
global_settings = local.global_settings | ||
resource_group_name = azurerm_resource_group.spoke.name | ||
location = azurerm_resource_group.spoke.location | ||
|
||
deployment = { | ||
"text-embedding-ada-002" = { | ||
name = "text-embedding-ada-002" | ||
model_format = "OpenAI" | ||
model_name = "text-embedding-ada-002" | ||
model_version = "2" | ||
scale_type = "Standard" | ||
} | ||
"gpt-35-turbo" = { | ||
name = "gpt-35-turbo" | ||
model_format = "OpenAI" | ||
model_name = "gpt-35-turbo" | ||
model_version = "0613" | ||
scale_type = "Standard" | ||
} | ||
} | ||
|
||
pe_private_link_subnet_id = module.network.subnets["privateLink"].id | ||
private_dns_zone = local.provisioned_dns_zones["privatelink.openai.azure.com"] | ||
|
||
network_acls = [ | ||
{ | ||
default_action = "Deny" | ||
virtual_network_rules = [ | ||
{ | ||
subnet_id = module.network.subnets["serverFarm"].id | ||
ignore_missing_vnet_service_endpoint = true | ||
}, | ||
{ | ||
subnet_id = module.network.subnets["ingress"].id | ||
ignore_missing_vnet_service_endpoint = true | ||
}, | ||
{ | ||
subnet_id = module.network.subnets["devops"].id | ||
ignore_missing_vnet_service_endpoint = true | ||
}, | ||
{ | ||
subnet_id = module.network.subnets["privateLink"].id | ||
ignore_missing_vnet_service_endpoint = true | ||
} | ||
] | ||
} | ||
] | ||
|
||
tags = local.base_tags | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.