This module is responsible for creating a website hosted on Amazon S3 with a custom DNS name.
Name | Version |
---|---|
terraform | >= 1.0 |
aws | >= 3.50 |
Name | Version |
---|---|
aws | ~> 3.50 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
aws_region | Name of AWS region in which you want to create resources | string |
n/a |
yes |
project | Name of the project | string |
`` | yes |
environment | Name of the application environment(dev/prod/qa) | string |
n/a |
yes |
username | Name of the user who is deploying the resources | string |
n/a |
yes |
versioning | Either you want to enable versioning for S3 bucket or not | bool |
false | no |
acl | It defines which AWS accounts or groups are granted access and the type of access | string |
"" | no |
domain_name | The domain name for the website | string |
"" | yes |
bucket_name | The name of the bucket without the www. prefix(normally domain_name) | string |
"" | yes |
validation_method | Give validation method to validate the ssl certificate(DNS or EMAIL) | string |
"" | yes |
Name | Description |
---|---|
www_s3_bucket_name | Name of the bucket |
root_s3_bucket_name | Name of the bucket |
www_cloudfront_domain_name | Domain name of the cloudfront distribution having origin as S3 bucket with www prefix |
root_cloudfront_domain_name | Domain name of the cloudfront distribution having origin as S3 bucket without any prefix |
ssl_certificate_status | Status of the ssl certificate |
ssl_certificate_arn | ARN of the ssl certificate |
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy
- Add values infront of keys in terraform
vars.tfvars
file
please go through the below steps:
step 1: Terratest uses the Go testing framework. To use Terratest, you need to install:
`Go (requires version >=1.13)`
step 2 : To configure dependencies, run:
cd Test
go mod init test
go mod tidy //Required to download go.mod & go.sum files.//
step 3: To run the tests:
go test -timeout 30m -v filename_test.go
step 1: Create pom.xml file in test folder.
step 2: Install maven
step 3: Run the mvn test
command in the test directory. This mvn test
command will run the terrtest go file and will generate report in html format.