Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Cloudfront Access Logs v2 support #5032

Open
ixti opened this issue Jan 6, 2025 · 1 comment
Open

Feature Request: Cloudfront Access Logs v2 support #5032

ixti opened this issue Jan 6, 2025 · 1 comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/enhancement Improvements or new features

Comments

@ixti
Copy link

ixti commented Jan 6, 2025

Cloudfront has v2 access logs delivery. Unfortunately there's no way to enable it with AWS provider.

Here's half-working (there's something still missing, as it's not sending logs with this) example with aws-native provider.

const source =
  new awsNative.logs.DeliverySource("cdn-logs-delivery-src", {
    resourceArn: distribution.arn,
    logType:     "ACCESS_LOGS"
  });

const destination =
  new awsNative.logs.DeliveryDestination("cdn-logs-delivery-dst", {
    destinationResourceArn: "arn:aws:s3:::example-bucket-name/example-prefix",
    outputFormat:           "parquet",
    // Required, because aws-native does not normalize tags correctly and fails
    // on Delivery and DeliveryDestination if you don't pass any
    tags:                   [{ key: "Name", value: "CFD-LogsV2-Destination" }]
  });

new awsNative.logs.Delivery("cdn-logs-delivery", {
  deliveryDestinationArn:     destination.arn,
  deliverySourceName:         source.name,
  // Somehow this is totally ignored o_O
  s3EnableHiveCompatiblePath: true,
  s3SuffixPath:               "{DistributionId}/{yyyy}/{MM}/{dd}/{HH}",
  // Required, because aws-native does not normalize tags correctly and fails
  // on Delivery and DeliveryDestination if you don't pass any
  tags:                       [{ key: "Name", value: "CFD-LogsV2" }]
}, {
  parent: this
});

See Also: hashicorp/terraform-provider-aws#40731

@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Jan 6, 2025
@corymhall
Copy link
Contributor

@ixti thanks for raising this request. Based on the PR that you linked it looks like they are working on adding this to the upstream terraform provider. Once that is merged and released we will pull it in and release it in our next release.

@corymhall corymhall added awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/enhancement Improvements or new features and removed needs-triage Needs attention from the triage team labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

3 participants