Skip to content

Add missing PostHog and analytics collector secrets to AWS provider#2215

Open
ya-luotao wants to merge 1 commit intoe2b-dev:mainfrom
ya-luotao:claude/add-missing-aws-secrets
Open

Add missing PostHog and analytics collector secrets to AWS provider#2215
ya-luotao wants to merge 1 commit intoe2b-dev:mainfrom
ya-luotao:claude/add-missing-aws-secrets

Conversation

@ya-luotao
Copy link
Contributor

Summary

  • Add posthog-api-key secret to AWS Secrets Manager (matches GCP's posthog-api-key)
  • Add analytics-collector secret with HOST and API_TOKEN fields (matches GCP's analytics-collector-host and analytics-collector-api-token)
  • Wire posthog_api_key, analytics_collector_host, and analytics_collector_api_token through to the job-api module
  • All secrets default to placeholder values and use ignore_changes lifecycle, matching existing AWS secrets pattern

Test plan

  • terraform plan shows 3 new secrets (posthog-api-key, analytics-collector) and updated API job template
  • With placeholder values, API service starts normally (empty strings are handled gracefully)
  • When secrets are populated in AWS Secrets Manager, API correctly reads PostHog and analytics config

Add posthog-api-key and analytics-collector secrets to AWS Secrets Manager,
matching GCP parity. Wire them through to the job-api module so the API
service can report product analytics and custom analytics events.

https://claude.ai/code/session_013AbL8FdtWDH2HRWwfDubSr
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13bcb8ba63

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +231 to +233
posthog_api_key = module.init.posthog_api_key
analytics_collector_host = module.init.analytics_collector.host
analytics_collector_api_token = module.init.analytics_collector.api_token

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Trim whitespace secret defaults before forwarding to Nomad

The new AWS wiring forwards module.init.posthog_api_key and module.init.analytics_collector.* directly, but these secrets are initialized to a single space (" ") in iac/provider-aws/init/secrets.tf and are never trimspaced on this path. In fresh environments (or any environment still using placeholders), API receives whitespace-only values instead of empty strings, so empty-config guards won’t behave like the GCP path (which trims) and integrations may be treated as configured with invalid credentials/host values.

Useful? React with 👍 / 👎.

@ValentaTomas ValentaTomas removed their assignment Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants