<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: raviki</title>
    <description>The latest articles on DEV Community by raviki (@raviki).</description>
    <link>https://dev.to/raviki</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2790398%2F5ec59113-e82f-4637-b666-a8d83ae6529f.jpg</url>
      <title>DEV Community: raviki</title>
      <link>https://dev.to/raviki</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raviki"/>
    <language>en</language>
    <item>
      <title>I built an AWS FinOps Dashboard (CLI) to track costs, budgets &amp; idle EC2 instances across accounts/orgs</title>
      <dc:creator>raviki</dc:creator>
      <pubDate>Thu, 17 Apr 2025 10:40:22 +0000</pubDate>
      <link>https://dev.to/raviki/i-built-an-aws-finops-dashboard-cli-to-track-costs-budgets-idle-ec2-instances-across-4bh9</link>
      <guid>https://dev.to/raviki/i-built-an-aws-finops-dashboard-cli-to-track-costs-budgets-idle-ec2-instances-across-4bh9</guid>
      <description>&lt;p&gt;It has become a complicated task to track costs across my AWS accounts which are not part of a single organisation. So I wrote a python script to query costs across these accounts and print a dashboard in the terminal. Thanks to two amazing contributors for improving this tool.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features of this CLI dashboard:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Tracks costs of AWS accounts across different organisations in a single dashboard.&lt;/li&gt;
&lt;li&gt;Time-based cost analysis for current and previous months, or custom ranges.&lt;/li&gt;
&lt;li&gt;Cost breakdown by AWS service, sorted by highest spend.&lt;/li&gt;
&lt;li&gt;Displays AWS Budgets with limits and actual usage.&lt;/li&gt;
&lt;li&gt;Shows EC2 instance status across specified or all regions.&lt;/li&gt;
&lt;li&gt;Auto-detects your AWS CLI profiles.&lt;/li&gt;
&lt;li&gt;Query cost data for any time range using the -t flag.&lt;/li&gt;
&lt;li&gt;Export your data to CSV or JSON files for further analysis.&lt;/li&gt;
&lt;li&gt;Clean UI and user-friendly UX.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;You can install the tool via:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Option 1 (recommended)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pipx install aws-finops-dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you don't have pipx, install it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m pip install --user 
pipx python -m pipx ensurepath
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Option 2:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install aws-finops-dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Command Line Usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws-finops [options]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you have any suggestions to improve this tool, do share in comments.&lt;/p&gt;

&lt;p&gt;GitHub Repo: &lt;br&gt;
&lt;a href="https://github.com/ravikiranvm/aws-finops-dashboard" rel="noopener noreferrer"&gt;https://github.com/ravikiranvm/aws-finops-dashboard&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>finops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>How I Mastered Terraform With One Project! And You Can Do It Too!</title>
      <dc:creator>raviki</dc:creator>
      <pubDate>Tue, 11 Feb 2025 03:07:05 +0000</pubDate>
      <link>https://dev.to/raviki/how-i-mastered-terraform-with-one-project-and-you-can-do-it-too-g44</link>
      <guid>https://dev.to/raviki/how-i-mastered-terraform-with-one-project-and-you-can-do-it-too-g44</guid>
      <description>&lt;h2&gt;
  
  
  A Simple Idea That Taught Me Terraform!
&lt;/h2&gt;

&lt;p&gt;I use a VPN every day, but despite being a premium user, I often experienced slow internet speeds. That made me wonder—why not deploy my own VPN server on AWS? This way, I could have full control over my data, run my server in any AWS region worldwide, and turn it off when not needed to save costs. Best of all, I could do this for free using the AWS Free Tier!&lt;/p&gt;

&lt;p&gt;I decided to fully automate the setup—from provisioning infrastructure to configuring the WireGuard VPN server. That’s why I chose Terraform. With just a single command, I could deploy my VPN and start using it on my device!&lt;/p&gt;

&lt;p&gt;But what started as a simple VPN setup turned into a deep dive into Terraform, teaching me Infrastructure as Code (IaC), AWS security best practices, Linux administration, Version Control, and modular Terraform design—all in one project!&lt;/p&gt;

&lt;p&gt;If you're new to Terraform or struggling to apply it to real-world problems, my story might help you get started.&lt;/p&gt;




&lt;h2&gt;
  
  
  How I Built a Free Personal VPN on AWS with Terraform
&lt;/h2&gt;

&lt;p&gt;I love to keep things organised. I also prefer doing things idempotently. So I organised the whole project's Terraform code in different modules based on their function. This follows modularisation—a best practice in Terraform! Here's how I structured it:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Compute Module: Automating the VPN Server&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Provisioned an EC2 instance for the VPN.&lt;/li&gt;
&lt;li&gt;Used user data scripts to install WireGuard automatically on launch.&lt;/li&gt;
&lt;li&gt;Generated VPN configuration files inside the instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;VPC Module: Secure Networking Setup&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Created a custom Virtual Private Cloud (VPC) for better security.&lt;/li&gt;
&lt;li&gt;Added subnets, route tables, and security groups to control traffic.&lt;/li&gt;
&lt;li&gt;Configured the Internet Gateway to allow VPN access.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;IAM Modules: Secure Access Control&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Created an IAM role with least privilege access.&lt;/li&gt;
&lt;li&gt;Allowed the EC2 instance to upload files securely to S3 without storing credentials.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. &lt;strong&gt;Storage Module: Handling VPN Configurations&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Set up an S3 bucket for storing VPN client configuration files securely.&lt;/li&gt;
&lt;li&gt;Enforced bucket policies to restrict access.&lt;/li&gt;
&lt;li&gt;Enabled server-side encryption for added security.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Terraform Features I Used
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Terraform Modules&lt;/strong&gt; to organise my infrastructure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Variables&lt;/strong&gt; for flexibility in configuration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remote State Management&lt;/strong&gt; to track infrastructure changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outputs&lt;/strong&gt; to retrieve VPN connection details.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What I Achieved From This Project?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A fully automated, free VPN running on AWS.&lt;/li&gt;
&lt;li&gt;A practical understanding of Terraform, from writing modules to handling security best practices.&lt;/li&gt;
&lt;li&gt;Better knowledge of multiple AWS services, Cloud Networking &amp;amp; Security.&lt;/li&gt;
&lt;li&gt;Learnt essential Linux skills.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before this, I used to rely on ClickOps. With Terraform, I can easily and efficiently build the infrastructure of any size in a matter of minutes, if not seconds! I can even destroy the whole setup when not required.&lt;/p&gt;




&lt;h2&gt;
  
  
  How You Can Do It Too?
&lt;/h2&gt;

&lt;p&gt;If you're new to Terraform, here's what I recommend:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start with a real project&lt;/strong&gt;—preferably something that solves a problem or benefits you directly. If you’re just doing a project for the sake of it, you might struggle to stay motivated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Break the project into modules&lt;/strong&gt; to understand each component separately. This makes it easier to manage and debug.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read the documentation&lt;/strong&gt;, use Google, and leverage AI tools like ChatGPT to speed up your learning. ChatGPT helped me a lot throughout this process, making Terraform easier to understand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Most importantly, learn by doing!&lt;/strong&gt; The best way to master Terraform (or to learn any new skill) is through hands-on experience.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Learning by building useful apps is both rewarding and enjoyable. If this story inspired you, why not build something with Terraform? It could be a website, personal cloud storage, or even your own VPN!&lt;/p&gt;




&lt;p&gt;You can check out the complete details of this project and its code on &lt;a href="https://github.com/ravikiranvm/CloudVPN" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>terraform</category>
      <category>aws</category>
      <category>azure</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
