From b78c5939716f85f2a0d29832b475683288a32cf3 Mon Sep 17 00:00:00 2001 From: Katy Moe Date: Wed, 22 May 2024 11:43:23 +0100 Subject: [PATCH] lang: stabilise templatestring func experiment --- internal/experiments/experiment.go | 2 +- internal/lang/functions.go | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/experiments/experiment.go b/internal/experiments/experiment.go index 7fa4b902f0e6..4dae75ab85b6 100644 --- a/internal/experiments/experiment.go +++ b/internal/experiments/experiment.go @@ -33,7 +33,7 @@ func init() { registerConcludedExperiment(VariableValidation, "Custom variable validation can now be used by default, without enabling an experiment.") registerCurrentExperiment(VariableValidationCrossRef) registerConcludedExperiment(SuppressProviderSensitiveAttrs, "Provider-defined sensitive attributes are now redacted by default, without enabling an experiment.") - registerCurrentExperiment(TemplateStringFunc) + registerConcludedExperiment(TemplateStringFunc, "The templatestring function can now be used without enabling an experiment.") registerConcludedExperiment(ConfigDrivenMove, "Declarations of moved resource instances using \"moved\" blocks can now be used by default, without enabling an experiment.") registerConcludedExperiment(PreconditionsPostconditions, "Condition blocks can now be used by default, without enabling an experiment.") registerConcludedExperiment(ModuleVariableOptionalAttrs, "The final feature corresponding to this experiment differs from the experimental form and is available in the Terraform language from Terraform v1.3.0 onwards.") diff --git a/internal/lang/functions.go b/internal/lang/functions.go index f811f0b503a4..0ae17d0836db 100644 --- a/internal/lang/functions.go +++ b/internal/lang/functions.go @@ -190,9 +190,7 @@ func (s *Scope) Functions() map[string]function.Function { return s.funcs, filesystemFunctions, templateFunctions } coreFuncs["templatefile"] = funcs.MakeTemplateFileFunc(s.BaseDir, funcsFunc) - if s.activeExperiments.Has(experiments.TemplateStringFunc) { - coreFuncs["templatestring"] = funcs.MakeTemplateStringFunc(funcsFunc) - } + coreFuncs["templatestring"] = funcs.MakeTemplateStringFunc(funcsFunc) if s.ConsoleMode { // The type function is only available in terraform console.