pixel
Select Page

Terraform

Infrastructure as Code

Terraform enables the user to develop his configuration in a simple syntax and then to roll it out in different environments.

Terraform

Modern Infrastructure as Code

With Terraform from HashiCorp, you can create, modify and improve infrastructures securely and comprehensibly.

Terraform abstracts the APIs of different manufactures with so-called providers. This way, the configuration of your infrastructure can be documented audit-proof and shared and edited by all team members.

Transparent. Automated. Safe.

Features

Reproducible infrastructure at any time

Terraform allows users to develop their configuration in a simple syntax and then roll it out in different environments.

In doing so, it creates an execution plan that determines all changes before the actual start and thus simplifies the verification of the own configuration.

l

Write

The declarative description of resources and their retention also allows larger teams to work together on an environment and to ensure a revision-proof state.

Of course, the simple syntax of Terraform can also be created and edited automatically.

Plan

Even before the desired configuration is executed, the planned changes can be analyzed in detail. So you will experience no evil surprises later and can correct errors immediately.

Of course, this also applies to different environments such as development, staging and production.

Create

Terraform ensures that all described resources and dependencies are resolved and created or removed in the correct order.

Different providers for eg OpenStack, AWS or Icinga can be described in one configuration and used at the same time.

Examples

Creation of resources with Terraform

With the help of different providers for Terraform, it is very easy to connect to one or more public cloud manufactures.

The required attributes depend on the respective provider.

# Configure the OpenStack Provider
provider "openstack" {
  user_name   = "admin"
  tenant_name = "admin"
  password    = "pwd"
  auth_url    = "http://cloud.netways.de:5000/v3"
  region      = "RegionOne"
}
Then the required resources, in this example VMs, can be created. The configuration of image, number and regions can be individually adjusted.

Various providers can be used at will. Terraform take care of the rest.

# Create a web server
resource "openstack_compute_instance_v2" "test-server" {
  count = "2"
  image_name = "CentOS7"
  availability_zone = "AZ1"
  flavor_id = "5"
  security_groups = ["default"]
  network {
    name = "public"
  }
  user_data = "${file("bootstrapweb.sh")}"
}

News

Articles from our Blog

Webinars

Our webinar archive for Terraform

Service from the market leader

We are happy to bring you our experience from countless Terraform projects. Whether professional services, training or support for your environment.