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

Dev/new environments #224

Open
wants to merge 191 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
1b5ea70
New environments
DanOwenUKHO Sep 18, 2024
af9b54f
Add missing param
DanOwenUKHO Sep 18, 2024
973d88d
Missing param
DanOwenUKHO Sep 18, 2024
cb25c5c
Fix reference
DanOwenUKHO Sep 18, 2024
f9fa14d
Uneeded path
DanOwenUKHO Sep 18, 2024
36b14c9
Fix group name
DanOwenUKHO Sep 18, 2024
0ee26a5
Fix path
DanOwenUKHO Sep 18, 2024
afa3617
Path
DanOwenUKHO Sep 18, 2024
2d6d87e
Update condition
DanOwenUKHO Sep 18, 2024
966a70e
Remove hardcode
DanOwenUKHO Sep 20, 2024
eae68d0
Remove unused data
DanOwenUKHO Sep 20, 2024
f260ae9
Update file paths in continuous-deployment.yml for consistency
DanOwenUKHO Sep 20, 2024
c7ed1cd
Add generic terraform artifact
DanOwenUKHO Sep 20, 2024
42e132e
Fix path
DanOwenUKHO Sep 20, 2024
814e8c9
fix paths
DanOwenUKHO Sep 20, 2024
c4c528b
Update to agent subnets
DanOwenUKHO Sep 20, 2024
8cc119d
Update variable for new subnet agents
DanOwenUKHO Sep 23, 2024
170facc
Test where variables are needed
DanOwenUKHO Sep 23, 2024
363868e
Start reintroducing variables
DanOwenUKHO Sep 23, 2024
6fd279a
Remove duplicate parameter
DanOwenUKHO Sep 23, 2024
4aa96fa
More variable readded
DanOwenUKHO Sep 23, 2024
de0e619
Remove unused agent_subnet_name variable from configuration
DanOwenUKHO Sep 23, 2024
871c71b
Change variable level
DanOwenUKHO Sep 23, 2024
e6f216b
Tests
DanOwenUKHO Sep 23, 2024
20db091
Try setup variables
DanOwenUKHO Sep 23, 2024
57cb30f
try setup variables
DanOwenUKHO Sep 23, 2024
7ee54e2
Add variable template for environment parameters in deployment config…
DanOwenUKHO Sep 23, 2024
72a2840
Add environment variable configuration for preprod deployment
DanOwenUKHO Sep 23, 2024
69d3362
Fix variable reference for environment in Azure Pipelines configuration
DanOwenUKHO Sep 23, 2024
30dc504
Comment out environment parameter in deployment configuration
DanOwenUKHO Sep 23, 2024
b0beb62
Update deployment configuration to use variables for environment disp…
DanOwenUKHO Sep 23, 2024
8f0b319
Update variable template path for preprod environment in Azure Pipeli…
DanOwenUKHO Sep 23, 2024
021897c
Uncomment and update Environment parameter in deployment template for…
DanOwenUKHO Sep 23, 2024
4cf72cc
Update iat
DanOwenUKHO Sep 23, 2024
ba63db6
Uplift terraform
DanOwenUKHO Sep 24, 2024
390adf2
Update Terraform provider and Azure Pipelines container version
DanOwenUKHO Sep 24, 2024
1450582
Refarctor pipeline completely
DanOwenUKHO Sep 24, 2024
b8059cd
Fix param
DanOwenUKHO Sep 24, 2024
9990cef
Correct path
DanOwenUKHO Sep 24, 2024
0ae14fd
Update depends on
DanOwenUKHO Sep 24, 2024
72fb7d0
Remove redundant artifact publishing steps from Azure Pipelines
DanOwenUKHO Sep 24, 2024
320188e
Update RESPONSIBLE_TEAM name and modify COST_CENTRE logic in variable…
DanOwenUKHO Sep 24, 2024
6b0100d
Revert terraform update, add extra variables
DanOwenUKHO Sep 24, 2024
ba714d8
Downgrade azurerm provider version from 3.2.0 to 3.1.0
DanOwenUKHO Sep 24, 2024
bdb649c
Revert update
DanOwenUKHO Sep 24, 2024
96af5b6
Update azurerm provider and Terraform versions in configuration files
DanOwenUKHO Sep 24, 2024
becea71
Fix file path for Terraform JSON output in continuous deployment script
DanOwenUKHO Sep 25, 2024
7b11d9c
Refactor deployment template to use updated output dependencies and i…
DanOwenUKHO Sep 25, 2024
0f9c75c
Uncomment SetPOSQASubnet job in deployment template to enable subnet …
DanOwenUKHO Sep 25, 2024
aa39e1f
Update deployment templates and configuration paths for improved clar…
DanOwenUKHO Sep 25, 2024
f62ac39
Update FssDataDirectoryPath in appsettings.json to reflect new direct…
DanOwenUKHO Sep 25, 2024
13e4410
Add conditional count for mock web app module based on environment
DanOwenUKHO Sep 25, 2024
17d6269
Update Azure App Service Plan names for quality control environment
DanOwenUKHO Sep 25, 2024
faeda48
Add conditional count for Azure App Service Plan based on environment
DanOwenUKHO Sep 25, 2024
81e7509
Fix service plan ID reference for mock web app module in Terraform co…
DanOwenUKHO Sep 25, 2024
4fb7a3f
Add RunTests parameter to deployment templates for conditional testing
DanOwenUKHO Sep 25, 2024
94c440b
Add new data file to project and configure copy to output
DanOwenUKHO Sep 25, 2024
912e74d
Add PKS mock web app configuration and container swap script
DanOwenUKHO Sep 25, 2024
d295fc1
Add PKS name parameter to mock web app module in Terraform configuration
DanOwenUKHO Sep 26, 2024
380738f
Add output for PKS mock web app name in Terraform configuration
DanOwenUKHO Sep 26, 2024
3f08ea0
Add files to folder
DanOwenUKHO Sep 26, 2024
1c06581
Add missing files to folders
DanOwenUKHO Sep 26, 2024
dfb8c89
Add new files and update project configuration for FSS data
DanOwenUKHO Sep 26, 2024
9d198d9
Add avcs_catalogue.xml to project and set to copy to output directory
DanOwenUKHO Sep 27, 2024
927b69c
Add PKSMock API WebApp deployment step to continuous deployment pipeline
DanOwenUKHO Sep 27, 2024
6a6cfa0
Remove commented-out job for subnet configuration and add PKS mock we…
DanOwenUKHO Sep 27, 2024
4096895
Remove obsolete files and update project configuration for FSS data
DanOwenUKHO Sep 27, 2024
d0be3cf
Add pksMockWebAppName variable to pipeline output and update AzureWeb…
DanOwenUKHO Sep 27, 2024
270c111
Add mock_spoke_subnet variable and update storage module configuration
DanOwenUKHO Sep 27, 2024
1e68b53
Add new outputs for mock web app and clean up existing output definit…
DanOwenUKHO Sep 30, 2024
05c1eb5
Fix mock web app URL output to reference the correct module index
DanOwenUKHO Sep 30, 2024
07e80ed
Add script to set subnet configuration for mock web app and update de…
DanOwenUKHO Sep 30, 2024
597ddd5
Fix container reference in QA subnet configuration job
DanOwenUKHO Sep 30, 2024
8452f10
Update subnet configuration job display name and script path
DanOwenUKHO Sep 30, 2024
5bcb469
Update script path for subnet configuration in deployment template
DanOwenUKHO Sep 30, 2024
81d8b58
Add file copy target to project for POS directory
DanOwenUKHO Oct 1, 2024
750266b
Remove file copy target and associated folder from project
DanOwenUKHO Oct 2, 2024
c3d74d3
Refactor home directory path initialization to simplify configuration…
DanOwenUKHO Oct 2, 2024
4ccc1ac
Refactor home directory path initialization to use full path for POS …
DanOwenUKHO Oct 2, 2024
3945c0d
Remove CopyDataFiles job from deployment template and update home dir…
DanOwenUKHO Oct 2, 2024
854c80d
Update home directory path initialization to include 'FM' subdirector…
DanOwenUKHO Oct 2, 2024
f9419e1
Refactor home directory path initialization to use HOME configuration…
DanOwenUKHO Oct 2, 2024
5e10625
Refactor ExchangeSetService to use HOME configuration for directory p…
DanOwenUKHO Oct 3, 2024
adcb8d8
Remove change
DanOwenUKHO Oct 3, 2024
c89ad5e
Refactor
DanOwenUKHO Oct 3, 2024
70e3a5a
Test
DanOwenUKHO Oct 3, 2024
430eeb3
test
DanOwenUKHO Oct 3, 2024
d0cfc2b
Revert changes
DanOwenUKHO Oct 3, 2024
09f91e0
Update method to auto add get request
DanOwenUKHO Oct 3, 2024
5b27c4d
More Fixes
DanOwenUKHO Oct 3, 2024
f315acf
Fix for tests
DanOwenUKHO Oct 3, 2024
18d9165
Fix null reference
DanOwenUKHO Oct 3, 2024
4c0fc2d
Fix null reference handling and improve file copy logic in controllers
DanOwenUKHO Oct 3, 2024
184e4cd
Add method to copy all files from source to destination and update fi…
DanOwenUKHO Oct 4, 2024
f8c9a42
Revert change
DanOwenUKHO Oct 4, 2024
36fb55f
Update file name
DanOwenUKHO Oct 4, 2024
0ce3225
Update file name to latest weekd day and year for copying
DanOwenUKHO Oct 4, 2024
7cbc365
Refactor deployment configuration and comment out file handling in co…
DanOwenUKHO Oct 4, 2024
969a52d
Rename Setup job to Setup Webjob and update display name for clarity
DanOwenUKHO Oct 4, 2024
73cc09d
Rename Setup Webjob jobs for consistency and clarity
DanOwenUKHO Oct 4, 2024
c050294
Rename SetupWebjob job to Setup for consistency and clarity
DanOwenUKHO Oct 4, 2024
20d8b5b
Update dependencies for SetupWebjobFalseFTmode to include POS and BES…
DanOwenUKHO Oct 4, 2024
933bc7c
Update Setup job to conditionally skip tests and remove SetupWebjobFa…
DanOwenUKHO Oct 4, 2024
3e59d72
Update Setup job condition to run only when tests are not executing
DanOwenUKHO Oct 4, 2024
244c8b0
Refactor Setup job condition for clarity
DanOwenUKHO Oct 4, 2024
0fb234d
Refactor Application Insights configuration and update variable names…
DanOwenUKHO Oct 21, 2024
10149d1
Rationalise dependencies
DanOwenUKHO Oct 21, 2024
9cb171d
Update packages
DanOwenUKHO Oct 21, 2024
9d0adf7
Fix build warning, update package
DanOwenUKHO Oct 21, 2024
7911f00
nvd suppressions
DanOwenUKHO Oct 21, 2024
f4811d9
NVD suppressions
DanOwenUKHO Oct 21, 2024
763746c
Update deployment conditions to ensure tests run only on success
DanOwenUKHO Oct 21, 2024
aa1dc0f
Rollback package upgrade
DanOwenUKHO Oct 22, 2024
debb820
NVD suppressions
DanOwenUKHO Oct 22, 2024
6674373
Revert more package updates
DanOwenUKHO Oct 22, 2024
de0b453
Log errors
DanOwenUKHO Oct 22, 2024
8761617
Update terraform for deploying webapp
DanOwenUKHO Oct 22, 2024
895340d
Refactor Azure App Service resources to use unified resource type
DanOwenUKHO Oct 22, 2024
07cb040
Fix output references for default site hostname and site credentials …
DanOwenUKHO Oct 22, 2024
53cf6e2
Enhance deployment pipeline by enabling parallel execution for functi…
DanOwenUKHO Oct 22, 2024
2bb515f
Enable parallel execution for functional tests and adjust transaction…
DanOwenUKHO Oct 22, 2024
f15797f
Fix output reference for mock web app URL in outputs.tf
DanOwenUKHO Oct 22, 2024
060e41b
Refactor deployment pipeline by removing unnecessary workspace and cl…
DanOwenUKHO Oct 22, 2024
94c3be4
Refactor functional tests to enable parallel execution and update pac…
DanOwenUKHO Oct 22, 2024
7e981aa
Update FulfilmentDataService to handle nullable current transaction
DanOwenUKHO Oct 22, 2024
98a4657
Fix output reference for mock web app URL to support multiple instances
DanOwenUKHO Oct 22, 2024
683507d
Update mock web app URL output to handle empty service instances
DanOwenUKHO Oct 22, 2024
0392eef
Remove parallel testing
DanOwenUKHO Oct 22, 2024
68662e6
Remove SetPOSSubnet job from deployment template
DanOwenUKHO Oct 22, 2024
054ee00
Reintroduce SetPOSSubnet job in deployment template for test configur…
DanOwenUKHO Oct 22, 2024
b34d0ee
Reintroduce Set Subnet Configuration job in POS Functional Tests
DanOwenUKHO Oct 22, 2024
9e8bbc4
Fix indentation in Set Subnet Configuration job in deployment template
DanOwenUKHO Oct 22, 2024
166f4f2
Add mockWebAppName and mockWebAppResourceGroup to deployment template
DanOwenUKHO Oct 22, 2024
f33461e
Fix syntax error in mockWebAppResourceGroup value in deployment template
DanOwenUKHO Oct 23, 2024
c4b2031
Add SetPOSSubnet job to configure subnet settings in deployment template
DanOwenUKHO Oct 23, 2024
2201a4e
Refactor deployment stages and fix formatting in YAML templates
DanOwenUKHO Oct 25, 2024
f14c4e2
Refactor FulfilmentDataService to streamline task execution and remov…
DanOwenUKHO Oct 25, 2024
66fbfc0
Add workspace clean option to Swap App Configs job in deployment temp…
DanOwenUKHO Oct 29, 2024
b51c6d2
Add task to download Terraform artifact in deployment template
DanOwenUKHO Oct 30, 2024
2f3d0e2
Add Setup and SetPOSSubnet jobs to deployment template; clean up unus…
DanOwenUKHO Oct 30, 2024
3a112e5
Reorder jobs in Deploy.yml to ensure Setup is removed from POS tests …
DanOwenUKHO Oct 31, 2024
97ffd9a
Add AppSettingSetup job to Deploy.yml for app settings configuration;…
DanOwenUKHO Oct 31, 2024
d62eecd
Add task to download POS Functional test artifact in Deploy.yml
DanOwenUKHO Oct 31, 2024
0e914b5
Add AppSettingSetup job to POS and BESS Functional Automated Tests in…
DanOwenUKHO Oct 31, 2024
1b2dd5a
Add dependency for AppSettingSetup job on DeployApp in Deploy.yml
DanOwenUKHO Oct 31, 2024
10b9638
Remove redundant workspace clean step from POS and BESS Functional Au…
DanOwenUKHO Oct 31, 2024
66a9988
Refactor POS Functional Automated Tests in Deploy.yml to move API con…
DanOwenUKHO Nov 1, 2024
54ab8a5
Move AppSettingSetup job steps into POSFunctionalTests job in Deploy.yml
DanOwenUKHO Nov 1, 2024
b1cefd6
Add mockWebApp variables to POS Functional Automated Tests in Deploy.yml
DanOwenUKHO Nov 1, 2024
63bfe1d
Update POS Functional Automated Tests in Deploy.yml to include Webjob…
DanOwenUKHO Nov 1, 2024
3420b47
Fix syntax error in POSWebjobApiConfiguration.Password value assignme…
DanOwenUKHO Nov 1, 2024
add198e
Refactor Deploy.yml to reintroduce Set Subnet Configuration job and c…
DanOwenUKHO Nov 1, 2024
b751527
Remove SetPOSSubnet job from POS and BESS Functional Automated Tests …
DanOwenUKHO Nov 1, 2024
138f5a8
Add mockWebApp configuration variables to Deploy.yml
DanOwenUKHO Nov 1, 2024
19a87cf
Add POSFunctionalTests job to BESS Functional Automated Tests in Depl…
DanOwenUKHO Nov 1, 2024
705c2c6
Remove commented-out SetPOSSubnet job from Deploy.yml
DanOwenUKHO Nov 4, 2024
94b5989
Test variable
DanOwenUKHO Nov 4, 2024
e1c32ff
Comment out dependencies for SwapAppConfigsconfiguration job in Deplo…
DanOwenUKHO Nov 4, 2024
fecfb58
Add output for WEB_APP_NAME in Deploy.yml
DanOwenUKHO Nov 4, 2024
a0aa416
Update deployment pool variable in Deploy.yml
DanOwenUKHO Nov 4, 2024
a34c757
Refactor deployment variables in Deploy.yml for clarity and maintaina…
DanOwenUKHO Nov 4, 2024
c33c18b
Add conditional count for mock_main_subnet based on environment
DanOwenUKHO Nov 5, 2024
9976cb1
Fix subnet ID reference for mock_main_subnet to use the first element…
DanOwenUKHO Nov 5, 2024
177e1b4
Use local variable for mock_main_subnet ID to improve readability and…
DanOwenUKHO Nov 6, 2024
f173d33
Update mock_main_subnet_id to use an empty string instead of null for…
DanOwenUKHO Nov 6, 2024
807ba55
Refactor subnet handling in main.tf to use compact for virtual_networ…
DanOwenUKHO Nov 6, 2024
7e09cef
Fix mock_spoke_subnet assignment to reference the first element of th…
DanOwenUKHO Nov 6, 2024
46299d7
Use local variable for mock_main_subnet ID to improve readability and…
DanOwenUKHO Nov 6, 2024
b8a5f7e
test e2e
DanOwenUKHO Nov 8, 2024
1ac3e27
Update vNext E2E Deploy stage dependencies and restore condition chec…
DanOwenUKHO Nov 8, 2024
08e82c1
Merge from main
DanOwenUKHO Dec 23, 2024
b6c3dac
Revert webapp terraform template
DanOwenUKHO Dec 23, 2024
4ab8fc3
Remove duplicate variable
DanOwenUKHO Dec 23, 2024
c66181f
Update publish mutation report version
DanOwenUKHO Dec 23, 2024
ff4fb2a
Add agent subnet variables to webapp service module
DanOwenUKHO Dec 23, 2024
39a1c6d
Remove unused app service plan data sources and agent subnet variables
DanOwenUKHO Dec 23, 2024
f223082
Update outputs for webapps
DanOwenUKHO Dec 24, 2024
323b4e6
Follow naming standards, move dependency checker to DDC template, mov…
DanOwenUKHO Dec 24, 2024
6d1c5aa
Add missing parameter
DanOwenUKHO Dec 24, 2024
bd252d2
Fix indentation
DanOwenUKHO Dec 24, 2024
2c89b7c
Update template name
DanOwenUKHO Dec 24, 2024
1b3a812
Add skd version variable
DanOwenUKHO Dec 24, 2024
bbf3c6a
Update paths for nvd scanner
DanOwenUKHO Dec 24, 2024
28c78b7
Fix path
DanOwenUKHO Dec 24, 2024
bc5d3a0
Update container name arguments in app-deploy.yml
DanOwenUKHO Dec 24, 2024
3e9abad
Merge branch 'main' into dev/NewEnvironments
DanOwenUKHO Jan 7, 2025
93c6073
empty commit for snyk
DanOwenUKHO Jan 8, 2025
73ae88a
Fix path traversal
DanOwenUKHO Jan 8, 2025
d83a451
Merge branch 'dev/NewEnvironments' of https://github.com/UKHO/periodi…
DanOwenUKHO Jan 8, 2025
b9a4f9a
add hyphen to regex expression
DanOwenUKHO Jan 8, 2025
6c62624
Check if this is needed
DanOwenUKHO Jan 9, 2025
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
File renamed without changes.
15 changes: 15 additions & 0 deletions Deployment/set_subnet_configuration.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
param (
[Parameter(Mandatory = $true)] [string] $mockresourcegroup,
[Parameter(Mandatory = $true)] [string] $mockwebappname,
[Parameter(Mandatory = $true)] [string] $subscriptionid,
[Parameter(Mandatory = $true)] [string] $vnetresourcegroup,
[Parameter(Mandatory = $true)] [string] $vnetname,
[Parameter(Mandatory = $true)] [string] $subnetname
)

