It’s possible to use the Terraform platform to manage AWS CloudFront in the following way?

Hello,
I’d like to understand whether it’s possible to use the Terraform platform to manage AWS CloudFront in the following way:

I want to duplicate the configuration of an existing CloudFront distribution (associated with a domain) and then create a new distribution for a different domain based on that configuration.

In other words, my goal is to use Terraform to:

  1. Retrieve the full configuration of an existing CloudFront domain/distribution,
  2. Make minimal changes (e.g., domain name),
  3. And then create a new distribution using the modified configuration.

This way, the new domain’s CloudFront configuration would be identical to the original one, except for the updated domain name.

Is this workflow supported in Terraform? If so, what’s the best practice to accomplish it?

Thanks in advance!