In the cloud computing world managing the infrastructure is a significant challenge for cloud users. There is a number of innovative solutions available in the market such as Infrastructure as Code (IaC), Infrastructure as Diagram, and Infrastructure as SQL, etc. Today, we will see one such example of open-source Infrastructure as SQL tool, Steampipe IaSQL. In this blog, we will try to set up Steampipe CLI and will see first look how it works.
I am going to use Windows 11 via Windows Subsystem for Linux (WSL 2.0) with Ubuntu, but all the steps are going to be the same for other types of operating systems as well.
Steampipe IaSQL CLI Installation
As a first step, we need to install Steampipe IaSQL CLI which will further help us with interaction with the tool.
sudo /bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/turbot/steampipe/main/install.sh)"
Once we have installed it, we can check out the version of it using the below command.
Install AWS Plugin
Steampipe IaSQL works based on a plugin architecture. There are different plugins available for different cloud providers. We can even write our own plugin as per our needs. We are going to test, the already available AWS plugin, which we can install using the below command.
steampipe plugin install aws
Now that we have the AWS plugin installed in Steampipe IaSQL, we need to export our AWS credentials in order for Steampipe to access our environment. Please note: we can also use
~/.aws/credentials file as well. For our test purpose, I have created a test user in my AWS account and assigned it an Administrator role.
Create Test User
First Query with Steampipe IaSQL
Now we are all good to execute a few queries and see the first look of the magic that happens behind the scenes with SQL. I tried to fetch aws_vpc, aws_iam_user, and aws_iam_role here. But there is a lot to explore here.
The first impression is really good, it looks very promising that complex cloud infrastructure is available in the form of SQL. I would love to try more with this amazing IaSQL tool. I will post more blogs about it as I learn more.