Skip to content

Commit

Permalink
fix: secure outputs and update reg keyvault (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-liatrio authored Oct 17, 2022
1 parent a455da1 commit a488e9e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
7 changes: 0 additions & 7 deletions app/hack/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion app/runner-controller/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let _logger;
export const getLogger = () => {
if (!_logger) {
_logger = pino({
level: process.env.LOG_LEVEL || "debug",
level: process.env.LOG_LEVEL || "info",
transport: process.env.NODE_ENV === "production"
? undefined
: { target: "pino-pretty",
Expand Down
3 changes: 2 additions & 1 deletion modules/function-app/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
output "function_webhook_url" {
value = nonsensitive("https://${azurerm_linux_function_app.gh_webhook_event_handler_app.default_hostname}/api/eventHandler?clientId=default&code=${data.azurerm_function_app_host_keys.default.default_function_key}")
sensitive = true
value = "https://${azurerm_linux_function_app.gh_webhook_event_handler_app.default_hostname}/api/eventHandler?clientId=default&code=${data.azurerm_function_app_host_keys.default.default_function_key}"
}
9 changes: 6 additions & 3 deletions modules/web-app/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "azurerm_linux_web_app" "gh_webhook_runner_controller_app" {

site_config {
application_stack {
docker_image = var.runner_controller_image_name
docker_image = "${var.docker_registry_url}/${var.runner_controller_image_name}"
docker_image_tag = var.runner_controller_image_tag
}

Expand All @@ -25,7 +25,9 @@ resource "azurerm_linux_web_app" "gh_webhook_runner_controller_app" {

app_settings = {
AZURE_APP_CONFIGURATION_ENDPOINT = var.azure_app_configuration_endpoint
DOCKER_REGISTRY_SERVER_URL = var.docker_registry_url
DOCKER_ENABLE_CI = "true"
#DOCKER_REGISTRY_SERVER_URL = "https://${var.docker_registry_url}"

}

logs {
Expand Down Expand Up @@ -148,6 +150,7 @@ resource "azurerm_key_vault_access_policy" "app_registration_key_vault_access_po

secret_permissions = [
"Get",
"Set"
"Set",
"Delete",
]
}
3 changes: 2 additions & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ output "custom_data_script" {
}

output "function_webhook_url" {
value = module.github_webhook_event_handler_function_app.function_webhook_url
sensitive = true
value = module.github_webhook_event_handler_function_app.function_webhook_url
}

0 comments on commit a488e9e

Please sign in to comment.