Hello guys,
I'm using the go-template function in crossplane composition, where I need to initialize the list of ports. Once the list is created I will loop and add the ports to the resource.
Desired Syntax
{{ $ports := [9000, 8000, 7008] }}
{{ range $port := $ports }}
kind: some-resource
fromPort: {{ $port }}
toPort: {{ $port }}
securityGroupIdRef:
name: some-group
type: ingress
{{ end}}
How can I achieve the above syntax? If anyone has the examples?
Thanks in advance
Manoj