Skip to content
Merged
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
2 changes: 1 addition & 1 deletion google-workspace.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
34 changes: 30 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions msft-365.tf
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down