Skip to content

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

Closed
ya-luotao wants to merge 3 commits intoe2b-dev:mainfrom
ya-luotao:claude/add-missing-aws-secrets
Closed

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

Conversation

@ya-luotao
Copy link
Copy Markdown
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
Copy Markdown

@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
Copy link
Copy Markdown

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
@ValentaTomas ValentaTomas removed their request for review March 25, 2026 16:27
ya-luotao and others added 2 commits March 26, 2026 16:43
The posthog_api_key and analytics_collector secrets are initialized to
" " in Secrets Manager. Without trimspace, empty-config guards receive
whitespace instead of empty strings, diverging from the GCP path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Keep both upstream grafana_logs_* variables and our posthog/analytics
collector variables.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sitole
Copy link
Copy Markdown
Member

sitole commented Mar 26, 2026

Thanks for your contribution, we decided we don't want to support PostHog and analytics collector for non-enterprise deployment options.

@sitole sitole closed this Mar 26, 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.

4 participants