Skip to content

This project aims to provision a static website using the AWS S3 service and Terraform as a structure-as-code tool.

License

Notifications You must be signed in to change notification settings

diogofiaminghi/terraform-static-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Website provisioning on AWS S3 using Terraform

GitHub language count Repository size GitHub last commit License Stargazers

Status: Finished

DescriptionPre-requisitesHow it worksTech StackAuthorLicense

Description

This project aims to provision a static website using the AWS S3 service and Terraform as a structure-as-code tool. Project characteristics:

  • random bucket name creation
  • creation of bucket, ACL, website configuration, bucket policy and two objects (index.html and error.html)

Pre-requisites

Before you begin, you will need to have the following tools installed on your machine: [Terraform] (https://www.terraform.io/) and [Git] (https://git-scm.com). You will need to have a [AWS Account] (https://aws.amazon.com/). In addition, it is good to have an editor to work with the code like [VSCode] (https://code.visualstudio.com/).


How it works

1 - Clone this repository.

git clone git@github.com:diogofiaminghi/terraform-static-website.git

2 - You must now configure your AWS Access Keys using the bash terminal.

export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXX
export AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

3 - Terraform Commands in terraform folder

terraform init
terraform fmt
terraform validate
terraform plan -out=plan.out
terraform apply plan.out

4 - Now, to prove that everything worked, get the 'url' in 'output' and open it in your web browser.

5 - Do not forget to destroy the provisioned structure otherwise you will be able to receive invoices.

terraform destroy

Tech Stack

The following tools were used in the construction of the project:


Author

Diogo Fiaminghi

Linkedin Badge Gmail Badge


License

This project is under the license MIT.

Made with love by Diogo Fiaminghi 👋🏽 Get in Touch!


About

This project aims to provision a static website using the AWS S3 service and Terraform as a structure-as-code tool.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published