aws_db_instance, etc. A resource belongs to a provider, accepts arguments, outputs attributes, and has a lifecycle. A resource can be created, retrieved, updated, and deleted.
terraform_remote_stateacts as a glue for higher-level modules and compositions.
aws_security_group_ruleresources based on input. This resource module by itself can be used together with other modules to create the infrastructure module.