Skip to main content

Import from AWS, Azure, GCP

You can import cloud resources from your cloud accounts (AWS, Microsoft Azure, Google Cloud Platform) into Opsly. From the import you can generate a diagram and visualise all your cloud services with the configuration in 1 single diagram. This can be used to asses the infrastructure architecture, infrastructure changes happening in your cloud accounts and can validate the configuration very quickly from one central place.

All imported cloud services will also be made available into Opsly's interface where you can drag-and-drop existing services in a diagram and connect it to new services, see section below Resources.

You can also migrate cloud resources to Terraform, see Import Cloud and export as Terraform code.

Import from AWS

You can create an import job which will connect to your account using your existing Credential and run terraform import in bulk for your entire account.

Navigate to the Dashboard > New > Cloud Import > AWS. Select an existing Credential, see Credentials and select a region. Ensure that your credential has at least ReadOnly permission to the cloud services you want to import.

ReadOnly

Once you're ready click Create new Import. This will create an import job in Cloud imports (you can find this using the sidebar menu). The status will show as

AWS Import Running

You have to wait until the import job is ready, and the status changes to green.

AWS Import Done

You can then click on the job, and you will see a list of all your existing cloud services in your account that Opsly would like to import. Review all the imported data and when you're ready, click Create diagram at the bottom.

AWS Imported Data

Opsly will run terraform import and import all your resources into a new Terraform state file. This can be found in the S3 bucket you specified in the credential. The file will be named opsly-diagram-DIAGRAM_ID which can be found as part of the URL in the diagram page.

AWS TF State File

Once it's ready it will run terraform plan to ensure that all the configuration is valid and migrated all resources from your account to the state file. Finally the diagram will be created which can be found in the Dashboard.

AWS Imported Diagram

All your existing cloud services are stored in this diagram, you can change the configuration and Deploy it back to your account or you can Export as Terraform code.

Resources

When you're building infrastructure in the Diagram page, sometimes you might need to reference existing resources. You can do this by going to the Resources tab in the side menu. You can type for any resource and you will see a list of your existing resources from your cloud accounts.

Resources

You can just drag-and-drop the resource (e.g vpc-0f3cf88b4dbe189e4) and connect it to other Services. If you click Open Diagram it will take to the imported diagram that was created from the import job.

AWS Resources VPC

If you export this diagram as Terraform code, you will see that the resource is referenced directly from the terraform_remote_state state file from that specific diagram.

AWS Resources VPC TF State

Import from Azure

To import your Azure account into Opsly, go to the Dashboard > New > Cloud Import > Microsoft Azure. Type in a name, choose an existing credential and choose an existing Resource Group to import. You credential must have at least Reader access granted to your User, Enterprise application and Azure subscription.

Azure Reader

Once you're ready click Create new Import.

Azure Import

Review the resources imported from your Resource Group and when you're ready click Create diagram.

Azure Imported Diagram

You can then search for your existing resources in the Resources side menu. Copy the ID of the existing resource and paste in the Search.

Azure Resources

Import from Google Cloud Platform

To import your GCP account into Opsly, go to the Dashboard > New > Cloud Import > Google Cloud Platform. Type in a name, choose an existing credential, choose a region and Project ID to import. You credential must have at least Viewer access granted to your Service Account.

GCP Viewer

Once you're ready click Create new Import.

GCP Imported Data

Review the resources imported from your Project and when you're ready click Create diagram.

GCP Imported Diagram