menu
arrow_back
Atrás

Infrastructure as Code with Terraform

—/100

Checkpoints

arrow_forward

Creating Resources in terraform

Change Infrastructure

Destructive Changes

Create Resource Dependencies

Infrastructure as Code with Terraform

1 hora 5 créditos

This lab was developed with our partner, Hashicorp. Your personal information may be shared with Hashicorp, the lab sponsor, if you have opted-in to receive product updates, announcements, and offers in your Account Profile.

GSP750

Google Cloud Self-Paced Labs

Overview

Terraform is the infrastructure as code offering from HashiCorp. It is a tool for building, changing, and managing infrastructure in a safe, repeatable way. Operators and Infrastructure teams can use Terraform to manage environments with a configuration language called the HashiCorp Configuration Language (HCL) for human-readable, automated deployments.

Infrastructure as code is the process of managing infrastructure in a file or files rather than manually configuring resources in a user interface. A resource in this instance is any piece of infrastructure in a given environment, such as a virtual machine, security group, network interface, etc. At a high level, Terraform allows operators to use HCL to author files containing definitions of their desired resources on almost any provider (AWS, Google Cloud, GitHub, Docker, etc.) and automates the creation of those resources at the time of apply.

A simple workflow for deployment will follow closely to the steps below:

  • Scope - Confirm what resources need to be created for a given project.

  • Author - Create the configuration file in HCL based on the scoped parameters.

  • Initialize - Run terraform init in the project directory with the configuration files. This will download the correct provider plug-ins for the project.

  • Plan & Apply - Run terraform plan to verify creation process and then terraform apply to create real resources as well as the state file that compares future changes in your configuration files to what actually exists in your deployment environment.

Objectives

In this lab you will learn how to perform the following tasks:

  • Build, change, and destroy infrastructure with Terraform

  • Create Resource Dependencies with Terraform

  • Provision infrastructure with Terraform

Únase a Qwiklabs para leer este lab completo… y mucho más.

  • Obtenga acceso temporal a Google Cloud Console.
  • Más de 200 labs para principiantes y niveles avanzados.
  • El contenido se presenta de a poco para que pueda aprender a su propio ritmo.
Únase para comenzar este lab