Skip to content

feat(extension): context env-var propagation to extensions #294

@margaretjgu

Description

@margaretjgu

Part of #222.

When an extension is invoked, expose the active resolved config as environment variables so extensions can connect to Elasticsearch/Kibana without re-implementing config parsing.

  • Module at src/extension/context.ts with a buildContextEnv(config: ResolvedConfig) export
  • Env vars to set (only when values are present):
    • ELASTIC_ES_URL, ELASTIC_ES_API_KEY (or ELASTIC_ES_USERNAME/ELASTIC_ES_PASSWORD for basic auth)
    • ELASTIC_KIBANA_URL, ELASTIC_KIBANA_API_KEY
    • ELASTIC_CLOUD_API_KEY
  • Unit tests in test/extension/context.test.ts

Depends on: #293

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions