Skip to content

Commit 0d45536

Browse files
wip
1 parent ca9ccee commit 0d45536

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

infrastructure/terraform/data.tf

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Only do these looks ups if we have already deployed the infra code in a previous run, else don't use it
2+
data "azurerm_container_app_environment" "this" {
3+
count = var.deploy_infra ? 0 : 1
4+
5+
name = module.shared_config.names.container-app-environment
6+
resource_group_name = local.resource_group_name
7+
}
8+
9+
data "azurerm_key_vault" "app_key_vault" {
10+
count = var.deploy_infra ? 0 : 1
11+
12+
name = "kv-${var.app_short_name}-${var.env_config}-app"
13+
resource_group_name = local.resource_group_name
14+
}
15+
16+
data "azurerm_log_analytics_workspace" "audit" {
17+
count = var.deploy_infra ? 0 : 1
18+
19+
name = module.shared_config.names.log-analytics-workspace
20+
resource_group_name = local.resource_group_name
21+
}
22+
23+
data "azurerm_subnet" "postgres" {
24+
count = var.deploy_infra ? 0 : 1
25+
26+
name = "snet-postgres"
27+
virtual_network_name = module.shared_config.names.virtual-network-lowercase
28+
resource_group_name = local.resource_group_name
29+
}
30+
31+
data "azurerm_subnet" "main" {
32+
count = var.deploy_infra ? 0 : 1
33+
34+
name = "snet-main"
35+
virtual_network_name = module.shared_config.names.virtual-network-lowercase
36+
resource_group_name = local.resource_group_name
37+
}

0 commit comments

Comments
 (0)