From f60da0132a7bc8cfe951d37d9e886eddfdfa1608 Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Mon, 1 Sep 2025 16:11:10 +0200 Subject: [PATCH] add oxford comma back in Co-authored-by: Liam Cervante --- internal/lang/eval.go | 2 +- internal/terraform/context_plan2_test.go | 2 +- internal/terraform/evaluate_valid.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/lang/eval.go b/internal/lang/eval.go index c3da4cc6c6..706a552a6b 100644 --- a/internal/lang/eval.go +++ b/internal/lang/eval.go @@ -312,7 +312,7 @@ func (s *Scope) evalContext(refs []*addrs.Reference, selfAddr addrs.Referenceabl // this codepath doesn't really "know about". If the "self" // object starts being supported in more contexts later then // we'll need to adjust this message. - Detail: `The "self" object is not available in this context. This object can be used only in resource provisioner, connection and postcondition blocks.`, + Detail: `The "self" object is not available in this context. This object can be used only in resource provisioner, connection, and postcondition blocks.`, Subject: ref.SourceRange.ToHCL().Ptr(), }) continue diff --git a/internal/terraform/context_plan2_test.go b/internal/terraform/context_plan2_test.go index 85e9d0a8f8..5d20742144 100644 --- a/internal/terraform/context_plan2_test.go +++ b/internal/terraform/context_plan2_test.go @@ -4195,7 +4195,7 @@ func TestContext2Plan_preconditionErrors(t *testing.T) { { "self.value", `Invalid "self" reference`, - "only in resource provisioner, connection and postcondition blocks", + "only in resource provisioner, connection, and postcondition blocks", }, { "data.foo.bar", diff --git a/internal/terraform/evaluate_valid.go b/internal/terraform/evaluate_valid.go index 6c7eb2cb66..16315abd5d 100644 --- a/internal/terraform/evaluate_valid.go +++ b/internal/terraform/evaluate_valid.go @@ -64,7 +64,7 @@ func (e *Evaluator) staticValidateReference(ref *addrs.Reference, modCfg *config // this codepath doesn't really "know about". If the "self" // object starts being supported in more contexts later then // we'll need to adjust this message. - Detail: `The "self" object is not available in this context. This object can be used only in resource provisioner, connection and postcondition blocks.`, + Detail: `The "self" object is not available in this context. This object can be used only in resource provisioner, connection, and postcondition blocks.`, Subject: ref.SourceRange.ToHCL().Ptr(), }) return diags