nhs-england-tools / terraform-aws-opennext

🧱 💻 ☁️ A Terraform module for deploying a Next.js application built with OpenNext to AWS
MIT License
75 stars 10 forks source link

Deploy to target already existing cloudfront #18

Open hanseungyoo opened 7 months ago

hanseungyoo commented 7 months ago

What is the problem this feature will solve?

I am already running cloudfront in our production environment and our domain is connected. When creating a new cloudfront distribution and connecting the domain, it takes time to complete the connection, so I wish I could connect to the existing cloudfront instead of creating a new cloudfront distribution.

What is the feature that you are proposing to solve the problem?

I wish there was a feature that could deploy to an existing Cloudfront ID as a target.

What alternatives have you considered?

No response

Code of Conduct

Sensitive Information Declaration

Tomdango commented 5 months ago

This would certainly be possible. The Cloudfront module only outputs the aws_cloudfront_distribution and aws_wafv2_web_acl resource, and these could be passed in as variables and a flag created to skip the Cloudfront module.

The Cloudfront module is integral to the function of the module, so a warning here that bringing your own resources would come at your own risk.