Skip to content

Commit

Permalink
Update terraform and gulpfile
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSurabian committed May 6, 2020
1 parent 13e75c5 commit fb34e3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ gulp.task('images', gulp.parallel(function(){
gulp.task('deploy', gulp.parallel(function() {
return gulp.src('*', {read:false})
.pipe(shell([
'AWS_PROFILE=duckhunt terraform plan',
'AWS_PROFILE=duckhunt terraform apply',
'aws --profile duckhunt s3 sync dist/ s3://duckhuntjs.com --include \'*\' --acl \'public-read\''
]));
}));
Expand Down
10 changes: 5 additions & 5 deletions infrastructure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "aws_s3_bucket" "www-duckhuntjs-com" {
resource "aws_s3_bucket" "duckhuntjs-com" {
bucket = "duckhuntjs.com"
acl = "public-read"
policy = "${file("s3policy.json")}"
policy = file("s3policy.json")

website {
index_document = "index.html"
Expand All @@ -23,17 +23,17 @@ resource "aws_s3_bucket" "duckhuntjs-com" {
}

resource "cloudflare_record" "www-duckhuntjs-com" {
domain = "duckhuntjs.com"
zone_id = "1628b8b553f25aaa53447ae74afc7e50"
name = "www"
value = "${aws_s3_bucket.www-duckhuntjs-com.website_endpoint}"
value = aws_s3_bucket.www-duckhuntjs-com.website_endpoint
type = "CNAME"
ttl = 3600
}

resource "cloudflare_record" "duckhuntjs-com" {
domain = "duckhuntjs.com"
zone_id = "1628b8b553f25aaa53447ae74afc7e50"
name = "duckhuntjs.com"
value = "${aws_s3_bucket.duckhuntjs-com.website_endpoint}"
value = aws_s3_bucket.duckhuntjs-com.website_endpoint
type = "CNAME"
ttl = 3600
}

0 comments on commit fb34e3a

Please sign in to comment.