Skip to content

feat(ec2): support Firehose IDeliveryStreamRef as flow log destination#36278

Merged
mergify[bot] merged 10 commits into
aws:mainfrom
Tietew:ec2-flowlog-firehose-v3
Feb 6, 2026
Merged

feat(ec2): support Firehose IDeliveryStreamRef as flow log destination#36278
mergify[bot] merged 10 commits into
aws:mainfrom
Tietew:ec2-flowlog-firehose-v3

Conversation

@Tietew
Copy link
Copy Markdown
Contributor

@Tietew Tietew commented Dec 3, 2025

Issue # (if applicable)

Re-drive of #33883 and #34596.
Related to #33757.

Reason for this change

FlowLogDestination.toKinesisDataFirehoseDestination() includes the former service name Kinesis and receives the string ARN.

Also, cross-account log delivery needs an IAM role. https://docs.aws.amazon.com/vpc/latest/userguide/firehose-cross-account-delivery.html

Description of changes

  • Added FlowLogDestination.toFirehose() with an optional IAM role.
  • Deprecate toKinesisDataFirehoseDestination()

Note: CDK cannot create the IAM role for cross-account delivery because the VPC ARN is needed but FlowLog construct doesn't know it.

Changes from previous PRs

This PR refers the new reference interface IDeliveryStreamRef (defined in interfaces submodule) to avoid cyclic dependency.

BEFORE

graph TD;
  A1(aws-ec2)--IDeliveryStream-->B1;
  B1(aws-kinesisfirehose)--Connections,Peer,IConnectable-->A1;
Loading

AFTER

graph TD;
  A1(aws-ec2)--IDeliveryStreamRef-->C1;
  B1(aws-kinesisfirehose)--Connections,Peer,IConnecttable-->A1;
  B1(aws-kinesisfirehose)--IDeliveryStreamRef-->C1;
  C1(interfaces);
Loading

Describe any new or updated permissions being added

N/A - Users must specify IAM roles for cross account delivery.

Description of how you validated changes

Unit tests and integ test.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team December 3, 2025 07:50
@github-actions github-actions Bot added distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2 labels Dec 3, 2025
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Dec 3, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 22, 2025

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ❌️SkippedFailed
Security Guardian Results
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 22, 2025

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ❌️SkippedFailed
Security Guardian Results with resolved templates
TestResult
No test annotations available

@leonmk-aws leonmk-aws self-assigned this Feb 4, 2026
@leonmk-aws leonmk-aws added pr/needs-cli-test-run This PR needs CLI tests run against it. pr/request-cli-integ-tests Request CLI integ tests to be run. You will need to review the code and approve the deployment. and removed pr/needs-cli-test-run This PR needs CLI tests run against it. labels Feb 4, 2026
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

➡️ PR build request submitted to test-main-pipeline ⬅️

A maintainer must now check the pipeline and add the pr-linter/cli-integ-tested label once the pipeline succeeds.

@leonmk-aws leonmk-aws added the pr/needs-integration-tests-deployment Requires the PR to deploy the integration test snapshots. label Feb 4, 2026
@leonmk-aws leonmk-aws had a problem deploying to deployment-integ-test February 4, 2026 16:26 — with GitHub Actions Failure
@Tietew
Copy link
Copy Markdown
Contributor Author

Tietew commented Feb 5, 2026

@leonmk-aws Should I revert renaming integ test?

@leonmk-aws leonmk-aws added the pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested label Feb 5, 2026
Copy link
Copy Markdown
Contributor

@leonmk-aws leonmk-aws left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution, just a small change requested to clean up leftovers files. Regarding the integ test naming, no you can let it like this, looks like a small bug in how the integ runner workflow find which integ tests to deploy, but the new test deploys fine.

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.

There are leftovers files, can you remove the directory completely since the test got removed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for clarification. Removed them.

