https://pulumi.com logo
#golang
Title
o

orange-electrician-25669

08/08/2020, 8:29 PM
HI who can help to create "LoadBalancer" i have issue in params Cannot convert expression of type '[]string' to type 'String' Golang
Copy code
type (
	S1LBConfig struct {
		LoadBalancer struct {
			Rules []struct {
				Lb struct {
					SecurityGroups           []string
					Subnets                  []string
				} 
			} 
		} 
	}
)

SecurityGroups:           pulumi.StringArray{pulumi.String(s1LoadBalancerConfig.LoadBalancer.Rules[k].Lb.SecurityGroups)},

Cannot convert expression of type '[]string' to type 'String'
l

lemon-agent-27707

08/10/2020, 4:30 PM
There's an example of creating a load balancer in the docs: https://www.pulumi.com/docs/reference/pkg/aws/applicationloadbalancing/loadbalancer/ I you can share your full program I'd be happy to help figure out what's going on here.
3 Views