Skip to content

chore: add AWS integration via Terraform example and docs - #76

Merged
shanishiri merged 10 commits into
mainfrom
shanishiri/cloudformation-s3-docs
Jul 15, 2026
Merged

chore: add AWS integration via Terraform example and docs#76
shanishiri merged 10 commits into
mainfrom
shanishiri/cloudformation-s3-docs

Conversation

@shanishiri

@shanishiri shanishiri commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds customer-facing documentation and a runnable example for deploying the Dash0 AWS integration with Terraform's aws_cloudformation_stack resource, pointing at the official v2 CloudFormation template hosted on S3 (dash0-customer-integration-cloudformation-v2.yaml). This is the Terraform counterpart to the Dash0AwsIntegration CDK construct.

The template provisions the IAM roles Dash0 assumes to read telemetry, and — via a self-managed CloudFormation StackSet — per-region resources for the AWS/Lambda namespace (Kinesis Firehose delivery stream + CloudWatch metric stream + S3 backup bucket) and, optionally, an EventBridge rule + ApiDestination + Connection that forward Lambda lifecycle events (UpdateFunctionConfiguration, DeleteFunction) to Dash0 in near real-time.

With template 2.2 (dash0-infrastructure#1193) and the matching control-plane changes (dash0#15193), TechnicalId is optional for IaC onboarding — when omitted or left empty, the template derives the IAM external ID from the CloudFormation stack ID. No Dash0-internal organization identifier is required.

What's included

  • docs/guides/aws_cloudformation_integration.md — guide covering prerequisites, CloudFormation parameters, Terraform variables, and step-by-step usage. Documents that:
    • CAPABILITY_AUTO_EXPAND is required (in addition to CAPABILITY_NAMED_IAM) because the template contains a nested AWS::CloudFormation::StackSet
    • Regions is passed as a CommaDelimitedList — the Terraform list variable is join-ed into a comma-separated string
    • TechnicalId is optional; empty value triggers stack-ID fallback (recommended for Terraform)
    • Lambda lifecycle events require a CloudTrail trail logging management events in the selected regions; the template does not create one
    • The StackSet's S3 backup bucket is retained on terraform destroy by design
  • docs/index.md — links the new guide
  • examples/guides/aws_cloudformation_integration/ — runnable example:
    • main.tf — the aws_cloudformation_stack resource with v2 template URL, all parameters, and both required capabilities
    • variables.tf — including regions, dash0_regional_endpoint, optional technical_id (default ""), plus collect_lambda_lifecycle_events (default "true") and resources_instrumentation (default "true")
    • terraform.tfvars.example — safe placeholder values, no real credentials, no technical_id required

CloudFormation parameters documented

Parameter Required Default Notes
ApiKey Yes Dash0 API key (auth token), marked sensitive
Regions Yes Comma-separated regions for AWS/Lambda streaming + lifecycle events
Dash0RegionalEndpoint Yes Regional ingress base URL (no path/trailing slash); template appends paths internally
TechnicalId No "" External ID for IAM role assumption; when empty, template uses CloudFormation stack ID
Dataset No default Target Dash0 dataset
ResourcesInstrumentation No "true" Enable Lambda/resource instrumentation role
CollectLambdaLifecycleEvents No "true" Forward Lambda lifecycle events via EventBridge

Notes

  • Not a native Dash0 provider resource — it uses the AWS provider to deploy the CloudFormation stack with Dash0's hosted template.
  • The api_key variable is sensitive, so Terraform won't display it in plan/apply output.
  • The parent stack is region-specific, but the Regions parameter independently controls which regions the nested StackSet provisions Lambda metrics streaming into.
  • Requires template 2.2 deployed to the hosted S3 URL and matching control-plane-api changes for the empty-TechnicalId path to work end-to-end (CLO-906).

Test plan

  • Review docs/guides/aws_cloudformation_integration.md for accuracy and completeness
  • Review examples/guides/aws_cloudformation_integration/main.tf for correctness
  • Verify the v2 S3 template URL resolves correctly
  • terraform apply the example against a test AWS account + Dash0 org and confirm:
    • stack + per-region StackSet reach CREATE_COMPLETE with TechnicalId = ""
    • IAM role trust policies use the CloudFormation stack ID as sts:ExternalId
    • integration appears in Dash0 UI
    • second terraform plan shows no changes

…n via Terraform

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shanishiri shanishiri changed the title docs: add AWS integration via Terraform example chore: add AWS integration via Terraform example and docs Apr 16, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Point template_url at dash0-customer-integration-cloudformation-v2.yaml
- Add Regions and Dash0IngressUrl parameters, plus matching Terraform variables
- Add CAPABILITY_AUTO_EXPAND for the nested AWS/Lambda metrics StackSet
- Update ResourcesInstrumentation default to "true" to match v2 template
- Document the new Firehose ingress prerequisite and S3 backup bucket retention

Refs: CLO-568

- An active [Dash0](https://dash0.com) organization.
- A Dash0 **API key** (auth token), created under **Settings > Auth Tokens** in the Dash0 UI.
- Your Dash0 organization **technical ID**, found under **Settings > Organization** in the Dash0 UI.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thats not valid, there is no UI element to get the technical id. Lets discuss if we even need it, or can we derive it from the api key?

shanishiri and others added 2 commits May 31, 2026 16:26
The v2 onboarding template (dash0-infrastructure#1057) renames
Dash0IngressUrl -> Dash0RegionalEndpoint (base URL only) and adds an
optional CollectLambdaLifecycleEvents toggle. Update the example,
variables, tfvars example, and the published guide -- including the
CloudTrail prerequisite for lifecycle event forwarding.
feat(docs): update AWS CloudFormation example to v2 template
Comment thread docs/guides/aws_cloudformation_integration.md Outdated
shanishiri and others added 2 commits July 6, 2026 15:30
Align the Terraform guide and example with template 2.2 (CLO-906): drop
the technical ID prerequisite, document stack-ID fallback, and default
technical_id to empty for IaC onboarding.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shanishiri
shanishiri merged commit 6a5ecf9 into main Jul 15, 2026
6 checks passed
@shanishiri
shanishiri deleted the shanishiri/cloudformation-s3-docs branch July 15, 2026 13:09
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants