Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Functionality for adding external domain to the site #4

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

stekern
Copy link

@stekern stekern commented Apr 14, 2020

Adds support for associating multiple domain names with the CloudFront distribution and ACM certificate. The changes introduced are not backwards-compatible.

Due to issues with the AWS provider, issues arise when you add/remove domains after the code has already been applied (the domains in aws_acm_certificate.cert_website.domain_validation_options will not be up-to-date when applying, so an Index/Element error will be raised). A temporary fix is to use Terraform's lookup method to fall back to known values if the domain_validation_options are not up-to-date. The fallback values should actually result in errors if used, but in practice the domain_validation_options are always up-to-date during the apply.

There are many issues with the aws_acm_certificate resource, and it is due for a rewrite in v3.0 (see issue hashicorp/terraform-provider-aws#13053).

Relevant issues:

@stekern stekern force-pushed the custom-domains branch 2 times, most recently from 593ed25 to 6f07881 Compare June 23, 2020 15:40
Copy link

@colincoleman colincoleman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to the breaking changes and the temporary workarounds necessary to get this working. I suggest a new module (aws_terraform_multi_domain_static_site)? is created and referenced it in the README of this one.

@stekern
Copy link
Author

stekern commented Jul 7, 2020

A separate module has been set up here instead https://github.com/nsbno/terraform-aws-multi-domain-static-site/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants