Closed
Description
Terraform fails to delete lambda@edge functions that were already replicated, as AWS just doesn't let it.
From http://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html:
When you create a trigger, Lambda replicates the function to AWS Regions and CloudFront edge locations around the globe. Note that replicas can't be edited or deleted.
Terraform Version
Terraform v0.10.6
Affected Resource(s)
- aws_lambda_function
Expected Behavior
Terraform should not fail and should give you some kind of warning that it couldn't delete the resource because AWS just doesn't let you.
Actual Behavior
Terraform fails as it's trying to delete lambda function and AWS doesn't allow it.
Steps to Reproduce
- Create some configuration file with a lambda@edge function.
- Associate it to a cloudfront distribution and let it get replicated.
- Remove the lambda from your configuration.
terraform apply