Terraform module which lets you continuously deploy your SPA on AWS CloudFront.
These types of resources are supported:
Root module calls these modules which can also be used separately to create independent resources:
Create a main.tf
file containing the following:
module "single-page-application" {
source = "li0nel/single-page-application/aws"
version = "0.0.6"
stack_name = "${var.stack_name}"
aws_profile = "${var.aws_profile}"
aws_region = "${var.aws_region}"
domain_name = "${var.domain_name}"
}
Run terraform apply
then:
git remote add codecommit $(terraform output aws_codecommit_repository_url)
git config --global credential.helper '!aws --profile YOUR_AWS_PROFILE codecommit credential-helper $@'
git config --global credential.UseHttpPath true
git push codecommit YOUR_BRANCH:master
If you get an Access Denied (403) error from the Git repository when pushing, it's probably because OSX cached your temporary credentials. You would need to find CodeCommit entries in KeyChain and delete them.
Module managed by Lionel Martin
Apache 2 Licensed. See LICENSE for full details