code: func HCL2ValueFromFlatmap(m map[string]string, ty cty.Type) (cty.Value, error) {
  	if m == nil {
  		return cty.NullVal(ty), nil
  	}
  	if !ty.IsObjectType() {
  		panic(fmt.Sprintf("HCL2ValueFromFlatmap called on %#v", ty))
  	}
  
  	return hcl2ValueFromFlatmapObject(m, "", ty.AttributeTypes())
  }
docs: // HCL2ValueFromFlatmap converts a map compatible with what would be produced
  // by the "flatmap" package to a HCL2 (really, the cty dynamic types library
  // that HCL2 uses) object type.
  //
  // The intended result type must be provided in order to guide how the
  // map contents are decoded. This must be an object type or this function
  // will panic.
  //
  // Flatmap values can only represent maps when they are of primitive types,
  // so the given type must not have any maps of complex types or the result
  // is undefined.
  //
  // The result may contain null values if the given map does not contain keys
  // for all of the different key paths implied by the given type.