Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to azurerm 4.7.0 #2078

Open
wants to merge 60 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d10aadf
feat(terraform): upgrade azurerm provider version
rfernandezdo Oct 29, 2024
15c1376
Refactor container registry module: remove unused virtual network dyn…
rfernandezdo Oct 29, 2024
ed565f4
Refactor locals.tf: add support for random suffix and cognitive servi…
rfernandezdo Oct 29, 2024
1a6089c
refactor(subnet): :recycle: upgrade private_endpoint_network_policies…
rfernandezdo Oct 29, 2024
d52caa8
refactor(storage): replace storage_account_name with storage_share_id
rfernandezdo Oct 29, 2024
1829b23
refactor(storage_account): rename https traffic control variable and …
rfernandezdo Oct 29, 2024
4a92740
feat(cognitive_services): enhance Cognitive Services module
rfernandezdo Oct 29, 2024
a6ebe52
feat(databases): update MSSQL failover group resource configuration
rfernandezdo Oct 29, 2024
a1b5859
refactor(networking): invert BGP route propagation variable
rfernandezdo Oct 29, 2024
146a2d9
refactor(maps): add default location for maps account
rfernandezdo Oct 29, 2024
77add0a
refactor(storage_account): remove unused variable and update file_sha…
rfernandezdo Oct 29, 2024
3562979
refactor(logic_app): remove integration service environment module
rfernandezdo Oct 29, 2024
43ce722
refactor(logic_app): remove integration service environment module an…
rfernandezdo Oct 29, 2024
8ae453d
refactor(networking): update waf_policy.tf to support rule overrides
rfernandezdo Oct 29, 2024
476aad1
Title: refactor(cosmos_db): rename configuration variables for clarity
rfernandezdo Oct 29, 2024
53cf721
Refactor(conbined_objects): Remove integration service environment mo…
rfernandezdo Oct 29, 2024
5335f57
Refactor: Remove zone_redundant setting from event hub and service bu…
rfernandezdo Oct 29, 2024
481a41b
feat(analytics): remove location property from machine learning compu…
rfernandezdo Oct 29, 2024
b911bcd
Commit message:
rfernandezdo Oct 29, 2024
c282b6d
refactor(logic_app): remove integration_service_environment_id attribute
rfernandezdo Oct 29, 2024
d6b619c
Title: `refactor(database): remove MariaDB examples and related code`
rfernandezdo Oct 29, 2024
1587287
feat(backup_vault_policy): replace retention_duration with operationa…
rfernandezdo Oct 29, 2024
fb82203
refactor(sentinel): remove dynamic condition block and replace with c…
rfernandezdo Oct 29, 2024
dd5a368
refactor(sentinel): rename and restructure incident configuration
rfernandezdo Oct 29, 2024
bac61e3
refactor(mysql): remove MySQL server module and examples to upgrade h…
rfernandezdo Oct 30, 2024
22d5f7e
feat(synapse): refactor AAD admin settings and add storage account ty…
rfernandezdo Oct 30, 2024
01169ad
refactor(apim): remove policy block and soap_pass_through attribute t…
rfernandezdo Oct 30, 2024
2e85987
refactor(consumption_budget): remove dynamic condition block and rep…
rfernandezdo Oct 30, 2024
3d026e0
refactor(aks): update default node pool settings to upgrade hashicorp…
rfernandezdo Oct 30, 2024
cce837a
refactor(compute): remove dynamic GPU block in container_group.tf to …
rfernandezdo Oct 30, 2024
a9b63ae
refactor(compute): update network_interface.tf to use new IP forwardi…
rfernandezdo Oct 30, 2024
548bd40
refactor(compute): update scale_in policy in vmss_linux.tf and vmss_w…
rfernandezdo Oct 30, 2024
9b8ed88
refactor(cosmos_dbs): update partition_key_paths in sql_database.tf t…
rfernandezdo Oct 30, 2024
be25227
refactor(data_explorer): update language_extensions in kusto_clusters…
rfernandezdo Oct 30, 2024
5a02329
refactor(mssql_server): remove unused readonly_endpoint_failover_poli…
rfernandezdo Oct 30, 2024
b449e17
refactor(servicebus): remove network rule set configuration to upgrad…
rfernandezdo Oct 30, 2024
28d3fe6
refactor(servicebus): remove network rule set configuration to upgrad…
rfernandezdo Oct 30, 2024
82fdfac
refactor(servicebus): update queue settings to match new configuratio…
rfernandezdo Oct 30, 2024
417f54a
refactor(servicebus): update batched operations configuration in subs…
rfernandezdo Oct 30, 2024
0a82f65
refactor(monitoring): update location configuration in activity log a…
rfernandezdo Oct 30, 2024
4a2f91d
refactor(networking): remove resource_group_name from vpn_gateway_nat…
rfernandezdo Oct 30, 2024
8bae0e2
refactor(webapps): update azurerm_app_service_environment to v3 in as…
rfernandezdo Oct 30, 2024
f4b2a63
refactor(database): consolidate mysql server configurations
rfernandezdo Oct 30, 2024
885784b
feat(cognitive_services): update cognitive services configuration and…
rfernandezdo Oct 30, 2024
d7da8fa
refactor(examples): update private endpoint network policies in confi…
rfernandezdo Oct 30, 2024
b1acc65
refactor(cognitive_services): update GPT-4 model version in cognitive…
rfernandezdo Oct 30, 2024
e65f367
docs(examples): add ARM_SUBSCRIPTION_ID export instruction in README.md
rfernandezdo Oct 30, 2024
6736960
refactor(cosmos_db): update partition_key_path and ip_range_filter ty…
rfernandezdo Oct 30, 2024
98e5656
refactor(cosmos_db): update ip_range_filter and partition_key_path ty…
rfernandezdo Oct 30, 2024
7d46c0f
refactor(cosmos_db): change partition_key_path to partition_key_paths…
rfernandezdo Oct 30, 2024
95d0221
refactor(examples): update 'enforce_private_link_endpoint_network_pol…
rfernandezdo Oct 30, 2024
df0e2c0
refactor(dns_zone): improve regex comment and handle empty soa_record…
rfernandezdo Oct 30, 2024
289bd96
refactor(aks): handle empty kubelet_identity case in output for rbac_id
rfernandezdo Oct 30, 2024
d537d46
refactor(virtual_machine): update file paths for linux diagnostic ext…
rfernandezdo Oct 30, 2024
2fbb903
refactor(aks): modify role-based access control settings to use `azur…
rfernandezdo Oct 30, 2024
fa6f3bb
refactor(examples): update script source paths to use absolute paths …
rfernandezdo Oct 30, 2024
f60517d
refactor(aks): add revisions to service mesh profile and update admin…
rfernandezdo Oct 30, 2024
b7bccae
fix(configuration): correct syntax error in operational_default_reten…
rfernandezdo Oct 30, 2024
8b1a724
refactor(locals): enhance mysql_flexible_servers merge logic to inclu…
rfernandezdo Oct 30, 2024
f098e9c
fix(monitoring): resolve scope list issue in mysql-cpu-utilization me…
rfernandezdo Oct 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/workflows/standalone-dataplat.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@
"datalake/101-datalake-storage",
"machine_learning/100-aml",
"machine_learning/101-aml-vnet",
"machine_learning/102-aml-compute_instance",
"mariadb_server/100-simple-mariadb",
"mariadb_server/101-vnet-rule-mariadb",
"mariadb_server/102-private-endpoint-mariadb",
"mariadb_server/103-private-endpoint-with-fw-rule-mariadb",
"machine_learning/102-aml-compute_instance",
"mssql_mi/200-mi",
"mssql_server/101-sqlserver-simple",
"mssql_server/102-sqlserver-extend",
Expand All @@ -56,11 +52,7 @@
"mssql_server/109-sqlserver-network-firewall-rule",
"mysql_flexible_server/100-simple-mysql-flexible",
"mysql_flexible_server/101-delegated-subnet-with-fw-rule",
"mysql_flexible_server/102-advanced-mysql-flexible",
"mysql_server/100-simple-mysql",
"mysql_server/101-vnet-rule-mysql",
"mysql_server/102-private-endpoint-mysql",
"mysql_server/103-private-endpoint-with-fw-rule-mysql",
"mysql_flexible_server/102-advanced-mysql-flexible",
"postgresql_flexible_server/100-simple-postgresql-flexible",
"postgresql_flexible_server/101-delegated-subnet-with-fw-rule",
"postgresql_flexible_server/102-advanced-postgresql-flexible",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/standalone-scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"automation/102-automation-msi",
"automation/103-automation-private-endpoints",
"automation/104-automation-schedule-runbook",
"cognitive_services/100-cognitive-services-account-OpenAI",
"communication/communication_services/101-communication_service",
"diagnostics_profiles/100-multiple-destinations",
"diagnostics_profiles/100-multiple-destinations",
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
"MD025": {
"front_matter_title": ""
}
}
},
"conventionalCommits.scopes": [
"subnet"
]
}
54 changes: 42 additions & 12 deletions cognitive_service.tf
Original file line number Diff line number Diff line change
@@ -1,24 +1,54 @@
module "cognitive_services_account" {
source = "./modules/cognitive_services/cognitive_services_account"
for_each = local.cognitive_services.cognitive_services_account

source = "./modules/cognitive_services/cognitive_services_account"
for_each = local.cognitive_services.cognitive_services_account
client_config = local.client_config
global_settings = local.global_settings
settings = each.value
location = try(each.value.location, null)
base_tags = local.global_settings.inherit_tags
resource_group = local.combined_objects_resource_groups[try(each.value.resource_group.lz_key, local.client_config.landingzone_key)][try(each.value.resource_group_key, each.value.resource_group.key)]
resource_group = local.combined_objects_resource_groups[try(each.value.resource_group.lz_key, local.client_config.landingzone_key)][try(each.value.resource_group.key, each.value.resource_group_key)]
resource_group_name = local.combined_objects_resource_groups[try(each.value.resource_group.lz_key, local.client_config.landingzone_key)][try(each.value.resource_group.key, each.value.resource_group_key)].name
location = lookup(each.value, "region", null) == null ? local.combined_objects_resource_groups[try(each.value.resource_group.lz_key, local.client_config.landingzone_key)][try(each.value.resource_group.key, each.value.resource_group_key)].location : local.global_settings.regions[each.value.region]
settings = each.value
resource_groups = local.combined_objects_resource_groups
vnets = local.combined_objects_networking
private_endpoints = try(each.value.private_endpoints, {})
private_dns = local.combined_objects_private_dns
diagnostics = local.combined_diagnostics
diagnostic_profiles = try(each.value.diagnostic_profiles, {})

managed_identities = local.combined_objects_managed_identities
remote_objects = {
# Depurar en algún moment para pasar la logica de la subnet_id a remote_objects, error: The given key does not identify an element in this collection value.
#subnet_id = can(each.value.network_acls.virtual_network_rules.subnet_key) ? local.combined_objects_networking[try(each.value.network_acls.virtual_network_rules.lz_key, local.client_config.landingzone_key)][each.value.network_acls.virtual_network_rules.vnet_key].subnets[each.value.network_acls.virtual_network_rules.subnet_key].id : null
#subnet_id = can(each.value.vnet.subnet_key) ? local.combined_objects_networking[try(each.value.vnet.lz_key, local.client_config.landingzone_key)][each.value.vnet.key].subnets[each.value.vnet.subnet_key].id : null
vnets = local.combined_objects_networking
virtual_subnets = local.combined_objects_virtual_subnets
private_dns_zone_id = can(each.value.private_dns_zone.key) ? local.combined_objects_private_dns[try(each.value.private_dns_zone.lz_key, local.client_config.landingzone_key)][each.value.private_dns_zone.key].id : null
diagnostics = local.combined_diagnostics
resource_groups = local.combined_objects_resource_groups
private_dns = local.combined_objects_private_dns
}
}


output "cognitive_services_account" {
value = module.cognitive_services_account
}

module "cognitive_account_customer_managed_key" {
source = "./modules/cognitive_services/cognitive_account_customer_managed_key"
for_each = local.cognitive_services.cognitive_account_customer_managed_key
cognitive_account_id = can(each.value.cognitive_account_id) || can(each.value.cognitive_account.id) ? try(each.value.cognitive_account_id, each.value.cognitive_account.id) : local.combined_objects_cognitive_services_accounts[try(each.value.cognitive_account.lz_key, local.client_config.landingzone_key)][try(each.value.cognitive_account_key, each.value.cognitive_account_key.key)].id
key_vault_key_id = can(each.value.key_vault_key_id) || can(each.value.key_vault_key.id) ? try(each.value.key_vault_key_id, each.value.key_vault_key.id) : local.combined_objects_keyvault_keys[try(each.value.keyvault_key.lz_key, local.client_config.landingzone_key)][try(each.value.key_vault_key_key, each.value.key_vault_key.key)].id
identity_client_id = try(can(each.value.identity_client_id) || can(each.value.identity_client.id) ? try(each.value.identity_client_id, each.value.identity_client.id) : local.combined_objects_managed_identities[try(each.value.identity_client.lz_key, local.client_config.landingzone_key)][try(each.value.identity_client_key, each.value.identity_client.key)].id, null)


}

output "cognitive_account_customer_managed_key" {
value = module.cognitive_account_customer_managed_key
}

module "cognitive_deployment" {
source = "./modules/cognitive_services/cognitive_deployment"
for_each = local.cognitive_services.cognitive_deployment
settings = each.value
cognitive_account_id = can(each.value.cognitive_account_id) || can(each.value.cognitive_account.id) ? try(each.value.cognitive_account_id, each.value.cognitive_account.id) : local.combined_objects_cognitive_services_accounts[try(each.value.cognitive_account.lz_key, local.client_config.landingzone_key)][try(each.value.cognitive_account_key, each.value.cognitive_account_key.key)].id
}

output "cognitive_deployment" {
value = module.cognitive_deployment
}
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ The current folder contains an example of module with the whole features set of
```bash
cd /tf/caf/examples
az login
export ARM_SUBSCRIPTION_ID=00000000-0000-0000-0000-000000000000
terraform init
terraform plan -var-file <path to your variable file>
terraform apply -var-file <path to your variable file>
Expand Down
2 changes: 1 addition & 1 deletion examples/app_config/101-private-link/configuration.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ vnets = {
private_link = {
name = "private-links"
cidr = ["10.1.100.128/26"]
enforce_private_link_endpoint_network_policies = true
private_endpoint_network_policies = "Enabled"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ vnets = {
auto_subnet = {
name = "auto-subnet"
cidr = ["10.150.102.0/25"]
enforce_private_link_endpoint_network_policies = true
private_endpoint_network_policies = "Enabled"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
global_settings = {
default_region = "region1"
regions = {
region1 = "westus"
}
random_length = 5
#pass_through = true
}

resource_groups = {
test-rg = {
name = "rg-alz-caf-test-1"
}
}

cognitive_services_account = {
test_account-2 = {
resource_group = {
# accepts either id or key to get resource group id
# id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1"
# lz_key = "examples"
key = "test-rg"
}
name = "cs-alz-caf-test-2"
kind = "CognitiveServices"
sku_name = "S0"
tags = {
env = "test"
}

}
}

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ global_settings = {
region1 = "westus"
}
random_length = 5
#pass_through = true
}

resource_groups = {
Expand All @@ -13,16 +14,17 @@ resource_groups = {
}

cognitive_services_account = {
test_account-1 = {
openai_account-1 = {
resource_group = {
# accepts either id or key to get resource group id
# id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1"
# lz_key = "examples"
key = "test-rg"
}
name = "cs-alz-caf-test-1"
kind = "ComputerVision"
sku_name = "F0"
kind = "OpenAI"
sku_name = "S0"

tags = {
env = "test"
}
Expand All @@ -31,22 +33,5 @@ cognitive_services_account = {
# default_action = "Allow"
# ip_rules = ["10.10.10.0/16"]
# }
}
test_account-2 = {
resource_group = {
# accepts either id or key to get resource group id
# id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1"
# lz_key = "examples"
key = "test-rg"
}
name = "cs-alz-caf-test-2"
kind = "QnAMaker"
sku_name = "F0"
tags = {
env = "test"
}
qna_runtime_endpoint = "https://cs-alz-caf-test-2.azurewebsites.net"

}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
global_settings = {
default_region = "region1"
regions = {
region1 = "westus"
}
random_length = 5
#pass_through = true
}

resource_groups = {
test-rg = {
name = "rg-alz-caf-test-1"
}
}

cognitive_services_account = {
openai_account-1 = {
resource_group = {
# accepts either id or key to get resource group id
# id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1"
# lz_key = "examples"
key = "test-rg"
}
name = "cs-alz-caf-test-1"
kind = "OpenAI"
sku_name = "S0"
tags = {
env = "test"
}
# custom_subdomain_name = "cs-alz-caf-test-1"
# network_acls = {
# default_action = "Allow"
# ip_rules = ["10.10.10.0/16"]
# }
}
}

cognitive_deployment = {
openai_deployment-1 = {
name = "gpt4"
cognitive_account_key = "openai_account-1"
#cognitive_account_id = "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CognitiveServices/accounts/accountValue"
#Check https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure%2Cglobal-standard%2Cstandard-chat-completions
#Check https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure%2Cglobal-standard%2Cstandard-chat-completions#global-standard-model-availability
model = {
format = "OpenAI"
name = "gpt-4"
version = "turbo-2024-04-09"

}
sku = {
name = "Standard"
capacity = 1
}
}
}
Loading
Loading