Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(agent-schedule-service): wire SYNC_SERVICE_AUTH_KEY env var (#2663)

gbirman632fcd41920a
diff --git a/infra/stacks/agent-schedule-service/Pulumi.dev.yaml b/infra/stacks/agent-schedule-service/Pulumi.dev.yaml
index eda952ad45..a6c5ca163e 100644
--- a/infra/stacks/agent-schedule-service/Pulumi.dev.yaml
+++ b/infra/stacks/agent-schedule-service/Pulumi.dev.yaml
@@ -6,6 +6,7 @@ config:
agent-schedule-service:fusionauth_client_id: fusionauth-client-id-key-dev
agent-schedule-service:fusionauth_issuer: fusionauth-dev.macro.com
agent-schedule-service:internal_auth_key: document-storage-service-auth-key-dev
+ agent-schedule-service:sync_service_auth_key: sync-service-key-dev
agent-schedule-service:openai_api_key: openai-key
agent-schedule-service:anthropic_api_key: anthropic-api-key-dev
agent-schedule-service:xai-api-key: xai-api-key
diff --git a/infra/stacks/agent-schedule-service/Pulumi.prod.yaml b/infra/stacks/agent-schedule-service/Pulumi.prod.yaml
index 3f48e586b0..79cd19720d 100644
--- a/infra/stacks/agent-schedule-service/Pulumi.prod.yaml
+++ b/infra/stacks/agent-schedule-service/Pulumi.prod.yaml
@@ -6,6 +6,7 @@ config:
agent-schedule-service:fusionauth_client_id: fusionauth-client-id-key-prod
agent-schedule-service:fusionauth_issuer: auth.macro.com
agent-schedule-service:internal_auth_key: document-storage-service-auth-key-prod
+ agent-schedule-service:sync_service_auth_key: sync-service-key-prod
agent-schedule-service:openai_api_key: openai-key
agent-schedule-service:anthropic_api_key: anthropic-api-key
agent-schedule-service:xai-api-key: xai-api-key
diff --git a/infra/stacks/agent-schedule-service/index.ts b/infra/stacks/agent-schedule-service/index.ts
index a8b33f5801..a156e36b89 100644
--- a/infra/stacks/agent-schedule-service/index.ts
+++ b/infra/stacks/agent-schedule-service/index.ts
@@ -77,6 +77,11 @@ const internalAuthKeyArn = aws.secretsmanager
.getSecretVersionOutput({ secretId: INTERNAL_AUTH_KEY_NAME })
.apply((secret) => secret.arn);
+const SYNC_SERVICE_AUTH_KEY = config.require('sync_service_auth_key');
+const syncServiceAuthKeyArn = aws.secretsmanager
+ .getSecretVersionOutput({ secretId: SYNC_SERVICE_AUTH_KEY })
+ .apply((secret) => secret.arn);
+
const MACRO_API_TOKENS = getMacroApiToken();
const { notificationIngressQueueArn, notificationIngressQueueName } =
getMacroNotify();
@@ -171,6 +176,7 @@ const service = new AgentScheduleService(`agent-schedule-service-${stack}`, {
cloudfrontPrivateKeySecretArn,
MACRO_API_TOKENS.macroApiTokenPublicKeyArn,
internalAuthKeyArn,
+ syncServiceAuthKeyArn,
],
queueArns: [notificationIngressQueueArn, emailScheduledQueueArn],
bucketArns: [documentStorageBucketArn, docxUploadBucketArn],
@@ -245,6 +251,10 @@ const service = new AgentScheduleService(`agent-schedule-service-${stack}`, {
name: 'SYNC_SERVICE_URL',
value: `https://sync-service-${stack === 'dev' ? 'dev3' : 'prod2'}.macroverse.workers.dev`,
},
+ {
+ name: 'SYNC_SERVICE_AUTH_KEY',
+ value: SYNC_SERVICE_AUTH_KEY,
+ },
{
name: 'LEXICAL_SERVICE_URL',
value: `https://lexical-service-${stack}.macroverse.workers.dev`,