Using Wildcard in Terraform Data

Ripon Banik
1 min readMar 14, 2019

Use data dynamically

A good feature of terraform is that it allows using query to existing resource using data provider.

In a recent case, I needed to use subnet to create route53 resolver. So instead of hard coding subnet ids, I used the following to query using data provider and use it in my resolver resource -

--

--

Ripon Banik

A Cloud and DevSecOps Engineer and Consultant, passionate about simplification of technology and make it consumable. https://www.linkedin.com/in/riponbanik/