Merge pull request #30399 from hashicorp/add-new-intro-docs
Revamp Into to Terraform
This commit is contained in:
commit
fb4b5c4d81
|
@ -3,12 +3,13 @@
|
||||||
{ "title": "What is Terraform?", "path": "" },
|
{ "title": "What is Terraform?", "path": "" },
|
||||||
{ "title": "Use Cases", "path": "use-cases" },
|
{ "title": "Use Cases", "path": "use-cases" },
|
||||||
{
|
{
|
||||||
"title": "Getting Started",
|
"title": "Get Started",
|
||||||
"href": "https://learn.hashicorp.com/collections/terraform/aws-get-started?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS"
|
"href": "https://learn.hashicorp.com/collections/terraform/aws-get-started?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS"
|
||||||
},
|
},
|
||||||
|
{ "title": "Terraform Editions", "path": "terraform-editions" },
|
||||||
{ "title": "The Core Terraform Workflow", "path": "core-workflow" },
|
{ "title": "The Core Terraform Workflow", "path": "core-workflow" },
|
||||||
{
|
{
|
||||||
"title": "Terraform vs. Other",
|
"title": "Terraform vs. Alternatives",
|
||||||
"routes": [
|
"routes": [
|
||||||
{ "title": "Overview", "path": "vs" },
|
{ "title": "Overview", "path": "vs" },
|
||||||
{ "title": "Chef, Puppet, etc.", "path": "vs/chef-puppet" },
|
{ "title": "Chef, Puppet, etc.", "path": "vs/chef-puppet" },
|
||||||
|
|
|
@ -1,38 +1,65 @@
|
||||||
---
|
---
|
||||||
page_title: Introduction
|
layout: "intro"
|
||||||
description: >-
|
page_title: "What is Terraform"
|
||||||
Learn what Terraform is, what problems it can solve, and how it compares to
|
sidebar_current: "what"
|
||||||
existing software.
|
description: |-
|
||||||
|
Terraform is an infrastructure as code tool that lets you build, change, and version cloud and on-prem resources safely and efficiently.
|
||||||
---
|
---
|
||||||
|
# What is Terraform?
|
||||||
|
|
||||||
# Introduction to Terraform
|
HashiCorp Terraform is an infrastructure as code tool that lets you define both cloud and on-prem resources in human-readable configuration files that you can version, reuse, and share. You can then use a consistent workflow to provision and manage all of your infrastructure throughout its lifecycle. Terraform can manage low-level components like compute, storage, and networking resources, as well as high-level components like DNS entries and SaaS features.
|
||||||
|
|
||||||
Terraform is an infrastructure as code (IaC) tool that allows you to build, change, and version infrastructure safely and efficiently. This includes low-level components such as compute instances, storage, and networking, as well as high-level components such as DNS entries, SaaS features, etc. Terraform can manage both existing service providers and custom in-house solutions.
|
> **Hands On:** Try the Get Started tutorials on HashiCorp Learn to start managing infrastructure on popular cloud providers: [Amazon Web Services](https://learn.hashicorp.com/collections/terraform/aws-get-started), [Azure](https://learn.hashicorp.com/collections/terraform/azure-get-started), [Google Cloud Platform](https://learn.hashicorp.com/collections/terraform/gcp-get-started), [Oracle Cloud Infrastructure](https://learn.hashicorp.com/collections/terraform/oci-get-started), and [Docker](https://learn.hashicorp.com/collections/terraform/docker-get-started).
|
||||||
|
|
||||||
Below, HashiCorp co-founder and CTO Armon Dadgar describes how Terraform can help solve common infrastructure challenges.
|
## How does Terraform work?
|
||||||
|
Terraform creates and manages resources on cloud platforms and other services through their application programming interfaces (APIs). Providers enable Terraform to work with virtually any platform or service with an accessible API.
|
||||||
|
|
||||||
<iframe src="https://www.youtube.com/embed/h970ZBgKINg" frameBorder={0} allowFullScreen width={560} height={315} />
|
![Terraform creates and manages cloud platforms and services through their APIs](/images/intro-terraform-apis.png)
|
||||||
|
|
||||||
## Key Features
|
HashiCorp and the Terraform community have already written **more than 1700 providers** to manage thousands of different types of resources and services, and this number continues to grow. You can find all publicly available providers on the [Terraform Registry](https://registry.terraform.io/), including Amazon Web Services (AWS), Azure, Google Cloud Platform (GCP), Kubernetes, Helm, GitHub, Splunk, DataDog, and many more.
|
||||||
|
|
||||||
### Infrastructure as Code
|
The core Terraform workflow consists of three stages:
|
||||||
|
|
||||||
You describe your infrastructure using Terraform's high-level [configuration language](/language) in human-readable, declarative configuration files. This allows you to create a blueprint that you can version, share, and reuse.
|
- **Write:** You define resources, which may be across multiple cloud providers and services. For example, you might create a configuration to deploy an application on virtual machines in a virtual private cloud (VPC) network with security groups and a load balancer.
|
||||||
|
- **Plan:** Terraform creates an execution plan describing the infrastructure it will create, update, or destroy based on the existing infrastructure and your configuration.
|
||||||
|
- **Apply:** On approval, Terraform performs the proposed operations in the correct order, respecting any resource dependencies. For example, if you update the properties of a VPC and change the number of virtual machines in that VPC, Terraform will recreate the VPC before scaling the virtual machines.
|
||||||
|
|
||||||
### Execution Plans
|
![The Terraform workflow has three steps: Write, Plan, and Apply](/images/intro-terraform-workflow.png)
|
||||||
|
|
||||||
Terraform generates an _execution plan_ describing what it will do and asks for your approval before making any infrastructure changes. This allows you to review changes before Terraform creates, updates, or destroys infrastructure.
|
|
||||||
|
|
||||||
### Resource Graph
|
## Why Terraform?
|
||||||
|
|
||||||
Terraform builds a resource graph and creates or modifies non-dependent resources in parallel. This allows Terraform to build resources as efficiently as possible and gives you greater insight into your infrastructure.
|
HashiCorp co-founder and CTO Armon Dadgar explains how Terraform solves infrastructure challenges.
|
||||||
|
|
||||||
### Change Automation
|
<iframe src="https://www.youtube.com/embed/h970ZBgKINg" frameborder="0" allowfullscreen="true" width="560" height="315" ></iframe>
|
||||||
|
|
||||||
Terraform can apply complex changesets to your infrastructure with minimal human interaction. When you update configuration files, Terraform determines what changed and creates incremental execution plans that respect dependencies.
|
|
||||||
|
|
||||||
## Next Steps
|
### Manage any infrastructure
|
||||||
|
|
||||||
- Learn about common [Terraform use cases](/intro/use-cases).
|
Find providers for many of the platforms and services you already use in the [Terraform Registry](https://registry.terraform.io/). You can also [write your own](/plugin). Terraform takes an [immutable approach to infrastructure](https://www.hashicorp.com/resources/what-is-mutable-vs-immutable-infrastructure), reducing the complexity of upgrading or modifying your services and infrastructure.
|
||||||
- Learn [how Terraform compares to and complements other tools](/intro/vs).
|
|
||||||
- Try the [Terraform: Get Started](https://learn.hashicorp.com/collections/terraform/aws-get-started) tutorials on HashiCorp Learn.
|
### Track your infrastructure
|
||||||
|
|
||||||
|
Terraform generates a plan and prompts for your approval before modifying your infrastructure. It also keeps track of your real infrastructure in a [state file](/language/state), which acts as a source of truth for your environment. Terraform uses the state file to determine the changes to make to your infrastructure so that it will match your configuration.
|
||||||
|
|
||||||
|
### Automate changes
|
||||||
|
|
||||||
|
Terraform configuration files are declarative, meaning that they describe the end state of your infrastructure. You do not need to write step-by-step instructions to create resources because Terraform handles the underlying logic. Terraform builds a resource graph to determine resource dependencies and creates or modifies non-dependent resources in parallel. This allows Terraform to build resources efficiently.
|
||||||
|
|
||||||
|
### Standardize configurations
|
||||||
|
|
||||||
|
Terraform supports reusable configuration components called [modules](/docs/language/modules) that define configurable collections of infrastructure, saving time and enforcing best practices. You can use publicly available modules from the Terraform Registry, or write your own.
|
||||||
|
|
||||||
|
### Collaborate
|
||||||
|
|
||||||
|
Since your configuration is codified, you can commit it to a version control system (VCS) and use [Terraform Cloud](/intro/terraform-editions#terraform-cloud) to efficiently manage Terraform workflows across teams. Terraform Cloud runs Terraform in a consistent, reliable environment and provides secure access to shared state and secret data, role-based access controls, a private registry for sharing both modules and providers, and more.
|
||||||
|
|
||||||
|
-> **Tip:** Learn more about [Terraform use cases](/intro/use-cases) and [how Terraform compares to alternatives](/intro/vs).
|
||||||
|
|
||||||
|
## Community
|
||||||
|
|
||||||
|
We welcome questions, suggestions, and contributions from the community.
|
||||||
|
|
||||||
|
- Ask questions in [HashiCorp Discuss](https://discuss.hashicorp.com/c/terraform-core/27).
|
||||||
|
- Read our [contributing guide](https://github.com/hashicorp/terraform/blob/main/.github/CONTRIBUTING.md).
|
||||||
|
- [Submit an issue](https://github.com/hashicorp/terraform/issues/new/choose) for bugs and feature requests.
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
---
|
||||||
|
layout: "intro"
|
||||||
|
page_title: "Terraform Editions"
|
||||||
|
sidebar_current: "what"
|
||||||
|
description: |-
|
||||||
|
Terraform Open Source, Terraform Cloud, and Terraform Enterprise solve increasingly complex infrastructure and collaboration challenges.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Terraform Editions
|
||||||
|
|
||||||
|
As your organization adopts infrastructure as code (IaC), you will encounter increasingly complex technical and collaboration challenges. We offer three Terraform editions designed to help you solve them.
|
||||||
|
|
||||||
|
## Terraform Open Source
|
||||||
|
|
||||||
|
Terraform open source is a free, downloadable tool that you interact with on the command line. It lets you provision infrastructure on any cloud provider and manages configuration, plugins, infrastructure, and state.
|
||||||
|
|
||||||
|
### Why Terraform Open Source?
|
||||||
|
|
||||||
|
Terraform open source lets you:
|
||||||
|
|
||||||
|
- Adopt infrastructure as code and use a common configuration language to provision thousands of different types of resources and services.
|
||||||
|
- Codify your infrastructure so that you can check configuration files into a version control system (VCS) to safely manage contributions. Manually pull the most up-to-date version to perform Terraform operations.
|
||||||
|
- Use and publish public infrastructure templates called modules to implement industry and organization best practices, group your infrastructure into logically-related components, and deploy infrastructure more quickly.
|
||||||
|
|
||||||
|
|
||||||
|
### Resources
|
||||||
|
|
||||||
|
- Get Started collections on HashiCorp Learn for popular providers: [Amazon Web Services](https://learn.hashicorp.com/collections/terraform/aws-get-started), [Azure](https://learn.hashicorp.com/collections/terraform/azure-get-started), [Google Cloud Platform](https://learn.hashicorp.com/collections/terraform/gcp-get-started), [Oracle Cloud Infrastructure](https://learn.hashicorp.com/collections/terraform/oci-get-started), and [Docker](https://learn.hashicorp.com/collections/terraform/docker-get-started)
|
||||||
|
- [What is Terraform?](/intro)
|
||||||
|
- [Configuration Language Documentation](/docs/language/index.html)
|
||||||
|
- [CLI Documentation](/docs/cli/index.html)
|
||||||
|
|
||||||
|
## Terraform Cloud
|
||||||
|
|
||||||
|
Terraform Cloud is a SaaS application that runs Terraform in a stable, remote environment and securely stores state and secrets. It includes a rich user interface that helps you better understand your Terraform operations and resources, allows you to define role-based access controls, and offers a private registry for sharing modules and providers. Terraform Cloud also integrates with the Terraform CLI and connects to common version control systems (VCS) like GitHub, GitLab, and Bitbucket. When you connect a Terraform Cloud workspace to a VCS repository, new commits and changes can automatically trigger Terraform plans. Terraform Cloud also offers an API, allowing you to integrate it into existing workflows.
|
||||||
|
|
||||||
|
Many Terraform Cloud features are free for small teams; we offer paid plans for larger organizations with additional collaboration and governance features.
|
||||||
|
|
||||||
|
### Why Terraform Cloud?
|
||||||
|
|
||||||
|
Terraform Cloud lets you:
|
||||||
|
|
||||||
|
- Run Terraform from the local CLI or in a remote environment, trigger operations through your version control system, or use an API to integrate Terraform Cloud into your existing workflows.
|
||||||
|
- Ensure that only approved teams can access, edit, and provision infrastructure with Terraform Cloud workspaces, single sign-on, and role-based access controls.
|
||||||
|
- Securely store and version Terraform state remotely, with encryption at rest. Versioned state files allow you to access state file history.
|
||||||
|
- Publish configuration modules in the Terraform Cloud private registry that define approved infrastructure patterns. For example, a module may allow users to choose the cloud provider on which to deploy their Java application. This allows consumers to implement your organization’s best practices without becoming infrastructure or cloud experts.
|
||||||
|
- Enforce best practices and security rules with the Sentinel embedded policy as code framework. For example, policies may restrict regions for production deployments.
|
||||||
|
|
||||||
|
### Resources
|
||||||
|
|
||||||
|
- [Create a Terraform Cloud Account](https://app.terraform.io/signup/account)
|
||||||
|
- [Terraform Cloud Documentation](/docs/cloud/index.html)
|
||||||
|
- [Sentinel Documentation](/cloud-docs/sentinel)
|
||||||
|
- [Get Started - Terraform Cloud](https://learn.hashicorp.com/collections/terraform/cloud-get-started) tutorials show you how to manage infrastructure using Terraform Cloud's VCS integration
|
||||||
|
|
||||||
|
## Terraform Enterprise
|
||||||
|
|
||||||
|
Terraform Enterprise allows you to set up a self-hosted distribution of Terraform Cloud. It offers customizable resource limits and is ideal for organizations with strict security and compliance requirements.
|
||||||
|
|
||||||
|
### Why Terraform Enterprise?
|
||||||
|
|
||||||
|
Terraform Enterprise lets you:
|
||||||
|
|
||||||
|
- Set up a private instance of Terraform Cloud with dedicated support from HashiCorp.
|
||||||
|
- Accommodate advanced security and compliance requirements. Terraform Enterprise supports several types of installations, including air gapped and active/active architecture, and allows private networking and job scaling for better performance.
|
||||||
|
|
||||||
|
### Resources
|
||||||
|
- [Terraform Pricing](https://www.hashicorp.com/products/terraform/pricing)
|
||||||
|
- [Terraform Enterprise Documentation](/docs/enterprise/index.html)
|
||||||
|
- [Recommended Enterprise Patterns](https://learn.hashicorp.com/collections/terraform/recommended-patterns) guides
|
|
@ -1,100 +1,92 @@
|
||||||
---
|
---
|
||||||
page_title: Use Cases
|
layout: "intro"
|
||||||
description: >-
|
page_title: "Use Cases"
|
||||||
Learn common use cases for Terraform including managing Heroku apps,
|
sidebar_current: "use-cases"
|
||||||
self-service clusters, and multi-cloud deployments.
|
description: |-
|
||||||
|
Learn how Terraform enables multi-cloud deployments, application management, policy compliance, and self-service infrastructure.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Use Cases
|
# Use Cases
|
||||||
|
|
||||||
This page lists a subset of use cases for [Terraform](/intro).
|
[HashiCorp Terraform](/intro/index.html) is an infrastructure as code tool that lets you define infrastructure resources in human-readable configuration files that you can version, reuse, and share. You can then use a consistent workflow to safely and efficiently provision and manage your infrastructure throughout its lifecycle.
|
||||||
|
|
||||||
|
This page describes popular Terraform use cases and provides related resources that you can use to create Terraform configurations and workflows.
|
||||||
|
|
||||||
## Multi-Cloud Deployment
|
## Multi-Cloud Deployment
|
||||||
|
Provisioning infrastructure across multiple clouds increases fault-tolerance, allowing for more graceful recovery from cloud provider outages. However, multi-cloud deployments add complexity because each provider has its own interfaces, tools, and workflows. Terraform lets you use the same workflow to manage multiple providers and handle cross-cloud dependencies. This simplifies management and orchestration for large-scale, multi-cloud infrastructures.
|
||||||
|
|
||||||
It's often attractive to spread infrastructure across multiple clouds to
|
### Resources
|
||||||
increase fault-tolerance. By using only a single region or cloud provider,
|
|
||||||
fault tolerance is limited by the availability of that provider. Multi-cloud
|
|
||||||
deployment allows for more graceful recovery of the loss of a region or entire
|
|
||||||
provider.
|
|
||||||
|
|
||||||
Realizing multi-cloud deployments can be very challenging as many existing
|
- Try our [Deploy Federated Multi-Cloud Kubernetes Clusters](https://learn.hashicorp.com/tutorials/terraform/multicloud-kubernetes) tutorial to provision Kubernetes clusters in both Azure and AWS environments, configure Consul federation with mesh gateways across the two clusters, and deploy microservices across the two clusters to verify federation.
|
||||||
tools for infrastructure management are cloud-specific. Terraform is
|
- Browse the [Terraform Registry](https://registry.terraform.io/browse/providers) to find thousands of publicly available providers.
|
||||||
cloud-agnostic and allows a single configuration to be used to manage multiple
|
|
||||||
providers, and to even handle cross-cloud dependencies. This simplifies
|
|
||||||
management and orchestration, helping operators build large-scale multi-cloud
|
|
||||||
infrastructures.
|
|
||||||
|
|
||||||
> **Hands-on:** Try the [Deploy Federated Multi-Cloud Kubernetes Clusters](https://learn.hashicorp.com/tutorials/terraform/multicloud-kubernetes) tutorial on HashiCorp Learn.
|
|
||||||
|
|
||||||
## Heroku App Setup
|
## Application Infrastructure Deployment, Scaling, and Monitoring Tools
|
||||||
|
|
||||||
Heroku is a popular PaaS for hosting web apps. Developers create an app, and then attach add-ons, such as a database, or email provider. One of the best features is the ability to elastically scale the number of dynos or workers. However, most non-trivial applications quickly need many add-ons and external services.
|
You can use Terraform to efficiently deploy, release, scale, and monitor infrastructure for multi-tier applications. N-tier application architecture lets you scale application components independently and provides a separation of concerns. An application could consist of a pool of web servers that use a database tier, with additional tiers for API servers, caching servers, and routing meshes. Terraform allows you to manage the resources in each tier together, and automatically handles dependencies between tiers. For example, Terraform will deploy a database tier before provisioning the web servers that depend on it.
|
||||||
|
|
||||||
You can use Terraform to codify the setup required for a Heroku application, ensuring that all the required add-ons are available, but it can go even further: configuring DNSimple to set a CNAME, or setting up Cloudflare as a CDN for the app. Best of all, Terraform can do all of this in under 30 seconds without using a web interface.
|
### Resources
|
||||||
|
|
||||||
## Multi-Tier Applications
|
- Try our [Automate Monitoring with the Terraform Datadog Provider](https://learn.hashicorp.com/tutorials/terraform/datadog-provider?in=terraform/applications) tutorial to deploy a demo Nginx application to a Kubernetes cluster with Helm and install the Datadog agent across the cluster. The Datadog agent reports the cluster health back to your Datadog dashboard.
|
||||||
|
- Try our [Use Application Load Balancers for Blue-Green and Canary Deployments](https://learn.hashicorp.com/tutorials/terraform/blue-green-canary-tests-deployments) tutorial. You will provision the blue and green environments, add feature toggles to your Terraform configuration to define a list of potential deployment strategies, conduct a canary test, and incrementally promote your green environment.
|
||||||
|
|
||||||
A very common pattern is the N-tier architecture. The most common 2-tier architecture is
|
|
||||||
a pool of web servers that use a database tier. Additional tiers get added for API servers,
|
|
||||||
caching servers, routing meshes, etc. This pattern is used because the tiers can be scaled
|
|
||||||
independently and provide a separation of concerns.
|
|
||||||
|
|
||||||
Terraform is an ideal tool for building and managing these infrastructures. You can group resources in each tier together, and Terraform will automatically handle the dependencies between each tier. For example, Terraform will ensure the database tier is available before provisioning the web servers and that the load balancers are connected to the web nodes. You can then use Terraform to easily scale each tier by modifying the `count` configuration value. Because resource creation and provisioning is codified and automated, elastically scaling
|
|
||||||
with load becomes trivial.
|
|
||||||
|
|
||||||
## Self-Service Clusters
|
## Self-Service Clusters
|
||||||
|
|
||||||
At a certain organizational size, it becomes very challenging for a centralized
|
At a large organization, your centralized operations team may get many repetitive infrastructure requests. You can use Terraform to build a "self-serve" infrastructure model that lets product teams manage their own infrastructure independently. You can create and use Terraform modules that codify the standards for deploying and managing services in your organization, allowing teams to efficiently deploy services in compliance with your organization’s practices. Terraform Cloud can also integrate with ticketing systems like ServiceNow to automatically generate new infrastructure requests.
|
||||||
operations team to manage a large and growing infrastructure. Instead it becomes
|
|
||||||
more attractive to make "self-serve" infrastructure, allowing product teams to
|
|
||||||
manage their own infrastructure using tooling provided by the central operations team.
|
|
||||||
|
|
||||||
You can use Terraform configuration to codify the knowledge of how to build and scale a service. You can then share these configurations throughout your organization, enabling customer teams to use Terraform to manage their services.
|
### Resources
|
||||||
|
|
||||||
## Software Demos
|
- Try the [Use Modules from the Registry](https://learn.hashicorp.com/tutorials/terraform/module-use?in=terraform/modules) tutorial to get started using public modules in your Terraform configuration.
|
||||||
|
Try the [Build and Use a Local Module](https://learn.hashicorp.com/tutorials/terraform/module-create?in=terraform/modules) tutorial on HashiCorp Learn to create a module to manage AWS S3 buckets.
|
||||||
|
- Follow these [ServiceNow Service Catalog Integration Setup Instructions](/cloud-docs/integrations/service-now) to connect ServiceNow to Terraform Cloud.
|
||||||
|
|
||||||
Modern software is increasingly networked and distributed. Although tools like
|
|
||||||
[Vagrant](https://www.vagrantup.com/) exist to build virtualized environments
|
|
||||||
for demos, it is still very challenging to demo software on real infrastructure
|
|
||||||
which more closely matches production environments.
|
|
||||||
|
|
||||||
Software writers can provide a Terraform configuration to create, provision and
|
## Policy Compliance and Management
|
||||||
bootstrap a demo on cloud providers like AWS. This allows end users to easily demo the software on their own infrastructure, and even enables tweaking parameters like cluster size to more rigorously test tools at any scale.
|
|
||||||
|
|
||||||
## Disposable Environments
|
Terraform can help you enforce policies on the types of resources teams can provision and use. Ticket-based review processes are a bottleneck that can slow down development. Instead, you can use Sentinel, a policy-as-code framework, to automatically enforce compliance and governance policies before Terraform makes infrastructure changes. Sentinel is available with the [Terraform Cloud team and governance](https://www.hashicorp.com/products/terraform/pricing) tier.
|
||||||
|
|
||||||
It is common practice to have both a production and staging or QA environment.
|
### Resources
|
||||||
These environments are smaller clones of their production counterpart, but are
|
|
||||||
used to test new applications before releasing in production. As the production
|
- Try the [Control Costs with Policies](https://learn.hashicorp.com/tutorials/terraform/cost-estimation) tutorial on HashiCorp Learn to estimate the cost of infrastructure changes and define policy to limit it.
|
||||||
environment grows larger and more complex, it becomes increasingly onerous to
|
|
||||||
maintain an up-to-date staging environment.
|
- The [Sentinel documentation](/docs/cloud/sentinel/index.html) provides more in-depth information and a list of example policies that you can adapt for your use cases.
|
||||||
|
|
||||||
|
|
||||||
|
## PaaS Application Setup
|
||||||
|
Platform as a Service (PaaS) vendors like Heroku allow you to create web applications and attach add-ons, such as databases or email providers. Heroku can elastically scale the number of dynos or workers, but most non-trivial applications need many add-ons and external services. You can use Terraform to codify the setup required for a Heroku application, configure a DNSimple to set a CNAME, and set up Cloudflare as a Content Delivery Network (CDN) for the app. Terraform can quickly and consistently do all of this without a web interface.
|
||||||
|
|
||||||
|
### Resources
|
||||||
|
|
||||||
|
Try the [Deploy, Manage, and Scale an Application on Heroku](https://learn.hashicorp.com/tutorials/terraform/heroku-provider?in=terraform/applications) tutorial on HashiCorp Learn manage an application’s lifecycle with Terraform.
|
||||||
|
|
||||||
Using Terraform, the production environment can be codified and then shared with
|
|
||||||
staging, QA or dev. These configurations can be used to rapidly spin up new
|
|
||||||
environments to test in, and then be easily disposed of. Terraform can help tame
|
|
||||||
the difficulty of maintaining parallel environments, and makes it practical
|
|
||||||
to elastically create and destroy them.
|
|
||||||
|
|
||||||
## Software Defined Networking
|
## Software Defined Networking
|
||||||
|
|
||||||
Software Defined Networking (SDN) is becoming increasingly prevalent in the
|
Terraform can interact with Software Defined Networks (SDNs) to automatically configure the network according to the needs of the applications running in it. This lets you move from a ticket-based workflow to an automated one, reducing deployment times.
|
||||||
datacenter, as it provides more control to operators and developers and
|
|
||||||
allows the network to better support the applications running on top. Most SDN
|
|
||||||
implementations have a control layer and infrastructure layer.
|
|
||||||
|
|
||||||
You can use Terraform to codify the configuration for software defined networks.
|
For example, when a service registers with [HashiCorp Consul](https://www.consul.io/), [Consul-Terraform-Sync](https://www.consul.io/docs/nia) can automatically generate Terraform configuration to expose appropriate ports and adjust network settings for any SDN that has an associated Terraform provider. Network Infrastructure Automation (NIA) allows you to safely approve the changes that your applications require, without having to manually translate tickets from developers into the changes you think their applications need.
|
||||||
Terraform can then use this configuration to automatically set up and modify settings by interfacing with the control layer. This allows the configuration to be
|
|
||||||
versioned and changes to be automated. For example, you can [use Terraform to configure AWS VPC](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc).
|
|
||||||
|
|
||||||
## Resource Schedulers
|
### Resources
|
||||||
|
|
||||||
In large-scale infrastructures, static assignment of applications to machines
|
- Try the [Network Infrastructure Automation with Consul-Terraform-Sync Intro](https://learn.hashicorp.com/tutorials/consul/consul-terraform-sync-intro?in=consul/network-infrastructure-automation) tutorial on Hashicorp Learn to install Consul-Terraform-Sync on a node. You will then configure it to communicate with a Consul datacenter, react to service changes, and execute an example task.
|
||||||
becomes increasingly challenging. To solve that problem, there are a number
|
- Try the [Consul-Terraform-Sync and Terraform Enterprise/Cloud Integration](https://learn.hashicorp.com/tutorials/consul/consul-terraform-sync-terraform-enterprise?in=consul/network-infrastructure-automation) tutorial on HashiCorp Learn to configure Consul-Terraform-Sync to interact with Terraform Enterprise and Terraform Cloud.
|
||||||
of schedulers like Borg, Mesos, YARN, and Kubernetes. These can be used to
|
|
||||||
dynamically schedule Docker containers, Hadoop, Spark, and many other software
|
|
||||||
tools.
|
|
||||||
|
|
||||||
Terraform is not limited to physical providers like AWS. Resource schedulers
|
|
||||||
can be treated as a provider, enabling Terraform to request resources from them.
|
## Kubernetes
|
||||||
This allows Terraform to be used in layers: to setup the physical infrastructure
|
|
||||||
running the schedulers as well as provisioning onto the scheduled grid.
|
Kubernetes is an open-source workload scheduler for containerized applications. Terraform lets you both deploy a Kubernetes cluster and manage its resources (e.g., pods, deployments, services, etc.). You can also use the [Kubernetes Operator for Terraform](https://github.com/hashicorp/terraform-k8s) to manage cloud and on-prem infrastructure through a Kubernetes custom resource definition (CRD) and Terraform Cloud.
|
||||||
|
|
||||||
|
### Resources
|
||||||
|
|
||||||
|
- Try the [Manage Kubernetes Resources via Terraform](https://learn.hashicorp.com/tutorials/terraform/kubernetes-provider?in=terraform/kubernetes) tutorial on HashiCorp Learn. You will use Terraform to schedule and expose a NGINX deployment on a Kubernetes cluster.
|
||||||
|
- Try the [Deploy Infrastructure with the Terraform Cloud Operator for Kubernetes](https://learn.hashicorp.com/tutorials/terraform/kubernetes-operator) tutorial on HashiCorp Learn. You will configure and deploy the Operator to a Kubernetes cluster and use it to create a Terraform Cloud workspace and provision a message queue for an example application.
|
||||||
|
|
||||||
|
|
||||||
|
## Parallel Environments
|
||||||
|
|
||||||
|
You may have staging or QA environments that you use to test new applications before releasing them in production. As the production environment grows larger and more complex, it can be increasingly difficult to maintain an up-to-date environment for each stage in the development process. Terraform lets you rapidly spin up and decommission infrastructure for development, test, QA, and production. Using Terraform to create disposable environments as needed is more cost-efficient than maintaining each one indefinitely.
|
||||||
|
|
||||||
|
|
||||||
|
## Software Demos
|
||||||
|
You can use Terraform to create, provision, and bootstrap a demo on various cloud providers. This lets end users easily try the software on their own infrastructure and even enables them to adjust parameters like cluster size to more rigorously test tools at any scale.
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
---
|
---
|
||||||
page_title: Terraform vs. Other Software
|
page_title: Terraform vs. Alternatives
|
||||||
description: An overview of how Terraform compares to other software and tools.
|
description: An overview of how Terraform compares to alternative software and tools.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Terraform vs. Other Software
|
# Terraform vs. Alternatives
|
||||||
|
|
||||||
Terraform provides a flexible abstraction of resources and providers. This model
|
Terraform provides a flexible abstraction of resources and providers. This model
|
||||||
allows for representing everything from physical hardware, virtual machines, and
|
allows for representing everything from physical hardware, virtual machines, and
|
||||||
|
@ -14,5 +14,9 @@ to a number of these tools, but it should be noted that Terraform is not mutuall
|
||||||
exclusive with other systems. It can be used to manage a single application, or the
|
exclusive with other systems. It can be used to manage a single application, or the
|
||||||
entire datacenter.
|
entire datacenter.
|
||||||
|
|
||||||
Use the navigation on the left to read comparisons of Terraform versus other
|
Learn how Terraform compares to:
|
||||||
specific systems.
|
|
||||||
|
- [Chef, Puppet, etc.](/intro/vs/chef-puppet)
|
||||||
|
- [CloudFormation, Heat, etc.](/intro/vs/cloudformation)
|
||||||
|
- [Boto, Fog, etc.](/intro/vs/boto)
|
||||||
|
- [Custom Solutions](/intro/vs/custom)
|
||||||
|
|
Loading…
Reference in New Issue