Day 13: Terraform Data Sources
dev.to·19h·
Discuss: DEV
📋Infrastructure as Code (IaC)
Preview
Report Post

Today marks the Day 3 of 30 Days of AWS Terraform Challenge Initiative by Piyush Sachdev. Today we will do deep dive into the Terraform Data Sources, what exactly is a Data Source and how it will help us in writing terraform code for AWS resources such as EC2, VPC, subnet and so..

Data Source:

Think of Data source like a phone directory with usename and phone number like key and value with an api, so whenever you want any value with the help of API, you can retrieve that using key instead of hardcoding.

In Short, Terraform data sources with AWS allow you to retrieve information about existing AWS resources or external data that can then be referenced within your Terraform configurations.

For Example, While Creating a EC2 instance, we need and AMI id for which we need to go the …

Similar Posts

Loading similar posts...