You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: support importing internal ALBs for backend services (#5490)
Related: #5438.
Integ test changes in #5483.
#5483 adds the Load Balancer DNS name to the service as an env var (and therefore appears in `svc show` output. However, it is not (yet) included in URI output as a recommended action in `svc deploy` output.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.
returnfmt.Errorf(`imported ALB %q for Backend Service %q should have "internal" Scheme value`, alb.ARN, aws.StringValue(d.backendMft.Name))
166
+
}
167
+
iflen(alb.Listeners) ==0 {
168
+
returnfmt.Errorf(`imported ALB %q must have at least one listener. For two listeners, one must be of protocol HTTP and the other of protocol HTTPS`, alb.ARN)
169
+
}
170
+
iflen(alb.Listeners) ==1 {
171
+
returnnil
172
+
}
173
+
varquantHTTP, quantHTTPSint
174
+
for_, listener:=rangealb.Listeners {
175
+
iflistener.Protocol=="HTTP" {
176
+
quantHTTP+=1
177
+
} elseiflistener.Protocol=="HTTPS" {
178
+
quantHTTPS+=1
179
+
}
180
+
}
181
+
ifquantHTTP!=1||quantHTTPS!=1 {
182
+
returnfmt.Errorf("imported ALB %q must have exactly one listener of protocol HTTP and exactly one listener of protocol HTTPS", alb.ARN)
expectedErr: `validate ALB runtime configuration for "http.additional_rules[0]": cannot deploy service mock-svc without "alias" to environment mock-env with certificate imported`,
expectedErr: `validate imported ALB configuration for "http": imported ALB "mockALBARN" must have at least one listener. For two listeners, one must be of protocol HTTP and the other of protocol HTTPS`,
341
+
},
342
+
"failure if imported ALB has more than 2 listeners": {
expectedErr: `validate imported ALB configuration for "http": imported ALB "mockALBARN" must have exactly one listener of protocol HTTP and exactly one listener of protocol HTTPS`,
385
+
},
386
+
"failure if imported ALB has two listeners but they don't have HTTP and HTTPS protocols": {
expectedErr: `validate imported ALB configuration for "http": imported ALB "mockALBARN" must have exactly one listener of protocol HTTP and exactly one listener of protocol HTTPS`,
0 commit comments