Gruntwork Newsletter, October 2019

Once a month, we send out a newsletter to all Gruntwork customers that describes all the updates we’ve made in the last month, news in the DevOps industry, and important security updates. Note that many of the links below go to private repos in the Gruntwork Infrastructure as Code Library and Reference Architecture that are only accessible to customers.

Hello Grunts,

In the last month, Terraform: Up & Running, 2nd edition was published, we added a new Cloud KMS module for GCP, made a number of improvements and fixes to the AWS Reference Architecture (including lots of helpers for working with self-signed TLS certs, keystores, and truststores), updated our Terraform Crash Course to Terraform 0.12, and made many many other fixes and improvements.

As always, if you have any questions or need help, email us at support@gruntwork.io!

Gruntwork Updates

“Terraform: Up & Running”, 2nd edition has been published!

Motivation: In early 2017, we released the book, Terraform: Up & Running. In the two years since, Terraform has changed considerably (4 major releases, a change to HCL2, a revamp of Terraform state, and much more), so the book was due for an update.

Solution: Terraform: Up & Running, 2nd edition, has been published and is now available in all book stores! The 2nd edition is nearly double the length of the 1st edition (~160 more pages), including two completely new chapters (Production-grade Terraform Code and How to Test Terraform Code), and major changes to all the original chapters and code examples (see this blog post to learn about all the changes).

What to do about it: Get a copy of the book now! And if you want to learn how to adopt an Infrastructure as Code tool like Terraform at your company—including how to convince your boss—check out this blog post.

Introducing the Cloud KMS Module

Motivation: Many of our GCP customers, especially the ones in regulated industries, such as financial services and healthcare, have been asking for a secure way to manage encryption keys.

Solution: We’re happy to announce terraform-google-security, a repository for setting up best practices for GCP security. The initial release introduces [cloud-kms](https://github.com/gruntwork-io/terraform-google-security/tree/master/modules/cloud-kms), a Terraform module that enables you to use Google Cloud KMS for creating and managing symmetric and asymmetric encryption keys and signing keys, as well as IAM role bindings to control access to the keys.

What to do about it: Email support@gruntwork.io to get access and take the module for a spin!

Reference Architecture bug fix and improvements

Motivation: This month, we took a look at a few issues customers have brought up with the Gruntwork AWS Reference Architecture:

Solution: We’ve made improvements to the Reference Architecture to address each of these challenges:

What to do about it: Refer to the links above to find out how to add all of this to your infrastructure, and take the updates for a spin!

Terratest and module-ci scripts now support Go Modules

Motivation: Starting with 1.11, go introduced official support for versioned modules in the form of the new modules system. This was experimental in go 1.11 and 1.12 and required extra flags to enable. Now with go 1.13, modules is officially supported and will automatically be used when certain conditions are met (most notably the existence of a go.mod file). Many projects have switched to managing dependencies using go modules which made terratest difficult to build with the older, community driven dep project as the transitive dependencies were not pulled in properly.

Solution: Starting with v0.21.0, terratest now officially switched to go modules from dep . This improved stability of transitive dependency management as all the upstream dependencies rely on go modules as well. We have also updated module-ci with official support for go modules in v0.16.0.

In addition to better dependency management, go modules allows us to manage your source code outside of the GOPATH . This means that you are now free to put your terraform modules anywhere in your filesystem and still be able to use terratest to test your modules!

Other Terratest Updates:

What to do about it: Follow the migration guide in the release notes to upgrade terratest and migrate from dep to go modules!

A Crash Course on Terraform: Terraform 0.12 Refresh

Motivation: With the syntax update of Terraform 0.12, our Terraform Crash Course became out of date. The code samples stopped working, and some of the behaviors of commands have changed leading to differences in the concept materials. While the high level, core concepts around using Terraform were still relevant, the low level details were incorrect.

Solution: We’ve gone through and refreshed the training course to update the lectures that became out of date with Terraform 0.12 to use the correct syntax and behaviors. Additionally, more commentary has been added where relevant to expand on the new features that have been introduced with Terraform 0.12. Since these are new lectures on the platform, you will be able to see all the ones that have been updated when you log back in!

What to do about it: Log in to teachable and take a look through the new lectures and let us know what you think!

Gruntwork at AWS re:Invent

Several Grunts are attending AWS re:Invent this year! We’ll be on the ground in Las Vegas during the week of Dec 2nd–6th. We’d love to meet with you over a meal, with a beverage, or preferably both. Book a time to meet with us.

Open source updates

Other updates

DevOps News

Automated draining for ECS Spot Instances

What happened: ECS now supports Automated Spot Instance Draining, a new capability that reduces service interruptions due to Spot instance termination.

Why it matters: In the past, if you were using spot instances in your ECS cluster, when the instance was terminated, all the Docker containers running on it would be terminated too. Now, ECS will automatically place Spot instances in DRAINING state upon the receipt of two minute interruption notice. ECS tasks running on Spot instances will automatically be triggered for shutdown before the instance terminates and replacement tasks will be scheduled elsewhere on the cluster.

What to do about it: You can enable this feature by setting ECS_ENABLE_SPOT_INSTANCE_DRAINING=true in /etc/ecs/ecs.config in User Data, while your ECS instances are booting. To use spot instances with an ECS cluster backed by module-ecs, you can set the cluster_instance_spot_price parameter.

New Security Policies for the ALB and NLB

What happened: AWS has announced that the Application Load Balancer (ALB) and Network Load Balancer (NLB) now support three new security policies for forward secrecy: ELBSecurityPolicy-FS-1–2–2019–08, ELBSecurityPolicy-FS-1–1–2019–08 and ELBSecurityPolicy-FS-1–2-Res-2019–08.

Why it matters:

What to do about it: You can now use these policies on your ALBs and NLBs to improve your security posture. If you’re using module-load-balancer, you can configure which security policy to use using the ssl_policy parameter.

Security Updates

Below is a list of critical security updates that may impact your services. We notify Gruntwork customers of these vulnerabilities as soon as we know of them via the Gruntwork Security Alerts mailing list. It is up to you to scan this list and decide which of these apply and what to do about them, but most of these are severe vulnerabilities, and we recommend patching them ASAP.

iTerm2

Text Link