-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from davedash/wildcard-support
Add support for a wildcard domain name via ACM.
- Loading branch information
Showing
7 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,8 +25,10 @@ provider "aws" { | |
module "website" { | ||
source = "modules/terraform-module-s3-cloudfront" | ||
name = "my-first-website" | ||
hostname = "example.com" | ||
name = "my-first-website" | ||
hostname = "example.com" | ||
wildcard_ssl = "*.example.com" | ||
aliases = [ | ||
"example.net", | ||
"example.org" | ||
|
@@ -59,6 +61,7 @@ directory of this repository. | |
## Authors | ||
|
||
Jonathan Wright <[email protected]> | ||
Dave Dash <[email protected]> | ||
|
||
## License | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Example Usage | ||
|
||
The example in this directory will utilize a Wildcard SSL certificate. | ||
|
||
## Important | ||
|
||
This module will create an encrypted (i.e. HTTPS) endpoint in CloudFront using | ||
[Amazon Certificate Manager](https://aws.amazon.com/certificate-manager/). ACM | ||
cannot be automated at this time as it requires manual steps in the approval | ||
of the domain name before it can be added into the account. Please therefore | ||
setup the certificate for the domain name you require (and any aliases you may | ||
include as well) by following the | ||
[Getting Started](http://docs.aws.amazon.com/acm/latest/userguide/gs.html) guide | ||
in the AWS Documentation. | ||
|
||
## Usage | ||
|
||
To run this example you need to execute: | ||
|
||
```bash | ||
$ terraform init | ||
$ terraform plan | ||
$ terraform apply | ||
``` | ||
|
||
Note that this example may create resources which can cost money (logs stored | ||
within S3, for example). Run `terraform destroy` when you don't need these | ||
resources. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
provider "aws" { | ||
region = "eu-west-2" | ||
} | ||
|
||
module "website" { | ||
source = "../../" | ||
|
||
name = "my-first-website" | ||
hostname = "mysite.example.com" | ||
wildcard_ssl = "*.example.com" | ||
|
||
tags { | ||
Domain = "mysite.example.com" | ||
Owner = "[email protected]" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
output "hostname" { | ||
value = "${module.website.hostname}" | ||
} | ||
|
||
output "s3_bucket_name" { | ||
value = "${module.website.s3_bucket_name}" | ||
} | ||
|
||
output "cloudfront_distribution_id" { | ||
value = "${module.website.cloudfront_distribution_id}" | ||
} | ||
|
||
output "cloudfront_distribution_hostname" { | ||
value = "${module.website.cloudfront_distribution_hostname}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters