Product Update

Release 34

All product updates
Cloud Migration

Boosting cloud transformations with one-click Terraform code

7min read
2023-01-27
Share this article:
using-automated-terraform-script-cloud-transformation

We have seen 10x speedups and more in typical cloud transformation projects that were leveraging Txture, compared to:

  • Often tedious and scattered data collection processes.
  • Lack of automation and missing standardization regarding application assessments and cloud target solution architecture drafting.
  • Regularly failing communication and collaboration between migration consulting partners, cloud service providers and client teams.

Txture engineering and product teams are now taking another step, providing you with an additional way to boost your cloud transformation initiatives: automated Terraform script generation.

Terraform is one of the premier Infrastructure-as-Code (IaC) solutions to automatically manage resources like public cloud infrastructure. With Terraform, all you need to do is declare a desired final state of your cloud infrastructure and Terraform takes care of setting it up or updating it properly.

We are making automated Terraform script generation happen for the major strategic cloud service providers (CSP), which includes AWS, Azure and Google Cloud.

This helps you get started with immediate deployments of environments for testing and reduces the burden for manual setup via cloud CLIs or web portals of the different CSPs. Also, while using Txture to generate or draw entirely new or adjusted target solution architectures for your applications, you can use the always-up-to-date Terraform script to synchronize your deployments automatically.

This makes the process very agile and allows for iterative tweaking of rolled out cloud service estates, greatly reducing the risk as compared to big bang migrations of particular business applications.

Once you have rolled out your target solution architectures via Terraform, you can leverage Txture immediately to inspect your live cloud deployments, across CSPs and always up-to-date. If you are using Txture for hybrid/multi-cloud asset management and continuous modernization, Terraform is a perfect addition to keep up transparency in everchanging application and IT landscapes.

Let's walk you through an example

It only requires a single click to export your Txture-managed cloud target solution architecture to fully executable Terraform and hence, automated deployment and synchronization of corresponding cloud estates.

Step 1. Modeling cloud target solution architectures

Leverage Txture's capabilities for automated target solution architecture generation, start from scratch with your cloud native stack or tweak an existing, saved target solution architecture for an application in scope.

In our example we pick the following AWS based target solution architecture, consisting of basic compute, storage and relational database.

automated-target-architecture-generation-txtureLeverage Txture's capabilities for automated target solution architecture generation.

Step 2. Exporting Terraform for any target solution architecture

Use the new Terraform exporting functionality (as of January 2023 this is a feature preview available on request for existing Txture partners and clients) to create a Terraform script that contains declarations for:

  • Cloud services and their required configuration and sizing
  • Tags/labels for classification and to identify upon re-import in Txture
  • Parameters to quickly tweak the script contents
  • Placeholders for cloud account credentials

This functionality can be accessed for every Txture target solution architecture proposal (see the dedicated "Infrastructure as Code" tab in the screenshot below), whether it is a generated baseline proposal, a saved and modified one or the selected target architecture candidate for migration.

infrastructure-as-code-terraformUse the new Terraform exporting functionality to create your Terraform script.

To give you an idea about the results, the generated Terraform script (excerpts of it) for our example looks like this:

As you can see, it configures the cloud service provider, data center location and all cloud service resources for you. Furthermore some data is referred to via Terraform variables to be filled in before executing the Terraform setup (e.g. AWS account credentials).

variable "accessKey" {
  type = string
  default = "PLACEHOLDER"
}

[...]

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 4.0"
    }
  }
}

provider "aws" {
  region = "eu-north-1"
  access_key = var.accessKey
  secret_key = var.secretKey
}

resource "aws_instance" "srv121314.xy.com" {
  ami           = "ami-0962c481e8fe86edb"
  instance_type = "m6i.xlarge"

  tags = {
    TxtureId = "t:77896bf8-f618-40b3-a8da-53375473cf20"
  }
}

[...]

resource "aws_db_instance" "DRTP22 Prod" {
  allocated_storage    = 20
  db_name              = var.dbName
  engine               = "mysql"
  engine_version       = "5.7"
  instance_class       = "db.t3.small"
  username             = var.dbUser
  password             = var.dbPass

  tags = {
    TxtureId = "t:3c17b06a-ae3d-43be-9a00-ab1a69659827"
  }
}

[...]

Step 3. Create cloud estate inventory and keep it in sync automatically

Use our existing cloud estate importers to immediately visualize deployed cloud services for your application. This works out of the box, with a single click, since generated Terraform scripts also contain tags/labels to re-identify and associate all cloud services.

Provide read-only credentials to your cloud accounts and Txture will automatically fetch all cloud service resources you are running, either configured through Terraform, but also the ones manually set up via the web portal or CLI.

This provides you with all the benefits of an up-to-date cloud service inventory and enables you to continually assess, optimize and modernize your estate. This way Txture enables you to share and discuss based on true and centralized information and is ready for your hybrid and multi cloud environment.

aws-cloud-estate-inventoryUse our existing cloud estate importers to immediately visualize deployed cloud services.

Txture and Terraform are a perfect match. As you saw in the example above, Terraform naturally boosts your cloud deployment agility and speed, while Txture is your central platform for generating and modeling cloud target solution architectures and also for maintaining a transparent, up-to-date view on your ever-changing multi cloud services estate.

Get in touch to learn more about Txture and how it can boost your cloud transformation and modernization journey.


Seeing is believing! Feel free to request a demo or contact us for more information!