File tree Expand file tree Collapse file tree 8 files changed +52
-50
lines changed
app-service-with-vnet-integration Expand file tree Collapse file tree 8 files changed +52
-50
lines changed Original file line number Diff line number Diff line change @@ -412,6 +412,7 @@ An effective naming convention assembles resource names by using important resou
412412` application_insights_app_id ` | The App ID associated with this Application Insights component
413413` application_insights_instrumentation_key ` | The Instrumentation Key for this Application Insights component
414414` application_insights_connection_string ` | The Connection String for this Application Insights component
415+ ` app_service_virtual_network_swift_connection_id ` |The ID of the App Service Virtual Network integration
415416
416417## Resource Graph
417418
Original file line number Diff line number Diff line change @@ -93,14 +93,24 @@ module "app-service" {
9393}
9494```
9595
96- ## Module Usage to create app service and optional resoruces with VNet integration
96+ ## Module Usage to create app service and optional resoruces with VNet integration
9797
9898``` hcl
9999# Azurerm Provider configuration
100100provider "azurerm" {
101101 features {}
102102}
103103
104+ locals {
105+ tags = {
106+ ProjectName = "demo-internal"
107+ Env = "dev"
108+ Owner = "user@example.com"
109+ BusinessUnit = "CORP"
110+ ServiceClass = "Gold"
111+ }
112+ }
113+
104114module "vnet" {
105115 source = "kumarvna/vnet/azurerm"
106116 version = "2.1.0"
@@ -125,20 +135,12 @@ module "vnet" {
125135 }
126136 }
127137 }
128-
129- # Adding TAG's to your Azure resources (Required)
130- tags = {
131- ProjectName = "demo-internal"
132- Env = "dev"
133- Owner = "user@example.com"
134- BusinessUnit = "CORP"
135- ServiceClass = "Gold"
136- }
138+ tags = local.tags
137139}
138140
139141module "app-service" {
140142 source = "kumarvna/app-service/azurerm"
141- version = "1.0 .0"
143+ version = "1.1 .0"
142144
143145 # By default, this module will not create a resource group. Location will be same as existing RG.
144146 # proivde a name to use an existing resource group, specify the existing resource group name,
@@ -214,13 +216,7 @@ module "app-service" {
214216 app_insights_name = "otkpocshared"
215217
216218 # Adding TAG's to your Azure resources
217- tags = {
218- ProjectName = "demo-internal"
219- Env = "dev"
220- Owner = "user@example.com"
221- BusinessUnit = "CORP"
222- ServiceClass = "Gold"
223- }
219+ tags = local.tags
224220}
225221```
226222
Original file line number Diff line number Diff line change @@ -10,6 +10,16 @@ provider "azurerm" {
1010 features {}
1111}
1212
13+ locals {
14+ tags = {
15+ ProjectName = "demo-internal"
16+ Env = "dev"
17+ Owner = "user@example.com"
18+ BusinessUnit = "CORP"
19+ ServiceClass = "Gold"
20+ }
21+ }
22+
1323module "vnet" {
1424 source = "kumarvna/vnet/azurerm"
1525 version = "2.1.0"
@@ -34,15 +44,7 @@ module "vnet" {
3444 }
3545 }
3646 }
37-
38- # Adding TAG's to your Azure resources (Required)
39- tags = {
40- ProjectName = "demo-internal"
41- Env = "dev"
42- Owner = "user@example.com"
43- BusinessUnit = "CORP"
44- ServiceClass = "Gold"
45- }
47+ tags = local.tags
4648}
4749
4850module "app-service" {
@@ -123,13 +125,7 @@ module "app-service" {
123125 app_insights_name = "otkpocshared"
124126
125127 # Adding TAG's to your Azure resources
126- tags = {
127- ProjectName = "demo-internal"
128- Env = "dev"
129- Owner = "user@example.com"
130- BusinessUnit = "CORP"
131- ServiceClass = "Gold"
132- }
128+ tags = local.tags
133129}
134130```
135131
Original file line number Diff line number Diff line change @@ -3,6 +3,16 @@ provider "azurerm" {
33 features {}
44}
55
6+ locals {
7+ tags = {
8+ ProjectName = " demo-internal"
9+ Env = " dev"
10+ Owner = " user@example.com"
11+ BusinessUnit = " CORP"
12+ ServiceClass = " Gold"
13+ }
14+ }
15+
616module "vnet" {
717 source = " kumarvna/vnet/azurerm"
818 version = " 2.1.0"
@@ -27,15 +37,7 @@ module "vnet" {
2737 }
2838 }
2939 }
30-
31- # Adding TAG's to your Azure resources (Required)
32- tags = {
33- ProjectName = " demo-internal"
34- Env = " dev"
35- Owner = " user@example.com"
36- BusinessUnit = " CORP"
37- ServiceClass = " Gold"
38- }
40+ tags = local. tags
3941}
4042
4143module "app-service" {
@@ -116,11 +118,5 @@ module "app-service" {
116118 app_insights_name = " otkpocshared"
117119
118120 # Adding TAG's to your Azure resources
119- tags = {
120- ProjectName = " demo-internal"
121- Env = " dev"
122- Owner = " user@example.com"
123- BusinessUnit = " CORP"
124- ServiceClass = " Gold"
125- }
121+ tags = local. tags
126122}
Original file line number Diff line number Diff line change @@ -70,3 +70,7 @@ output "sas_url_query_string" {
7070 sensitive = true
7171}
7272
73+ output "app_service_virtual_network_swift_connection_id" {
74+ description = " The ID of the App Service Virtual Network integration"
75+ value = module. app-service . app_service_virtual_network_swift_connection_id
76+ }
Original file line number Diff line number Diff line change @@ -70,3 +70,7 @@ output "sas_url_query_string" {
7070 sensitive = true
7171}
7272
73+ output "app_service_virtual_network_swift_connection_id" {
74+ description = " The ID of the App Service Virtual Network integration"
75+ value = module. app-service . app_service_virtual_network_swift_connection_id
76+ }
Original file line number Diff line number Diff line change @@ -70,3 +70,8 @@ output "sas_url_query_string" {
7070 value = var. enable_backup ? format (" https://${ data . azurerm_storage_account . storeacc . 0 . name } .blob.core.windows.net/${ azurerm_storage_container . storcont . 0 . name } %s" , data. azurerm_storage_account_blob_container_sas . main . 0 . sas ) : null
7171 sensitive = true
7272}
73+
74+ output "app_service_virtual_network_swift_connection_id" {
75+ description = " The ID of the App Service Virtual Network integration"
76+ value = var. enable_vnet_integration ? azurerm_app_service_virtual_network_swift_connection. main . * . id : null
77+ }
You can’t perform that action at this time.
0 commit comments