<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Nicholas Perkins</title>
<link rel="stylesheet" href="/theme/css/main.css" />
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Nicholas Perkins Atom Feed" />
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="/">Nicholas Perkins </a></h1>
<nav><ul>
<li><a href="/pages/about.html">About</a></li>
<li><a href="/category/posts.html">Posts</a></li>
</ul></nav>
</header>
<aside id="featured" class="body">
<article>
<h1 class="entry-title"><a href="/posts/infrastructure-as-code.html">Infrastructure as code with Terraform</a></h1>
<footer class="post-info">
<abbr class="published" title="2021-04-18T00:00:00+10:00">
Published: Sun 18 April 2021
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/nicholas-perkins.html">Nicholas Perkins</a>
</address>
<p>In <a href="/category/devops.html">devops</a>.</p>
<p>tags: <a href="/tag/infrastructure-as-code.html">infrastructure as code</a> <a href="/tag/terraform.html">terraform</a> <a href="/tag/aws.html">aws</a> <a href="/tag/devops.html">devops</a> </p>
</footer><p>Over the last couple of months I've been working on a project for a containerised orchestration platform using Infrastructure as Code. This has meant I've spent most of my time working with <a href="https://www.terraform.io/">Terraform</a>.</p>
<h2>What is Terraform?</h2>
<p>I could write a couple of paragraphs about what Terraform is and what it does, but I think they put it best:</p>
<blockquote>
<p>Terraform is an open-source infrastructure as code software tool that provides a consistent CLI workflow to manage hundreds of cloud services. Terraform codifies cloud APIs into declarative configuration files.</p>
</blockquote>
<p>The best part about Terraform, other than other options such as AWS Cloudformation, is that it is provider agnostic. In fact, Terraform bost of supporting over 500 different providers within their registry.</p>
<p>If you want to have your DNS in Cloudflare, your server instances in AWS EC2, and store data in Google Cloud Platform Big Data, you can manage all that within a single terraform deployment. You can share information, or outputs, from each service and link them together with a minimum of fuss.</p>
<p>Another great feature is the ability to build configurable and reusable modules. Create a module for setting up your default core network, and then reuse that to deploy that across multiple regions, environments, accounts, and more. You can also se variable blocks to allow configuration of the details of each deployment. You might only use one availability zone for your development environments, but up that to three for production.</p>
<h2>Example Code</h2>
<p>I've put together a <a href="https://github.com/nickperkins/infrastructure">repository</a> which shows just how easy it is to set up a core network with AWS including:</p>
<ul>
<li>VPC</li>
<li>Public and Private Subnets</li>
<li>An internet gateway for the public subnet</li>
<li>NAT Gateways for the private subnets</li>
<li>Routing tables to bring it all together</li>
</ul> </article>
</aside>
<section id="content" class="body">
<h1>Other articles</h1>
<hr />
<ol id="posts-list" class="hfeed">
<li><article class="hentry">
<header>
<h1><a href="/posts/using-pyodbc-in-aws-lambda-functions.html" rel="bookmark" title="Permalink to Using pyodbc in AWS Lambda functions">Using pyodbc in AWS Lambda functions</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2019-07-21T00:00:00+10:00">
Published: Sun 21 July 2019
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/nicholas-perkins.html">Nicholas Perkins</a>
</address>
<p>In <a href="/category/code.html">code</a>.</p>
<p>tags: <a href="/tag/aws.html">aws</a> <a href="/tag/lambda.html">lambda</a> <a href="/tag/serverless.html">serverless</a> <a href="/tag/docker.html">docker</a> <a href="/tag/chalice.html">chalice</a> </p>
</footer> <p>This week I was working on a AWS Lambda function that needed to read and write from a legacy Microsoft SQL database. It's written using the <a href="https://github.com/aws/chalice">AWS Chalice</a> framework and in local testing everying looked great. Not so much when we needed to deploy it to AWS for testing.</p>
<h2>Why …</h2>
<a class="readmore" href="/posts/using-pyodbc-in-aws-lambda-functions.html">read more</a>
</div>
</article></li>
</ol>
</section>
<section id="extras" class="body">
<div class="blogroll">
<h2>links</h2>
<ul>
<li><a href="https://github.com/nickperkins">Github</a></li>
</ul>
</div>
<div class="social">
<h2>social</h2>
<ul>
<li><a href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate">atom feed</a></li>
<li><a href="https://twitter.com/nicholosophy">Twitter</a></li>
<li><a href="https://www.linkedin.com/in/nickperkins/">LinkedIn</a></li>
</ul>
</div>
</section>
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="https://getpelican.com/">Pelican</a>, which takes great advantage of <a href="https://python.org">Python</a>.
</address>
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
</footer>
<script type="text/javascript">
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-144289286-1', 'auto');
    ga('send', 'pageview');
    </script>
<script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "c3eb4dcd0cfe4db884b58a4af07f7725"}'></script></body>
</html>