func transform(fastlyCidrs []string, securityGroupIngressCidrs []string) ([]string, []string) {
	var cidrsToAdd []string
	var cidrsToRemove []string

	// Join A
	for _, fastlyCidr := range fastlyCidrs {
		if !contains(fastlyCidr, securityGroupIngressCidrs) {
			cidrsToAdd = append(cidrsToAdd, fastlyCidr)
		}
	}

	// Join B
	for _, securityGroupIngressCidr := range securityGroupIngressCidrs {
		if !contains(securityGroupIngressCidr, fastlyCidrs) {
			cidrsToRemove = append(cidrsToRemove, securityGroupIngressCidr)
		}
	}

	return cidrsToAdd, cidrsToRemove
}
// To determine what the security group ingress must be set too we need to run two joins.
// Join A: Left Join - Find what is in fastlyCidrs but not in securityGroupIngressCidrs and add them
// Join B: Right Join - Find what is in securityGroupIngressCidrs but not in fastlyCidrs and remove them
To determine what the security group ingress must be set too we need to run two joins.
Join A: Left Join - Find what is in fastlyCidrs but not in securityGroupIngressCidrs and add them
Join B: Right Join - Find what is in securityGroupIngressCidrs but not in fastlyCidrs and remove them
// To determine what the security group ingress must be set too we need to run two joins . // Join A : Left Join - Find what is in fastlyCidrs but not in securityGroupIngressCidrs and add them // Join B : Right Join - Find what is in securityGroupIngressCidrs but not in fastlyCidrs and remove them
func transform(fastlyCidrs []string, securityGroupIngressCidrs []string) ([]string, []string) {
	var cidrsToAdd []string
	var cidrsToRemove []string
	for _, fastlyCidr := range fastlyCidrs {
		if !contains(fastlyCidr, securityGroupIngressCidrs) {
			cidrsToAdd = append(cidrsToAdd, fastlyCidr)
		}
	}
	for _, securityGroupIngressCidr := range securityGroupIngressCidrs {
		if !contains(securityGroupIngressCidr, fastlyCidrs) {
			cidrsToRemove = append(cidrsToRemove, securityGroupIngressCidr)
		}
	}
	return cidrsToAdd, cidrsToRemove
}
func transform ( fastlyCidrs [ ] string , securityGroupIngressCidrs [ ] string ) ( [ ] string , [ ] string ) { var cidrsToAdd [ ] string var cidrsToRemove [ ] string for _ , fastlyCidr := range fastlyCidrs { if ! contains ( fastlyCidr , securityGroupIngressCidrs ) { cidrsToAdd = append ( cidrsToAdd , fastlyCidr ) } } for _ , securityGroupIngressCidr := range securityGroupIngressCidrs { if ! contains ( securityGroupIngressCidr , fastlyCidrs ) { cidrsToRemove = append ( cidrsToRemove , securityGroupIngressCidr ) } } return cidrsToAdd , cidrsToRemove }
To determine what the security group ingress must be set too we need to run two joins.
To determine what the security group ingress must be set too we need to run two joins .
// Join A // Join B