ScalewaySkip to loginSkip to main contentSkip to footer section

ai-PULSE 2024: Reserve your spot now! Nov 7, Paris

Automate your deployment pipeline

A CI/CD pipeline is often triggered by a change in code, eg. a post-commit hook in git. It makes the merge process easier by offering testing, approval and deployment stages. Take this further by integrating Terraform into your workflow to provision your infrastructure, and use complementary tools like Chef, Puppet or Ansible to configure your applications.

Consistency across environments

You can easily reuse the same templates with slightly different variables. The code can automatically serve as a clear description of the desired state of the infrastructure. As a result, it makes it easier onboard new engineers on the projects.

Keep track of any changes

Development and operational teams are using the same source repository. As a result both teams can review and apply changes to them. This lowers the risk of misunderstanding between teams because they all share the same context and see the same files.

Automate your infrastructure deployment with Terraform

Terraform-Schema-1040px-Dark.webp

Tightly manage infrastructure

Authentication

To create new key pairs, navigate to the section “API Tokens” under the credentials tab in your Scaleway console. Scaleway offers 3 ways of providing credentials: static credentials, environment variables and shared configuration file.

Go to console

Execution Plans

Terraform has a “planning” phase, where an execution plan is generated. This execution plan will show what Terraform will do when you call the “apply” command. This step can avoid any surprises when Terraform manipulates infrastructure.

Open source

Scaleway Terraform Provider’s plugin is also open source, hosted on Github and maintained by both our DevOps and the community. This plugin is written in Go, feel free to contribute or to request the development of a new feature.

Resource Graph

Terraform builds a graph of all your resources, and parallelizes the creation and modification of any non-dependent resources. As a result, Terraform builds infrastructure as efficiently as possible so you can get insight into dependencies in your infrastructure.

Change Automation

Complex changesets may be applied to your infrastructure with minimal human interaction. With the above execution plan and resource graph, you know exactly what Terraform will change and in what order, avoiding many possible human errors.

Standards compatibility

Scaleway object storage can be used to store your Terraform state. To do so, configure your backend as a S3-backend. Beware that no locking mechanism is yet supported when storing your tfstate file with a AWS S3-compatible bucket. If you need a locking mechanism, you can also use Scaleway Managed Database.

Infrastructure versioning

Your infrastructure is now explicitly defined as a configuration file and, like any other piece of code, you can version your Terraform repository. Adding a versioning strategy will transform your infrastructure management process and every stake holder will be able to commit and review your code.

Syntax

HCL (HashiCorp Configuration Language) is a configuration language built by HashiCorp. The goal of HCL is to build a structured configuration language that is both human and machine friendly for use with command-line tools, but specifically targeted towards DevOps tools, servers, etc.

Frequently asked questions

What is Terraform?

Terraform is an open-source Infrastructure as Code software tool created by HashiCorp It has been designed for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers such as Scaleway but also many others like AWS, AZURE, GCP, OpenStack or even custom in-house solutions.

How Terraform works?

Terraform generates an execution plan describing exactly what the tool will do to reach the desired state. Terraform will then execute this plan to build the described infrastructure. As the configuration changes, Terraform is able to determine what changed and create incremental execution plans which can be applied.

What is a terraform provider?

Terraform is used to create, manage, and update infrastructure resources such as Virtual Machines (Development Instances, General Purposes Instances or GPU Instances), network Load Balancers, containers orchestrators (Kubernetes Kapusle), and more. A provider is responsible for understanding API interactions and exposing resources.

Can I deploy multi-cloud infrastructures with Terraform?

Yes, Terraform supports multi-cloud configuration. This allows you to manage infrastructures and resources from multiple cloud providers using a unique tool for efficient deploying, changing, and versioning.

What happens if I make changes to an infrastructure managed by Terraform from outside of Terraform?

Terraform is designed to manage your infrastructure. If you make manual changes to it, they will be overwritten next time you apply the Terraform configuration. To avoid this behaviour, add the “ignore_changes” parameter to the resource in the configuration file.

Can I store my tfstate file in the cloud?

Yes, you can store your Terraform state file on Scaleway Object Storage by using the S3 Backend

How can I talk with the Terraform team?

Feel free to join the Scaleway Slack Community. We can be found hanging out on the #terraform channel.