<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Terraform on Opslifeuk Limited</title><link>https://opslife.co.uk/tags/terraform/</link><description>Recent content in Terraform on Opslifeuk Limited</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Tue, 09 Jun 2020 22:49:25 +0100</lastBuildDate><atom:link href="https://opslife.co.uk/tags/terraform/index.xml" rel="self" type="application/rss+xml"/><item><title>Static website hosting using S3 and CloudFront</title><link>https://opslife.co.uk/aws/static/</link><pubDate>Tue, 09 Jun 2020 22:49:25 +0100</pubDate><guid>https://opslife.co.uk/aws/static/</guid><description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A note on dates:&lt;/strong&gt; this post was written in 2020 using Terraform 0.12 and the
&lt;code&gt;nodejs12.x&lt;/code&gt; Lambda runtime. The architecture still holds up well, but if you&amp;rsquo;re
following along today, check the current AWS provider docs and use a supported
Lambda runtime and Terraform version. In particular, the &lt;code&gt;aws_s3_bucket&lt;/code&gt;
resource has since been split into smaller resources (&lt;code&gt;aws_s3_bucket_acl&lt;/code&gt;,
&lt;code&gt;aws_s3_bucket_logging&lt;/code&gt;, &lt;code&gt;aws_s3_bucket_website_configuration&lt;/code&gt; and so on).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Recently I had the chance to create a static website using &lt;a href="https://aws.amazon.com/s3/"&gt;S3&lt;/a&gt; and &lt;a href="https://aws.amazon.com/cloudfront/"&gt;CloudFront&lt;/a&gt;. I used &lt;a href="https://gohugo.io"&gt;Hugo&lt;/a&gt; as the framework for content management and &lt;a href="https://www.terraform.io/docs/index.html"&gt;Terraform&lt;/a&gt; to provision the infrastructure. There were a few interesting challenges, but in the end it worked out well.&lt;/p&gt;</description></item></channel></rss>