OpenTofu is already on it’s stable release version 1.6, totally compatible with Terraform, new features which currently doesn’t exist on Terraform are going to start to pop up in OpenTofu from 1.7 onward, I expect.
Let’s do not waste much time and go straight to the point by giving you a simple but 100% people’s use case demo.
For this demonstration I will deploy a storage account in Microsoft Azure using Terraform and take over the deployment with OpenTofu.
Inside my working directory you can see that I have only 1 .tf file for my storage account deployment, typical Terraform HCL deployment, nothing special.
Let’s run the terraform init command:
Let’s run terraform plan command:
As you can see I have 2 resources to be created, 0 changes and 0 to be destroyed, so let’s now run terraform apply:
As result, 2 resources have been deployed in Microsoft Azure , 1 resource group and 1 storage account.
In the image below you can see that we have all files and directories expected from a Terraform deployment, the .terraform and the tfstate file among with the lock.hcl and the .backup.
Let’s start taking it over with OpenTofu by downloading the binary.
Here you will find the link to download the binaries accordingly your OS.
Let’s quickly install it on Linux, here I am using Ubuntu 22.04.
It’s also available on https://snapcraft.io/ for Ubuntu or simply install it by running:
snap install --classic opentofu
After installation if you’re in your deployment directory, without make any changes in your code just run tofu init
and then run tofu plan
You can see that tofu automatically reads the tfstate file and understand that there is nothing to deploy, this is because literally nothing has changed and tofu is compatible with terraform, so far with the version that Terraform was before moving to BSL license, Terraform 1.7, and the idea is indeed to continue compatible with Terraform with a plus of adding features that the community used to request in the past and were not implemented.
Now I will make a small change in my demo.tf file and run a tofu plan:
The change is of course not matching with the current state so tofu now take it over and requests the change.
Now you can run the tofu apply to apply your changes.
You can see now that the change has been applied and you can move on with OpenTofu for your deployments.
Conclusion:
I understand this was a small deployment example, however this is not different on what you will perform on higher scale deployments, OpenTofu is compatible with Terraform and it’s stable, working beautifully, you don’t need to be scared, or if you are, which is totally normal, just wait a little bit until more people start to use it and you see how the market will behave.
Also known as CAF, the Cloud adoption supports you during your cloud journey end-to-end, with CAF you will be able to follow the best practices using tools and templates provided by Microsoft. The official Microsoft’s CAF documentation it’s pretty straight forward and very easy to understand.
Each organization will have their own journey of Cloud Adoption. The idea of this article is to give you a high level overview about the CAF, and give you a direction on how can you begin with. This might be crucial when you’re moving towards the cloud, and here I will share my perspective on how can you start your journey with this framework.
It’s also important to mention that the phases followed in this article is not mandatory, you can start from where your organization requires, and you can always go in and out of the phases whenever is required/needed.
I started to write this article as an end-to-end support, but turned to be extremely huge, therefore I am turning it in a reference article where you can use to have a smooth Cloud Adoption journey reference guide.
Let’s start this journey together.
What is Microsoft CAF ?
The Microsoft CAF is a collection of tools, guidance, templates and bests practices from Microsoft that will guide your organization to take important decisions for the adoption of cloud technologies. The CAF is not only strict to IT department, it also involves other departments such as Finance and Management board from different departments. You not necessarily need to follow this phase sequence, this will depend on your organization maturity level, you can start anywhere in your journey by having the support of the Cloud Journey Tracker or the Strategic Migration Assessment and Readiness Tool, also known as SMART.
Below you can see the phases of CAF. I normally say that Governance starts already together with plan, however management will start with the ready phase onward.
Let’s cover each of the phases in order to have a better understanding.
Strategy
For a successful progress of CAF, you need to start by making an alignment with the organization stakeholders and business leaders, extract from them what do they want to achieve with the cloud adoption.
This is an important moment where you show what are the benefits on this change, explorer the current organization’s pains and transform it in a strategy.
Microsoft has provided 4 steps to help you document your business strategy efficiently.
Understand technical considerations: Discover the technical flexibility, efficiencies, and capabilities that help you build a business case to adopt the cloud
You can use this template to create your strategy and plan with the inputs of each step mentioned above.
Plan
In this phase you can still use the same template used in the strategy plan and start to populate with inputs from these key components below that will bring you to a successful CAF Plan.
Gather the strategic inputs from the previous strategic phase such as motivations, business outcomes and business justification.
Workload Rationalization: Re-host, Refactor, Re-architect, Rebuild and Replace. Rationalization is a big topic, the link here refers to the documentation where you can understand more in depth the difference between them.
You also need to make sure if people have the skills needed for the cloud, in case not this needed to be provided with training, certification, workshops and so on, how the governance is will be defined and how the workloads will be managed once you migrate them.
Gathering all this information and populating accordingly to your document, will enable you move with the progress of the cloud adoption.
Ready
This phase you need to get ready for the cloud adoption, we start here to involve pieces of the management phase aligned with governance. Firstly you need to understand the desired operating models to use, where we have decentralized, centralized, enterprise and distributed.
The ready phase literally means to prepare your Azure environment to receive the deployment or migration, you need to work on the following components:
Setup Azure Environment: Here you need to take decisions on how you will manage the environment resources, billing, costs, security, identity, always making sure you will be compliance to your goal.
Landing Zone: Here you will provide the resources needed to support your networking, security, Identity, monitoring.
Adopt
With the adoptions, it’s time to deploy some production (or not) resources, and the phase will end up in the following 2 categories.
Migration: Here the focus is on migrating the existing workloads to the cloud, it can be lift and shift without any changes or migration with some optimization, which will also end up in the rationalization topic mentioned on the Plan phase.
Innovation: Here you will turn your thoughts on how can you improve the existing solutions, you can make the currently old stack environment on a completely Cloud Native solution following also the best practices of DevOps engineering.
Of course once you migrated everything, it doesn’t mean that you can’t do innovation, that’s the idea of CAF is that you can always go back and in to the framework phases whenever is needed and start to adopt your process accordingly your journey.
I would recommend you start small to support your learning journey.
Governance
When we talk about Governance we are talking about processes used to keep your business compliance running, here we are talking about Identity, policies, management groups, hierarchy and so on.
Microsoft has provided 5 disciplines of Governance to support you on this, and each discipline was created to protect the company from risks.
The image provided below is not necessarily the sequence you might follow, if I would place this in a sequence, I would place the following:
Identity Baseline
Security Baseline
Cost Management
Deployment Acceleration
Resource Consistency
I will also leave the Governance link so you can dive better into it and explore how can you go through your governance decisions.
Management
Well, we started the the adoption, but, how and who will manage it? How can we guarantee the requirements are still matching, how can we guarantee we are still compliance?
Below are some key components you should consider during the management decisions.
Workload criticality: Measuring the workload criticality will allow you to make sure potential risks are going to be mitigated by giving the proper attention to the most critical workloads but also not forgetting the others
Impact: Explore the expectations management, what is the impact if such workload hits a not planned costs? what is the performance expected? Here I would recommend document an initial performance and operations expected to make sure you’re on track.
Cloud Adoption Framework for Azure is a huge topic and demands a lot of work in group, it also means that it’s time to gather with colleagues and share the same motivation, improve the organization, and learn with it.
Microsoft Azure has provided many tools, templates and documentation to support you with that, and don’t worry if everything don’t run smooth at first moment, it’s totally normal, you need to understand that it’s a long journey and there is no end.
As human being we are always improving ourselves, with personal improvements we will always be improving our organizations in different aspects as well, the learning curve, the amount of people we can help, it’s jsut wonderful.
Take your time to read the examples provided by Microsoft , talk internally with your team, understand all the motivation and go for it.
Feel free to drop me a message, I will be more than happy to support you on what I can.
Here you will find a video playlist to enhance your learning curve.