// stringMapFromValue converts a cty.Value to a map[stirng]string.
// This will panic if the val is not a cty.Map(cty.String).
stringMapFromValue converts a cty.Value to a map[stirng]string.
This will panic if the val is not a cty.Map(cty.String).
// stringMapFromValue converts a cty . Value to a map [ stirng ] string . // This will panic if the val is not a cty . Map ( cty . String ) .
func stringMapFromValue(val cty.Value) map[string]string {
	m := map[string]string{}
	if val.IsNull() || !val.IsKnown() {
		return m
	}
	for it := val.ElementIterator(); it.Next(); {
		ak, av := it.Element()
		name := ak.AsString()
		if !av.IsKnown() || av.IsNull() {
			continue
		}
		av, _ = ctyconvert.Convert(av, cty.String)
		m[name] = av.AsString()
	}
	return m
}
func stringMapFromValue ( val cty . Value ) map [ string ] string { m := map [ string ] string { } if val . IsNull ( ) || ! val . IsKnown ( ) { return m } for it := val . ElementIterator ( ) ; it . Next ( ) ; { ak , av := it . Element ( ) name := ak . AsString ( ) if ! av . IsKnown ( ) || av . IsNull ( ) { continue } av , _ = ctyconvert . Convert ( av , cty . String ) m [ name ] = av . AsString ( ) } return m }
stringMapFromValue converts a cty.Value to a map[stirng]string.
stringMapFromValue converts a cty . Value to a map [ stirng ] string .