github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/builtin/providers/aws/conversions.go (about) 1 package aws 2 3 import ( 4 "github.com/hashicorp/terraform/helper/schema" 5 6 "github.com/aws/aws-sdk-go/aws" 7 ) 8 9 func makeAwsStringList(in []interface{}) []*string { 10 ret := make([]*string, len(in), len(in)) 11 for i := 0; i < len(in); i++ { 12 ret[i] = aws.String(in[i].(string)) 13 } 14 return ret 15 } 16 17 func makeAwsStringSet(in *schema.Set) []*string { 18 inList := in.List() 19 ret := make([]*string, len(inList), len(inList)) 20 for i := 0; i < len(ret); i++ { 21 ret[i] = aws.String(inList[i].(string)) 22 } 23 return ret 24 } 25 26 func unwrapAwsStringList(in []*string) []string { 27 ret := make([]string, len(in), len(in)) 28 for i := 0; i < len(in); i++ { 29 if in[i] != nil { 30 ret[i] = *in[i] 31 } 32 } 33 return ret 34 }