Skip to main content
Version: Next

Get started in four steps

IaSQL is open-source software to inspect and provision cloud infrastructure via SQL by maintaining a 2-way connection between an unmodified PostgreSQL database and your AWS account. The rows in the database tables represent the infrastructure in your cloud account.

1. Start the IaSQL container

To start the IaSQL container locally make sure docker is installed and run:

docker run --pull=always -p 9876:9876 -p 5432:5432 --name iasql iasql/iasql

Now simply open http://localhost:9876 in your preferred browser to open the IaSQL dashboard.

2. Connect an AWS account

Click on the connect account button in the IaSQL dashboard which will open the modal displayed below and provide AWS credentials. Read more about how to manage your AWS account and generate credentials here.

DashboardDashboard

3. Install modules in the database

Which tables are loaded into an IaSQL database is configured based on what IaSQL modules are installed in a db. Every IaSQL module represents a cloud service like aws_ec2 or aws_elb. Install the desired modules with the install IaSQL PostgreSQL function.

SELECT * FROM iasql_install('aws_ec2');

Or click Install in the dashboard module sidebar:

DashboardDashboard
note

The database is automatically backfilled with all your existing cloud resources during module installation which can take a few minutes depending on how many cloud resources exist in AWS service for the module being installed

4. Inspect and provision infrastructure using SQL

Run INSERT or UPDATE queries on the database by using the IaSQL dashboard or any PostgreSQL client using the PG connection string displayed at the end of step 2. IaSQL will push the changes in your database to the cloud. Below are some common use cases:

What part of the documentation should I look at?

A high-level overview of how the IaSQL documentation is organized will help you know how to quickly find what you are looking for:

  • The tutorials will take you through different examples that inspect and provision cloud resources using SQL. Start here if you’re new to IaSQL.
  • How-to guides are recipes. They guide you through the steps involved in addressing key problems and use cases. They are more advanced than the quickstart and assume some knowledge of how IaSQL works.
  • Concepts provides useful background and describes at a fairly high level the internals of how IaSQL works.
  • Reference and code samples for IaSQL modules describe how each module works and how to use it but assumes some knowledge of how IaSQL works.