backend: Backend.Configure takes context.Context

This adds a new context.Context argument to the Backend.Configure method,
updates all of the implementations to match, and then updates all of the
callers to pass in a context.

A small number of callers don't yet have context plumbed to them so those
use context.TODO() as a placeholder for now, so we can more easily find
and fix them in later commits once we have contexts more thoroughly
plumbed.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
This commit is contained in:
Martin Atkins
2025-05-06 13:13:42 -07:00
parent 45e3a7bcf4
commit 2922059ff3
20 changed files with 41 additions and 37 deletions

View File

@@ -228,7 +228,7 @@ func (b *Remote) ServiceDiscoveryAliases() ([]backend.HostAlias, error) {
}
// Configure implements backend.Enhanced.
func (b *Remote) Configure(obj cty.Value) tfdiags.Diagnostics {
func (b *Remote) Configure(ctx context.Context, obj cty.Value) tfdiags.Diagnostics {
var diags tfdiags.Diagnostics
if obj.IsNull() {
return diags