@leonmk-aws leonmk-aws removed pr/request-cli-integ-tests Request CLI integ tests to be run. You will need to review the code and approve the deployment. pr/needs-integration-tests-deployment Requires the PR to deploy the integration test snapshots. labels Feb 5, 2026
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 5, 2026
@mergify mergify Bot dismissed leonmk-aws’s stale review February 6, 2026 06:50

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 6, 2026
Copy link
Copy Markdown
Contributor

@leonmk-aws leonmk-aws left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 6, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 6, 2026

Merge Queue Status

🟠 Waiting for merge conditions (rule: default-squash)

Entered the queue at: 2026-02-06 10:28 UTC.
Checks are running in-place (dashboard).
Merge ETA: 2026-02-06 10:29 UTC. Buckle up 🚀

Required conditions to merge
Required conditions to stay in the queue
  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of [📌 queue -> configuration change requirements]:
    • -mergify-configuration-changed
    • check-success = Configuration changed
  • any of [📌 queue requirement]:
    • check-neutral = Mergify Merge Protections
    • check-skipped = Mergify Merge Protections
    • check-success = Mergify Merge Protections
  • any of [🔀 queue conditions]:
    • all of [📌 queue conditions of queue default-squash]:
      • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
      • #approved-reviews-by>=1
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
      • #changes-requested-reviews-by=0
      • -approved-reviews-by~=author
      • -closed
      • -label~=(blocked|do-not-merge|no-squash|priority-pr)
      • -merged
      • -title~=(WIP|wip)
      • base!=release
      • check-success=build
      • check-success=validate-pr
      • any of:
        • -label~=pr/needs-integration-tests-deployment
        • check-success=Deploy integration test snapshots (requires pr/needs-integration-tests-deployment label)
      • any of [🛡 GitHub branch protection]:
        • check-success = validate-pr
        • check-neutral = validate-pr
        • check-skipped = validate-pr
      • any of [🛡 GitHub branch protection]:
        • check-success = build
        • check-neutral = build
        • check-skipped = build
    • all of [📌 queue conditions of queue default-merge]:
      • label~=no-squash
      • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
      • #approved-reviews-by>=1
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
      • #changes-requested-reviews-by=0
      • -approved-reviews-by~=author
      • -closed
      • -label~=(blocked|do-not-merge)
      • -merged
      • -title~=(WIP|wip)
      • check-success=build
      • check-success=validate-pr
      • any of:
        • -label~=pr/needs-integration-tests-deployment
        • check-success=Deploy integration test snapshots (requires pr/needs-integration-tests-deployment label)
      • any of [🛡 GitHub branch protection]:
        • check-success = validate-pr
        • check-neutral = validate-pr
        • check-skipped = validate-pr
      • any of [🛡 GitHub branch protection]:
        • check-success = build
        • check-neutral = build
        • check-skipped = build
    • all of [📌 queue conditions of queue priority-squash]:
      • label~=priority-pr
      • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
      • #approved-reviews-by>=1
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
      • #changes-requested-reviews-by=0
      • -approved-reviews-by~=author
      • -closed
      • -label~=(blocked|do-not-merge|no-squash)
      • -merged
      • -title~=(WIP|wip)
      • base!=release
      • check-success=build
      • check-success=validate-pr
      • any of:
        • -label~=pr/needs-integration-tests-deployment
        • check-success=Deploy integration test snapshots (requires pr/needs-integration-tests-deployment label)
      • any of [🛡 GitHub branch protection]:
        • check-success = validate-pr
        • check-neutral = validate-pr
        • check-skipped = validate-pr
      • any of [🛡 GitHub branch protection]:
        • check-success = build
        • check-neutral = build
        • check-skipped = build

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 6, 2026
@Tietew
Copy link
Copy Markdown
Contributor Author

Tietew commented Feb 6, 2026

@Mergifyio refresh

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 6, 2026

refresh

✅ Pull request refreshed

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 6, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify Bot merged commit cd73498 into aws:main Feb 6, 2026
28 of 29 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 6, 2026

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 6, 2026
@Tietew Tietew deleted the ec2-flowlog-firehose-v3 branch February 6, 2026 14:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2 pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants