Skip to content

Commit ab73673

Browse files
committed
Rename enable_auth -> enable_entra_id_authentication
enable_auth is ambiguous and when set to false looks scary. This variable turns the entra_id authentication that we use to prevent web access in non-production environments on or off. Renaming for clarity.
1 parent bfa1633 commit ab73673

File tree

7 files changed

+11
-8
lines changed

7 files changed

+11
-8
lines changed

infrastructure/environments/dev/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
api_oauth_token_url = "https://int.api.service.nhs.uk/oauth2/token"
22
dns_zone_name = "manage-breast-screening.non-live.screening.nhs.uk"
3-
enable_auth = false
3+
enable_entra_id_authentication = false
44
fetch_secrets_from_app_key_vault = true
55
front_door_profile = "afd-nonlive-hub-manbrs"
66
postgres_backup_retention_days = 7

infrastructure/environments/preprod/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
api_oauth_token_url = "https://int.api.service.nhs.uk/oauth2/token"
22
dns_zone_name = "manage-breast-screening.screening.nhs.uk"
3-
enable_auth = false
3+
enable_entra_id_authentication = false
44
fetch_secrets_from_app_key_vault = true
55
front_door_profile = "afd-live-hub-manbrs"
66
postgres_backup_retention_days = 7

infrastructure/environments/review/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
api_oauth_token_url = "https://int.api.service.nhs.uk/oauth2/token"
22
dns_zone_name = "manage-breast-screening.non-live.screening.nhs.uk"
3-
enable_auth = true
3+
enable_entra_id_authentication = true
44
fetch_secrets_from_app_key_vault = true
55
front_door_profile = "afd-nonlive-hub-manbrs"
66
postgres_backup_retention_days = 7

infrastructure/modules/container-apps/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module "webapp" {
2424
fetch_secrets_from_app_key_vault = var.fetch_secrets_from_app_key_vault
2525
infra_key_vault_name = var.infra_key_vault_name
2626
infra_key_vault_rg = var.infra_key_vault_rg
27-
enable_auth = var.enable_auth
27+
entra_id_authentication_enabled = var.enable_entra_id_authentication
2828
app_key_vault_id = var.app_key_vault_id
2929
docker_image = var.docker_image
3030
user_assigned_identity_ids = var.deploy_database_as_container ? [] : [module.db_connect_identity[0].id]

infrastructure/modules/container-apps/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ variable "docker_image" {
3939
type = string
4040
}
4141

42-
variable "enable_auth" {
42+
variable "enable_entra_id_authentication" {
4343
description = "Enable authentication for the container app. If true, the app will use Azure AD authentication."
4444
type = bool
4545
}

infrastructure/terraform/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module "container-apps" {
4949
dns_zone_name = var.dns_zone_name
5050
docker_image = var.docker_image
5151
deploy_database_as_container = var.deploy_database_as_container
52-
enable_auth = var.enable_auth
52+
enable_entra_id_authentication = var.enable_entra_id_authentication
5353
environment = var.environment
5454
env_config = var.env_config
5555
fetch_secrets_from_app_key_vault = var.fetch_secrets_from_app_key_vault

infrastructure/terraform/variables.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ variable "postgres_storage_tier" {
102102
type = string
103103
}
104104

105-
variable "enable_auth" {
106-
description = "Enable authentication for the container app. If true, the app will use Azure AD authentication."
105+
variable "enable_entra_id_authentication" {
106+
description = <<EOT
107+
Enable Entra ID authentication for the container app. If true, authentication will be required to access the application.
108+
This is used in non-production environments to disable unauthenticated web access"
109+
EOT
107110
type = bool
108111
default = false
109112
}

0 commit comments

Comments
 (0)