Creates a static website with all the necessary dependencies:
- S3 Bucket
- S3 Bucket Website Configuration
- IAM user with deploy permissions
- Validated ACM cert (in us-east-1)
- CloudFront distribution
- DNS record for domain name
Currently, only supports Cloudflare for DNS records
Name | Version |
---|---|
aws | >= 4.15, < 5.0 |
cloudflare | >= 3.15, < 4.0 |
Name | Version |
---|---|
aws | >= 4.15, < 5.0 |
cloudflare | >= 3.15, < 4.0 |
Name | Source | Version |
---|---|---|
bucket | smartassistco/s3website/aws | n/a |
certificate | smartassistco/cloudflare-validated-acm/aws | n/a |
Name | Type |
---|---|
aws_cloudfront_distribution.cloudfront_distribution | resource |
cloudflare_record.dns_record | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cloudflare_zone_id | The Zone ID for the DNS provider | string |
n/a | yes |
domain_name | The domain name for the website, e.g. demo.example.com | string |
n/a | yes |
error_file | The name of the error file in the S3 bucket | string |
"404.html" |
no |
index_file | The name of the error file in the S3 bucket | string |
"index.html" |
no |
project_name | The name of the project, which will be used to create the S3 bucket and deploy user. e.g. demo-website | string |
n/a | yes |
Name | Description |
---|---|
deploy_bucket | The S3 bucket to deploy the website files |
deploy_user_creds | The AWS credentials for the deploy user |