Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/.deployer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ jobs:
storage_account_name: ${{ vars.TFSTATE_STORAGE_ACCOUNT }}
vnet_address_space: ${{ vars.VNET_ADDRESS_SPACE }}
run: |
# Run terraform
terragrunt run-all ${{inputs.command}} --terragrunt-non-interactive
# Run terraform with lock=false to avoid state lock issues
terragrunt run-all ${{inputs.command}} --terragrunt-non-interactive -lock=false

28 changes: 15 additions & 13 deletions .github/workflows/destroy-test.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
name: Destroy Test Environment
name: Destroy Test Environment

permissions:
contents: read
permissions:
contents: write
id-token: write

on:
workflow_dispatch:
on:
workflow_dispatch:

jobs:
destroy-test:
uses: ./.github/workflows/.deployer.yml
with:
environment_name: test
command: destroy
stack_prefix: test-stack # Change this to your actual stack prefix if needed
secrets: inherit
jobs:
destroy-test:
uses: ./.github/workflows/.deployer.yml
with:
environment_name: test
command: destroy
stack_prefix: test-stack # Change this to your actual stack prefix if needed
secrets: inherit

2 changes: 1 addition & 1 deletion infra/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module "api" {

# Networking
private_endpoint_subnet_id = var.app_env == "dev" ? var.dev_app_service_subnet_id : module.network.private_endpoint_subnet_id
app_service_subnet_id = var.app_env == "dev" ? var.dev_app_service_subnet_id : module.network.private_endpoint_subnet_id
app_service_subnet_id = var.app_env == "dev" ? var.dev_app_service_subnet_id : module.network.app_service_subnet_id

# App Service
app_service_sku_name_api = var.app_service_sku_name_api
Expand Down
2 changes: 2 additions & 0 deletions infra/modules/network/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ resource "azapi_resource" "privateendpoints_subnet" {
addressPrefix = local.private_endpoints_subnet_cidr
networkSecurityGroup = {
id = azurerm_network_security_group.privateendpoints[0].id
#id = azurerm_network_security_group.privateendpoints.id
}
}
}
Expand All @@ -137,6 +138,7 @@ resource "azapi_resource" "app_service_subnet" {
addressPrefix = local.app_service_subnet_cidr
networkSecurityGroup = {
id = azurerm_network_security_group.app_service[0].id
#id = azurerm_network_security_group.app_service.id
}
delegations = [
{
Expand Down
3 changes: 3 additions & 0 deletions infra/modules/network/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
output "app_service_subnet_id" {
description = "The subnet ID for the App Service."
value = var.deploy_network && var.app_env != "dev" ? azapi_resource.app_service_subnet[0].id : null
#value = azapi_resource.app_service_subnet.id

}

output "private_endpoint_subnet_id" {
description = "The subnet ID for private endpoints."
value = var.deploy_network && var.app_env != "dev" ? azapi_resource.privateendpoints_subnet[0].id : null
#value = azapi_resource.privateendpoints_subnet.id
}

output "dns_servers" {
Expand Down
3 changes: 3 additions & 0 deletions terragrunt/test/terragrunt.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include {
path = find_in_parent_folders()
}
Loading