func CoerceForStorage(attrs map[string]interface{}) map[string]interface{} {
	coercedAttrs := make(map[string]interface{}, len(attrs))
	for attrName, attrValue := range attrs {
		if attrName == ResourceTagsKey {
			// Resource Tags are specified by the user as a string but transformed
			// to a map when config is parsed. We want to store as a string.
			var tagsSlice []string
			if tags, ok := attrValue.(map[string]string); ok {
				for resKey, resValue := range tags {
					tagsSlice = append(tagsSlice, fmt.Sprintf("%v=%v", resKey, resValue))
				}
				attrValue = strings.Join(tagsSlice, " ")
			}
		}
		coercedAttrs[attrName] = attrValue
	}
	return coercedAttrs
}
// CoerceForStorage transforms attributes prior to being saved in a persistent store.
CoerceForStorage transforms attributes prior to being saved in a persistent store.
// CoerceForStorage transforms attributes prior to being saved in a persistent store .
func CoerceForStorage(attrs map[string]interface{}) map[string]interface{} {
	coercedAttrs := make(map[string]interface{}, len(attrs))
	for attrName, attrValue := range attrs {
		if attrName == ResourceTagsKey {
			var tagsSlice []string
			if tags, ok := attrValue.(map[string]string); ok {
				for resKey, resValue := range tags {
					tagsSlice = append(tagsSlice, fmt.Sprintf("%v=%v", resKey, resValue))
				}
				attrValue = strings.Join(tagsSlice, " ")
			}
		}
		coercedAttrs[attrName] = attrValue
	}
	return coercedAttrs
}
func CoerceForStorage ( attrs map [ string ] interface { } ) map [ string ] interface { } { coercedAttrs := make ( map [ string ] interface { } , len ( attrs ) ) for attrName , attrValue := range attrs { if attrName == ResourceTagsKey { var tagsSlice [ ] string if tags , ok := attrValue . ( map [ string ] string ) ; ok { for resKey , resValue := range tags { tagsSlice = append ( tagsSlice , fmt . Sprintf ( " " , resKey , resValue ) ) } attrValue = strings . Join ( tagsSlice , " " ) } } coercedAttrs [ attrName ] = attrValue } return coercedAttrs }
CoerceForStorage transforms attributes prior to being saved in a persistent store.
CoerceForStorage transforms attributes prior to being saved in a persistent store .
// Resource Tags are specified by the user as a string but transformed // to a map when config is parsed. We want to store as a string.