[Request] DD log forwarder: Allow CF stack to be deleted/destroyed
See original GitHub issueDescribe what happened: Datadog forwarder is set up in our AWS account to forward logs from lambdas, using these steps. The forwarder uses DD’s CF stack, which is an IaC module in our infra. When we destroy our infra, CF stack fails to delete because S3 resource “ForwarderBucket” has an object (cache.json) in it. This causes our destroy pipelines to fail.
Describe what you expected: DD’s CF stack deletes seamlessly. Forwarder bucket should have force-delete enabled.
Steps to reproduce the issue:
- Deploy this stack with terraform apply
- terraform destroy yields:
Error: error waiting for CloudFormation Stack deletion: failed to delete CloudFormation stack (DELETE_FAILED): ["The following resource(s) failed to delete: [ForwarderBucket]. " "The bucket you tried to delete is not empty (Service: Amazon S3; Status Code: 409; Error Code: BucketNotEmpty
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Datadog Forwarder
The Datadog Forwarder is an AWS Lambda function that ships logs, custom metrics, and traces from your environment to Datadog. The Forwarder can:....
Read more >CloudFormation Deployment Error ... - GitHub
Try to deploy DataDog Forwarder to the AWS using the latest template by link - https://console.aws.amazon.com/cloudformation/home#/stacks/create/review?
Read more >Update CloudFormation stacks that are failing because of ...
I manually deleted a resource that was created by one of my AWS CloudFormation stacks, and now my stack won't update.
Read more >HP-UX 11i Test Cases - IRS
Interview the system administrator to determine the application audit log location ... Enabling stack protection prevents certain classes of buffer overflow ...
Read more >Manager, Transport Airplane Directorate, Aircraft Certification ...
That NPRM proposed to continue to require revising the ... Information (k) Canadian airworthiness directive CF-2005-14R1, dated May 8, 2006, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@agocs Would it be possible to export the name/arn of the S3 bucket as a CF output? That way it could be cleaned up manually in a deterministic way as a part of CI/CD pipelines
Hi @vkakde , this is going to be a longer-running feature request. Unfortunately, the Lambda Forwarder is written as a Cloudformation Stack, and there is no native force-delete on Cloudformation stacks. There is DeletionPolicy: Delete, but that puts us back into the same position where it requires the S3 bucket to be empty first.
The supported method for deploying the Lambda Forwarder as a Terraform stack is simply wrapping the Cloudformation template in Terraform, and that does not give us access to aws_s3_bucket’s Force Destroy option. We would have to reimplement the Lambda Forwarder deployment in native terraform. I’m not against that, but it’s an engineering effort.
There’s also the option in which we implement a bucket cleanup lambda function as a custom resource. It’s not the worst solution, but it needs thorough testing.
I’m going to document these possibilities in our internal feature request so that our PMs can prioritize it accurately, but I’ll close this issue for now. Please feel free to reopen or reach out to support@datadoghq.com in the mean time.