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
Fix the developers vs. security conflict by shifting further left
Resolve the friction between dev and security teams with platform-led workflows that make cloud security seamless and scalable.
HashiCorp at AWS re:Invent: Your blueprint to cloud success
If you’re attending AWS re:Invent in Las Vegas, Dec. 2 - Dec. 6th, visit us for breakout sessions, expert talks, and product demos to learn how to take a unified approach to Infrastructure and Security Lifecycle Management.
Speed up app delivery with automated cancellation of plan-only Terraform runs
Automatic cancellation of plan-only runs allows customers to easily cancel any unfinished runs for outdated commits to speed up application delivery.