Urgent.News

What's breaking now, across thousands of outlets.

Tech

Looking at what we are Building

So now that you have a basic understanding of how Terraform works , before you start running any terraform command against a real AWS account, two things need to happen: you need an identity Terraform can authenticate as, and you need a mental picture of what you're about to create, so the plan output in Part 4 isn't just a list of unfamiliar resource names. Never Use Your AWS Root User! The root…

To begin using Terraform, you first need to set up an IAM user with programmatic access for your project. Do not use your AWS root account for daily operations as it has too much power and can compromise your account. Create the IAM user under IAM → Users → Create user in the AWS console, assigning the AdministratorAccess policy to simplify testing.

Do not enable console access for this user; only programmatic access is required. After creating the user, generate an access key pair and store the Access Key ID and Secret Access Key securely.

Terraform does not support hardcoding credentials in .tf files or terraform.tfvars files. Instead, export the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION environment variables in your local shell or CI/CD pipeline. The AWS provider will automatically use these environment variables to authenticate without needing aws configure or aws login commands.

When you run Terraform, it will create a VPC (Virtual Private Cloud) within AWS, specifically 10.0.0.0/16, divided into two Availability Zones (AZs) for redundancy. Each AZ will have a public subnet with an Internet Gateway (IGW) and a NAT Gateway to provide outbound internet access for the private subnets. The private subnets will host EC2 worker nodes, which are the actual machines running your services and applications.

The EKS (Elastic Kubernetes Service) control plane is managed by AWS and not housed within your subnets. It acts as the Kubernetes API server and scheduler for your pods. Worker nodes, again EC2 instances, sit in the private subnets and receive instructions from the EKS control plane to run your pods. Finally, a Network Load Balancer (NLB) will be created by Kubernetes to expose your services and direct traffic to the appropriate worker nodes.

In summary, Terraform will set up a private network within AWS, two AZs for redundancy, public and private subnets, a NAT Gateway for outbound internet access, an EKS control plane, EC2 worker nodes, and a Network Load Balancer to expose your services. All of these components come with separate costs, primarily the EKS control plane and EC2 worker nodes, which are not included in AWS's free-tier offerings.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

What actually happens in a database index (and why half of them do nothing)

Same query. Same table. Same million rows. One day it takes 4 seconds . The next day, 4 milliseconds . Nothing changed in the data. The only thing that changed was one line — you added an index .

  • A database index speeds up searching in a table but half of added indexes do nothing
  • Index is a sorted map functioning like a phone book, enabling quick data lookup
  • Indexes ineffective when using leading wildcard, column function, or low selectivity

Liar Liar Pants on Fire

I have to come clean. Speaking at APIWorld this past week wasn’t actually my first talk acceptance. I had a talk accepted a few years ago, but the conference itself was ultimately cancelled due to the…

  • Speaker admitted previous talk acceptance at APIWorld was not first
  • Struggled with belonging and stage fear for years before speaking
  • Shared three lessons: authenticity, adoption gap, humor in presentations

More from Saturday 5 September →