New Terraform Tutorial: Terraform Data Sources
Learn how to query remote data sources with Terraform in this new tutorial added to HashiCorp Learn.
HashiCorp Terraform uses providers to manage cloud infrastructure, which you define in Terraform configuration files. When learning to use Terraform, practitioners focus on resource blocks, which map to infrastructure that Terraform will manage.
In addition to resources, Terraform providers can also define data sources. Terraform uses data sources to fetch information from cloud provider APIs, such as disk image IDs, or information about the rest of your infrastructure through the outputs of other Terraform configurations. Data sources represent data that Terraform queries from the same cloud provider APIs that it uses to provision resources.
You can make your Terraform projects more flexible by using data sources to query your cloud provider for information.
» Get Hands-on with Data Sources
In this tutorial, you will provision a web application with Terraform, and use data sources to configure it to support multiple AWS regions and availability zones: Query Data Sources
For even more news about our latest tutorials being added to HashiCorp Learn, follow @HashiCorp on Twitter.
» Learn More
Terraform configurations allow you to manage multiple pieces of infrastructure and iterate over structured data. Get more hands-on experience with Terraform configurations with these additional tutorials on HashiCorp Learn:
Customize Terraform Configuration with Variables
Learn how to make your Terraform configuration more flexible with input variables. In this tutorial, you will use input variables to customize infrastructure for a web application with Terraform.
Manage Similar Resources with Count
Learn how to manage similar Terraform resources using the count
argument. In this tutorial, you will use Terraform to provision a VPC, load balancer, and EC2 instances on AWS. Then you will use the count
argument to provision multiple EC2 instances per private subnet with a single resource block.
Perform Dynamic Operations with Functions
The Terraform configuration language allows you to write declarative expressions to create infrastructure. In this tutorial, you will use several built-in functions to perform operations dynamically and effectively to create an EC2 instance running a pre-built web app.
Sign up for the latest HashiCorp news
More blog posts like this one
New Terraform integrations with Crowdstrike, Datadog, JFrog, Red Hat, and more
12 new Terraform integrations from 9 partners provide more options to automate and secure cloud infrastructure management.
Terraform delivers launch-day support for Amazon S3 Tables, EKS Hybrid Nodes, and more at re:Invent
The Terraform provider for AWS now enables users to manage a variety of new services just announced at re:Invent.
HashiCorp at re:Invent 2024: Infrastructure Lifecycle Management with AWS
A recap of HashiCorp infrastructure news and developments on AWS from the past year, from a new provider launch to simplifying infrastructure provisioning and more.