Terraform code for generating the application configuration.
For the list of requirement, inputs, outputs, resources... check the terraform module documentation.
module "application_configuration" {
source = "git::https://github.com/DFE-Digital/terraform-modules.git//aks/application_configuration?ref=stable"
namespace = var.namespace
environment = local.environment
azure_resource_prefix = var.azure_resource_prefix
service_short = local.service_short
config_short = var.config_short
config_variables = {}
config_variables_path = "config.yaml"
secret_variables = {}
}
If is_rails_application
is set to true
, this will automatically set the following config variables:
RAILS_SERVE_STATIC_FILES=true
RAILS_LOG_TO_STDOUT=true
Secrets are automatically extracted from an Azure Key Vault using the AKS Secrets module and exposed to the application via environment variables.
Azure Key Vault doesn't allow keys with underscores and environment variable names can't have dashes, so dashes are automatically replaced with underscores before being exposed as environment variables.
The short name of the key vault can be customised by setting secret_key_vault_short
, usually this should either be null
or set to "app"
. Any dashes in the keys are automatically converted to underscores.
If your application still has an old-style YAML secret in the key vault, this module can be used to extract the values from it by setting the secret_yaml_key
variable.
The name of the Kubernetes ConfigMap
.
The name of the Kubernetes secrets.