Skip to content

feat: add kmsKeyARN support for AWS environments#236

Open
ianaya89 wants to merge 2 commits into
masterfrom
feat/aws-kms-key-arn
Open

feat: add kmsKeyARN support for AWS environments#236
ianaya89 wants to merge 2 commits into
masterfrom
feat/aws-kms-key-arn

Conversation

@ianaya89
Copy link
Copy Markdown
Member

@ianaya89 ianaya89 commented Jun 2, 2026

Adds the new AWS-only kmsKeyARN field. Two places in the schema, both wired up:

  • kms_key_arn on the env — KMS key for Altinity-provisioned buckets + EBS. Immutable (create-only).
  • kms_key_arn per external_buckets[] entry — customer key for ClickHouse IRSA access. Mutable.

Regenerated the SDK, updated mappers/schema/docs, added unit tests both directions.

⚠️ The response fragment now requests kmsKeyARN — prod must serve it before release or AWS-env queries break (confirmed on dev).

Wire up the new AWS-only kmsKeyARN field exposed by the public API:

- Env-level `kms_key_arn`: customer KMS key for encrypting
  Altinity-provisioned data buckets and EBS volumes. Create-only /
  immutable (absent from AWSEnvUpdateSpecInput), enforced via plan
  modifier.
- Per-bucket `kms_key_arn` on `external_buckets`: customer-managed key
  granting the ClickHouse IRSA role KMS decrypt/encrypt permissions.
  Mutable.

Regenerate the GraphQL SDK, extend toSDK/toModel mappers and unit tests
(both directions), add schema attributes + descriptions, regenerate docs.
@ianaya89 ianaya89 requested a review from ondrej-smola June 2, 2026 17:30
@ondrej-smola
Copy link
Copy Markdown
Contributor

we need to create examples for this

Comment thread docs/data-sources/env_aws.md Outdated

Optional:

- `kms_key_arn` (String) Optional ARN of a customer-managed KMS key used to encrypt this bucket. When set, the ClickHouse IRSA role is granted KMS decrypt/encrypt permissions on the key so SSE-KMS-encrypted objects in the bucket can be read and written (e.g. when the bucket backs a ClickHouse external disk).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this encrypt all storage (EBS, S3 buckets) so the working is not correct

- Regenerate SDK against dev schema (anywhere.dev)
- Expand external_buckets kms_key_arn description (customer-owned,
  bucket-scoped, region-constraint note)
- Add customer-managed KMS keys example for env_aws
@ianaya89
Copy link
Copy Markdown
Member Author

ianaya89 commented Jun 3, 2026

@ondrej-smola updated docs and example.

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.

2 participants