Skip to content

Commit

Permalink
lang: stabilise templatestring func experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
kmoe committed May 22, 2024
1 parent c61201d commit b78c593
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/experiments/experiment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
4 changes: 1 addition & 3 deletions internal/lang/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b78c593

Please sign in to comment.