You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ Setting `aws_r53_create_sub_cert` to `true` will create a certificate **just for
44
44
45
45
> :warning: Be very careful here! **Created certificates are fully managed by Terraform**. Therefor **they will be destroyed upon stack destruction**.
46
46
47
+
> :warning: See note about CDN with aliases if using certificates.
47
48
## Example usage
48
49
49
50
Create `.github/workflow/deploy.yaml` with the following to build on push.
@@ -192,6 +193,7 @@ The following inputs can be used as `step.with` keys
192
193
| `aws_site_error_document` | String | Error document set to S3 website config. Defaults to none. Set value to enable it. |
193
194
| `aws_site_bucket_name` | String | AWS S3 bucket name to use for the public files. Defaults to `${org}-${repo}-{branch}-sp`. If using a R53 domain and not a CDN, bucket name will be the FQDN one. See note. |
194
195
| `aws_site_cdn_enabled` | Boolean | Enable or disables the use of CDN. Defaults to `false`. |
196
+
| `aws_site_cdn_aliases` | String | Extra CNAMEs (alternate domain names), if any, for this distribution. Defaults to defined domain if none passed. (See note). |
195
197
| `aws_site_cdn_custom_error_codes` | JSON | Custom error codes to define in CDN. Like `[{\"error_caching_min_ttl\":\"0\",\"error_code\":\"403\",\"response_code\":\"200\",\"response_page_path\":\"/index.html\"}]`. See [this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution.html#custom-error-response-arguments). |
196
198
<hr/>
197
199
<br/>
@@ -229,6 +231,16 @@ Because of this reason, the length of the FQDN *MUST* be below 64 characters. Wi
229
231
230
232
In the case you are using domains and not using a CDN, no cert will be available, and length of the FQDN *MUST* be below 64 characters. Will be adjusted if it exceeds that limit.
231
233
234
+
## Certificates with CDN
235
+
236
+
In the case you are using a custom domain name and need to support two alternate domain names, you can use the `aws_site_cdn_aliases`.
237
+
If using a certificate, keep in mind that you'll need to specify one that covers the domains being defined.
238
+
239
+
For example, if the CDN will support `site.bitovi.com` and `site.bitovi.tools`, the same certificate must cover both *bitovi.com* and *bitovi.tools* domains. (You can use sub-domains too). In that case, you'll need to specify the certificate by defining the `aws_r53_cert_arn`.
240
+
If that's the case, `aws_site_cdn_aliases` should be set to: `site.bitovi.com,site.bitovi.tools`(Comma separated, no spaces).
241
+
242
+
If they alternate domain names are child of the same domain, you can use a root cert for both.
243
+
232
244
## Contributing
233
245
We would love for you to contribute to [bitovi/github-actions-deploy-static-site-to-aws](https://github.com/bitovi/github-actions-deploy-static-site-to-aws).
234
246
Would you like to see additional features? [Create an issue](https://github.com/bitovi/github-actions-deploy-static-site-to-aws/issues/new) or a [Pull Requests](https://github.com/bitovi/github-actions-deploy-static-site-to-aws/pulls). We love discussing solutions!
0 commit comments