Write-Output "Set Subnet in Mock Network Configuration ..."
az webapp config access-restriction add -g $mockresourcegroup -n $mockwebappname --action Allow --subnet "/subscriptions/$subscriptionid/resourceGroups/$vnetresourcegroup/providers/Microsoft.Network/virtualNetworks/$vnetname/subnets/$subnetname" --priority 65000 --scm-site false -i




Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ resource "azurerm_windows_web_app" "pks_mock_webapp_service" {
resource "azurerm_app_service_virtual_network_swift_connection" "pks_mock_webapp_vnet_integration" {
app_service_id = azurerm_windows_web_app.pks_mock_webapp_service.id
subnet_id = var.subnet_id
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ output "web_app_tenant_id" {

output "default_site_hostname" {
value = azurerm_windows_web_app.mock_webapp_service.default_hostname
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ resource "azurerm_storage_account" "bess_storage" {
default_action = "Deny"
ip_rules = var.allowed_ips
bypass = ["Logging", "Metrics", "AzureServices"]
virtual_network_subnet_ids = [var.m_spoke_subnet, var.agent_2204_subnet, var.agent_prd_subnet]
virtual_network_subnet_ids = compact([var.m_spoke_subnet, var.mock_spoke_subnet, var.agent_2204_subnet, var.agent_prd_subnet])
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ resource "azurerm_windows_web_app" "webapp_service" {
resource "azurerm_app_service_virtual_network_swift_connection" "webapp_vnet_integration" {
app_service_id = azurerm_windows_web_app.webapp_service.id
subnet_id = var.subnet_id
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ output "username" {
output "password" {
value = azurerm_windows_web_app.webapp_service.site_credential[0].password
sensitive = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ variable "app_settings" {
}

variable "tags" {

}

variable "env_name" {
Expand All @@ -30,10 +29,14 @@ variable "subnet_id" {
type = string
}

variable "main_subnet_id" {
type = string
variable "allowed_ips" {
}

variable "allowed_ips" {

variable "agent_2204_subnet" {
type = string
}

variable "agent_prd_subnet" {
type = string
}
File renamed without changes.
39 changes: 24 additions & 15 deletions DevDeployment/src/main.tf → Deployment/src/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,12 @@ data "azurerm_subnet" "main_subnet" {
}

data "azurerm_subnet" "mock_main_subnet" {
count = "${local.env_name}" == "dev" ? 1 : 0
name = var.mock_spoke_subnet_name
virtual_network_name = var.spoke_vnet_name
resource_group_name = var.spoke_rg
}

data "azurerm_app_service_plan" "essft_asp" {
name = "essft-qc-yh3r1-asp"
resource_group_name = "essft-qc-webapp-rg"
}

data "azurerm_app_service_plan" "ess_asp" {
name = "ess-${local.env_name}-lxs-1-asp"
resource_group_name = "ess-${local.env_name}-rg"
}

module "app_insights" {
source = "./Modules/AppInsights"
name = "${local.service_name}-${local.env_name}-insights"
Expand All @@ -37,15 +28,27 @@ module "eventhub" {
env_name = local.env_name
}

data "azurerm_app_service_plan" "essft_asp" {
count = "${local.env_name}" == "dev" ? 1 : 0
name = "essft-qc-yh3r1-asp"
resource_group_name = "essft-qc-webapp-rg"
}

data "azurerm_app_service_plan" "ess_asp" {
name = "ess-${local.env_name}-lxs-1-asp"
resource_group_name = "ess-${local.env_name}-rg"
}

module "mock_webapp_service" {
count = "${local.env_name}" == "dev" ? 1 : 0
source = "./Modules/MockWebApp"
name = local.mock_web_app_name
pks_name = local.pks_mock_web_app_name
env_name = local.env_name
resource_group_name = azurerm_resource_group.mock_webapp_rg.name
service_plan_id = data.azurerm_app_service_plan.essft_asp.id
service_plan_id = data.azurerm_app_service_plan.essft_asp[0].id
location = azurerm_resource_group.mock_webapp_rg.location
subnet_id = data.azurerm_subnet.mock_main_subnet.id
subnet_id = data.azurerm_subnet.mock_main_subnet[0].id
main_subnet_id = data.azurerm_subnet.main_subnet.id
app_settings = {
"ASPNETCORE_ENVIRONMENT" = local.env_name
Expand All @@ -65,11 +68,13 @@ module "webapp_service" {
env_name = local.env_name
location = azurerm_resource_group.webapp_rg.location
subnet_id = data.azurerm_subnet.main_subnet.id
agent_2204_subnet = var.agent_2204_subnet
agent_prd_subnet = var.agent_prd_subnet
app_settings = {
"EventHubLoggingConfiguration:Environment" = local.env_name
"EventHubLoggingConfiguration:MinimumLoggingLevel" = "Warning"
"EventHubLoggingConfiguration:UkhoMinimumLoggingLevel" = "Information"
"APPINSIGHTS_INSTRUMENTATIONKEY" = module.app_insights.instrumentation_key
"APPLICATIONINSIGHTS_CONNECTION_STRING" = module.app_insights.connection_string
"ASPNETCORE_ENVIRONMENT" = local.env_name
"WEBSITE_RUN_FROM_PACKAGE" = "1"
"WEBSITE_ENABLE_SYNC_UPDATE_SITE" = "true"
Expand All @@ -90,13 +95,17 @@ module "webapp_service" {
allowed_ips = var.allowed_ips
}

locals {
mock_main_subnet_id = (length(data.azurerm_subnet.mock_main_subnet) > 0 ? data.azurerm_subnet.mock_main_subnet[0].id : null)
}

module "storage" {
source = "./Modules/Storage"
resource_group_name = azurerm_resource_group.webapp_rg.name
location = azurerm_resource_group.webapp_rg.location
allowed_ips = var.allowed_ips
m_spoke_subnet = data.azurerm_subnet.main_subnet.id
mock_spoke_subnet = data.azurerm_subnet.mock_main_subnet.id
mock_spoke_subnet = data.azurerm_subnet.mock_main_subnet[0].id
agent_2204_subnet = var.agent_2204_subnet
agent_prd_subnet = var.agent_prd_subnet
env_name = local.env_name
Expand All @@ -113,7 +122,7 @@ module "key_vault" {
env_name = local.env_name
tenant_id = module.webapp_service.web_app_tenant_id
allowed_ips = var.allowed_ips
allowed_subnet_ids = [data.azurerm_subnet.main_subnet.id, var.agent_2204_subnet,var.agent_prd_subnet]
allowed_subnet_ids = [data.azurerm_subnet.main_subnet.id, var.agent_2204_subnet, var.agent_prd_subnet]
location = azurerm_resource_group.webapp_rg.location
agent_2204_subnet = var.agent_2204_subnet
agent_prd_subnet = var.agent_prd_subnet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ output "pks_mock_webappname" {
}

output "fm_mock_web_app_url" {
value = "https://${module.mock_webapp_service.default_site_hostname}"
value = length(module.mock_webapp_service) > 0 ? "https://${module.mock_webapp_service[0].default_site_hostname}" : null
}

output "mock_webapp_rg" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ locals {
SERVICE_OWNER = "UKHO"
RESPONSIBLE_TEAM = "Abzu"
CALLOUT_TEAM = "On-Call_N/A"
COST_CENTRE = "A.008.02"
COST_CENTRE = local.env_name == "dev" || local.env_name == "qa" || local.env_name == "prod" ? "A.008.02" : "A.011.08"
}
}

Expand All @@ -40,6 +40,14 @@ variable "spoke_subnet_name" {
type = string
}

variable "agent_rg" {
type = string
}

variable "agent_vnet_name" {
type = string
}

variable "mock_spoke_subnet_name" {
type = string
}
Expand All @@ -58,15 +66,15 @@ variable "elastic_apm_server_url" {
variable "elastic_apm_api_key" {
}

variable "agent_2204_subnet" {
variable "permitdecryptionhardwareid" {
type = string
}

variable "agent_prd_subnet" {
variable "agent_2204_subnet" {
type = string
}

variable "permitdecryptionhardwareid" {
variable "agent_prd_subnet" {
type = string
}

Expand Down
Loading
Loading