File tree Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ inputs:
55
55
aws_site_root_object :
56
56
description : ' Root object to be served as entry-point. Defaults to `index.html`'
57
57
required : false
58
+ aws_site_error_document :
59
+ description : ' Error document set to S3 website config. Defaults to `error.html`'
60
+ required : false
58
61
aws_site_bucket_name :
59
62
description : ' AWS S3 bucket name to use for the public files. Defaults to `${org}-${repo}-{branch}-sp`'
60
63
required : false
@@ -121,6 +124,7 @@ runs:
121
124
# Site
122
125
AWS_SITE_SOURCE_FOLDER : ${{ inputs.aws_site_source_folder }}
123
126
AWS_SITE_ROOT_OBJECT : ${{ inputs.aws_site_root_object }}
127
+ AWS_SITE_ERROR_DOCUMENT : ${{ inputs.aws_site_error_document }}
124
128
AWS_SITE_BUCKET_NAME : ${{ inputs.aws_site_bucket_name }}
125
129
AWS_SITE_CDN_ENABLED : ${{ inputs.aws_site_cdn_enabled }}
126
130
AWS_SITE_CDN_CUSTOM_ERROR_CODES : ${{ inputs.aws_site_cdn_custom_error_codes }}
@@ -220,4 +224,4 @@ runs:
220
224
run : |
221
225
echo "## Workflow failed to run :fire:" >> $GITHUB_STEP_SUMMARY
222
226
echo "Please check the logs for possible errors." >> $GITHUB_STEP_SUMMARY
223
- echo "If you consider this is a bug in the Github Action, please submit an issue to our repo." >> $GITHUB_STEP_SUMMARY
227
+ echo "If you consider this is a bug in the Github Action, please submit an issue to our repo." >> $GITHUB_STEP_SUMMARY
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ aws_site_bucket_name=$(generate_var aws_site_bucket_name $AWS_SITE_BUCKET_NAME)
90
90
aws_site_cdn_enabled=$( generate_var aws_site_cdn_enabled $AWS_SITE_CDN_ENABLED )
91
91
aws_site_cdn_custom_error_codes=$( generate_var aws_site_cdn_custom_error_codes $AWS_SITE_CDN_CUSTOM_ERROR_CODES )
92
92
aws_site_root_object=$( generate_var aws_site_root_object $AWS_SITE_ROOT_OBJECT )
93
+ aws_site_error_document=$( generate_var aws_site_error_document $AWS_SITE_ERROR_DOCUMENT )
93
94
aws_r53_domain_name=$( generate_var aws_r53_domain_name $AWS_R53_DOMAIN_NAME )
94
95
aws_r53_root_domain_deploy=$( generate_var aws_r53_root_domain_deploy $AWS_R53_ROOT_DOMAIN_DEPLOY )
95
96
# aws_r53_enable_cert=$(generate_var aws_r53_enable_cert $AWS_R53_ENABLE_CERT)
@@ -110,6 +111,7 @@ $aws_site_bucket_name
110
111
$aws_site_cdn_enabled
111
112
$aws_site_cdn_custom_error_codes
112
113
$aws_site_root_object
114
+ $aws_site_error_document
113
115
$aws_r53_domain_name
114
116
$aws_r53_sub_domain_name
115
117
$aws_r53_root_domain_deploy
Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ resource "aws_s3_bucket_website_configuration" "aws_site_website_bucket" {
9
9
index_document {
10
10
suffix = var. aws_site_root_object
11
11
}
12
+
13
+ error_document {
14
+ key = var. aws_site_error_document
15
+ }
12
16
}
13
17
14
18
# # Only create this two IF -> R53 FQDN provided and CDN is off - for www.* support
@@ -469,4 +473,4 @@ output "cloudfront_url" {
469
473
470
474
output "public_url" {
471
475
value = local. public_url
472
- }
476
+ }
Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ variable "aws_site_root_object" {
31
31
default = " index.html"
32
32
}
33
33
34
+ variable "aws_site_error_document" {
35
+ description = " error document. Defaults to empty"
36
+ type = string
37
+ default = " "
38
+ }
39
+
34
40
variable "aws_site_bucket_name" {
35
41
description = " Bucket name where all the files will be stored."
36
42
type = string
@@ -115,4 +121,4 @@ locals {
115
121
GitHubAction = " bitovi/github-actions-deploy-static-site-to-aws"
116
122
created_with = " terraform"
117
123
}
118
- }
124
+ }
You can’t perform that action at this time.
0 commit comments