Atualizar crialab.sh
This commit is contained in:
+3
-2
@@ -134,9 +134,10 @@ EOF
|
||||
aw ec2 wait instance-running --instance-ids "$gateway"
|
||||
# Registrar a alocacao antes da associacao permite recuperar uma falha parcial.
|
||||
local eip_allocation eip_association eip_target public_ip
|
||||
eip_allocation=$(aw ec2 allocate-address --domain vpc \
|
||||
--tag-specifications "$(tags elastic-ip gateway)" --query AllocationId --output text)
|
||||
eip_allocation=$(aw ec2 allocate-address --domain vpc --query AllocationId --output text)
|
||||
record ElasticIpAllocationId "$eip_allocation"
|
||||
aw ec2 create-tags --resources "$eip_allocation" \
|
||||
--tags "Key=Lab,Value=$LAB_NAME" "Key=Name,Value=$LAB_NAME-gateway"
|
||||
public_ip=$(aw ec2 describe-addresses --allocation-ids "$eip_allocation" --query 'Addresses[0].PublicIp' --output text)
|
||||
record GatewayPublicIp "$public_ip"
|
||||
eip_association=$(aw ec2 associate-address --allocation-id "$eip_allocation" \
|
||||
|
||||
Reference in New Issue
Block a user