What is the difference between a resource and a data source?
BeginnerConceptProviders, Resources and Data Sources
Answer
A resource is something Terraform creates and manages in its lifecycle. A data source (data block) only reads existing information, for example an AMI, a VPC created elsewhere or the current account ID. Data sources never create or destroy anything and are re-read on every plan.
More on Providers, Resources and Data Sources
What is a resource block and how is it addressed?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?IntermediateWhat is the difference between arguments and attributes?Beginner