code: func configValueFromCLI(synthFilename, rawValue string, wantType cty.Type) (cty.Value, tfdiags.Diagnostics) {
  	var diags tfdiags.Diagnostics
  
  	switch {
  	case wantType.IsPrimitiveType():
  		// Primitive types are handled as conversions from string.
  		val := cty.StringVal(rawValue)
  		var err error
  		val, err = convert.Convert(val, wantType)
  		if err != nil {
  			diags = diags.Append(tfdiags.Sourceless(
  				tfdiags.Error,
  				"Invalid backend configuration value",
  				fmt.Sprintf("Invalid backend configuration argument %s: %s", synthFilename, err),
  			))
  			val = cty.DynamicVal // just so we return something valid-ish
  		}
  		return val, diags
  	default:
  		// Non-primitives are parsed as HCL expressions
  		src := []byte(rawValue)
  		expr, hclDiags := hclsyntax.ParseExpression(src, synthFilename, hcl.Pos{Line: 1, Column: 1})
  		diags = diags.Append(hclDiags)
  		if hclDiags.HasErrors() {
  			return cty.DynamicVal, diags
  		}
  		val, hclDiags := expr.Value(nil)
  		diags = diags.Append(hclDiags)
  		if hclDiags.HasErrors() {
  			val = cty.DynamicVal
  		}
  		return val, diags
  	}
  }
docs: // configValueFromCLI parses a configuration value that was provided in a
  // context in the CLI where only strings can be provided, such as on the
  // command line or in an environment variable, and returns the resulting
  // value.