What is the `external` data source and why avoid it?
IntermediateConceptProviders, Resources and Data Sources
Answer
data "external" runs a program that reads JSON on stdin and returns a JSON map of strings on stdout. It runs on every plan on whoever's machine runs it, so it is hard to reproduce, requires tools installed on the runner and bypasses typed providers. Use it only when no provider exists, and keep the script deterministic.
More on Providers, Resources and Data Sources
What is a resource block and how is it addressed?BeginnerWhat is the difference between a resource and a data source?BeginnerHow do you configure a provider such as AWS?BeginnerHow do you use the same provider with multiple regions or accounts?IntermediateIn what order does the AWS provider look for credentials?IntermediateWhat does `default_tags` in the AWS provider do and what are its pitfalls?Intermediate