What does the `connection` block do?
IntermediateConceptLifecycle, Dependencies, Provisioners and Drift
Answer
It tells remote-exec and file provisioners how to reach the machine (SSH or WinRM): host, user, private key, bastion host and timeout. It requires network reachability from wherever Terraform runs, which is one reason we avoid these provisioners in CI.
More on Lifecycle, Dependencies, Provisioners and Drift
What are meta-arguments?BeginnerWhat lifecycle options are available?BeginnerHow does `create_before_destroy` work and what can go wrong?AdvancedWhat does `prevent_destroy` guarantee and what does it not?AdvancedWhen do you use `ignore_changes`?IntermediateWhat does `replace_triggered_by` do?Advanced