Use process substitution in terraform config script

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191584425
This commit is contained in:
jianglai 2018-04-04 06:35:47 -07:00 committed by Ben McIlwain
parent 07d38340f3
commit e7f033201b

View file

@ -18,12 +18,9 @@
# the project, zone and instance group names, and then call gcloud to add the # the project, zone and instance group names, and then call gcloud to add the
# named ports. # named ports.
terraform output proxy_instance_groups | awk '{print $3}' | \
awk -F '/' '{print "--project", $7, "--zone", $9, $11}' |
{
while read line while read line
do do
gcloud compute instance-groups set-named-ports \ gcloud compute instance-groups set-named-ports \
--named-ports whois:30001,epp:30002 $line --named-ports whois:30001,epp:30002 $line
done done < <(terraform output proxy_instance_groups | awk '{print $3}' | \
} awk -F '/' '{print "--project", $7, "--zone", $9, $11}')