From 26133fc414c64098874ebc7d3d9519df4d96806b Mon Sep 17 00:00:00 2001 From: Erik Schultink Date: Tue, 2 Dec 2025 08:48:40 -0800 Subject: [PATCH] Update example to v0.5.14 --- google-workspace.tf | 2 +- main.tf | 34 ++++++++++++++++++++++++++++++---- msft-365.tf | 8 ++++---- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/google-workspace.tf b/google-workspace.tf index c98b1b2..c50681c 100644 --- a/google-workspace.tf +++ b/google-workspace.tf @@ -7,7 +7,7 @@ provider "google" { module "worklytics_connectors_google_workspace" { - source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-google-workspace?ref=v0.5.13" + source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-google-workspace?ref=v0.5.14" providers = { diff --git a/main.tf b/main.tf index fe2932f..afa0c68 100644 --- a/main.tf +++ b/main.tf @@ -20,7 +20,7 @@ terraform { # general cases module "worklytics_connectors" { - source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors?ref=v0.5.13" + source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors?ref=v0.5.14" enabled_connectors = var.enabled_connectors chat_gpt_enterprise_example_workspace_id = var.chat_gpt_enterprise_example_workspace_id @@ -103,7 +103,7 @@ locals { } module "psoxy" { - source = "git::https://github.com/worklytics/psoxy//infra/modules/aws-host?ref=v0.5.13" + source = "git::https://github.com/worklytics/psoxy//infra/modules/aws-host?ref=v0.5.14" environment_name = var.environment_name aws_account_id = var.aws_account_id @@ -176,7 +176,7 @@ locals { module "connection_in_worklytics" { for_each = local.all_instances - source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-psoxy-connection-aws?ref=v0.5.13" + source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-psoxy-connection-aws?ref=v0.5.14" proxy_instance_id = each.key worklytics_host = var.worklytics_host @@ -202,21 +202,47 @@ output "api_connector_instances" { value = { for k, v in module.psoxy.api_connector_instances : k => { endpoint_url = v.endpoint_url sanitized_bucket = v.sanitized_bucket - } } + test_examples = merge({ + api_requests = concat( + [for path in try(v.example_api_calls, []) : "GET ${path}"], + [for req in try(v.example_api_requests, []) : merge( + { + request = "${try(req.method, "GET")} ${req.path}" + }, + try(req.method, "GET") == "POST" || try(req.method, "GET") == "PUT" ? merge( + try(req.content_type, null) != null ? { content_type = req.content_type } : {}, + try(req.body, null) != null ? { body = req.body } : {} + ) : {} + )] + ) + }, + try(v.enable_async_processing, false) ? { supports_async = true } : {}, + try(v.example_api_calls_user_to_impersonate, null) != null ? { user_to_impersonate = try(v.example_api_calls_user_to_impersonate, null) } : {} + ) } + } } output "bulk_connector_instances" { value = { for k, v in module.psoxy.bulk_connector_instances : k => { + input_bucket = try(v.input_bucket, null) sanitized_bucket = v.sanitized_bucket + example_files = try(v.example_files, []) } } } output "webhook_collector_instances" { value = { for k, v in module.psoxy.webhook_collector_instances : k => { + endpoint_url = try(v.endpoint_url, null) sanitized_bucket = v.output_sanitized_bucket_id + test_examples = try(v.test_examples, []) } } } +output "caller_role_arn" { + description = "ARN of the AWS role to impersonate when making API calls (AWS case)" + value = module.psoxy.caller_role_arn +} + output "todos_1" { description = "List of todo steps to complete 1st, in markdown format." value = var.todos_as_outputs ? join("\n", local.source_authorization_todos) : null diff --git a/msft-365.tf b/msft-365.tf index 4e1868d..8d75985 100644 --- a/msft-365.tf +++ b/msft-365.tf @@ -1,7 +1,7 @@ # BEGIN MSFT module "worklytics_connectors_msft_365" { - source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-msft-365?ref=v0.5.13" + source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-msft-365?ref=v0.5.14" enabled_connectors = var.enabled_connectors @@ -47,7 +47,7 @@ data "aws_region" "current" { module "cognito_identity_pool" { count = local.msft_365_enabled ? 1 : 0 # only provision identity pool if MSFT-365 connectors are enabled - source = "git::https://github.com/worklytics/psoxy//infra/modules/aws-cognito-pool?ref=v0.5.13" + source = "git::https://github.com/worklytics/psoxy//infra/modules/aws-cognito-pool?ref=v0.5.14" developer_provider_name = local.developer_provider_name name = "${local.env_qualifier}-azure-ad-federation" @@ -69,7 +69,7 @@ locals { module "cognito_identity" { count = local.msft_365_enabled ? 1 : 0 # only provision identity pool if MSFT-365 connectors are enabled - source = "git::https://github.com/worklytics/psoxy//infra/modules/aws-cognito-identity-cli?ref=v0.5.13" + source = "git::https://github.com/worklytics/psoxy//infra/modules/aws-cognito-identity-cli?ref=v0.5.14" aws_region = data.aws_region.current.id @@ -106,7 +106,7 @@ locals { module "msft_connection_auth_federation" { for_each = local.provision_entraid_apps ? local.enabled_to_entraid_object : local.shared_to_entraid_object - source = "git::https://github.com/worklytics/psoxy//infra/modules/azuread-federated-credentials?ref=v0.5.13" + source = "git::https://github.com/worklytics/psoxy//infra/modules/azuread-federated-credentials?ref=v0.5.14" application_id = each.value.connector_id display_name = "${local.env_qualifier}AccessFromAWS"