Skip to content
This repository was archived by the owner on Oct 8, 2022. It is now read-only.
This repository was archived by the owner on Oct 8, 2022. It is now read-only.

Auto-created CloudFront distribution fails to delete on "terraform destroy" #2

@CloudNiner

Description

@CloudNiner

This module uses the aws_api_gateway_domain_name resource which auto-creates a CloudFront distribution. When we destroy a stack that uses this module, the CloudFront distribution is not marked for automatic destruction and terraform destroy fails because other resources (such as the ACM cert) marked for delete depend on the CloudFront resource. This is likely an issue with aws_api_gateway_domain_name resource itself.

For now, this can be worked around by manually disabling and deleting the CloudFront distribution associated with this stack. In addition, the CloudFront distribution alias record must be deleted in Route53. Once those operations are complete, running terraform destroy again should complete successfully.

See: https://www.terraform.io/docs/providers/aws/r/api_gateway_domain_name.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions