[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [metrics-cloud/master] cfn: Always use first availability zone, no hardcoding



commit 362b25f336bb3239a6a3e909609aed41d2d773c5
Author: Iain R. Learmonth <irl@xxxxxxxx>
Date:   Wed Mar 25 14:44:08 2020 +0000

    cfn: Always use first availability zone, no hardcoding
    
    Tested with a template that outputs the availability zone, and they do
    come as you would expect a,b,c... so this should be a no-op in the
    actual template interpretations for all current deployments (which are
    all in us-east).
    
    cf #31414
---
 cloudformation/exit-scanner-dev.yml | 2 +-
 cloudformation/metrics-monitor.yml  | 2 +-
 cloudformation/metrics-vpc.yml      | 2 +-
 cloudformation/onionoo-dev.yml      | 4 ++--
 cloudformation/onionperf-dev.yml    | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/cloudformation/exit-scanner-dev.yml b/cloudformation/exit-scanner-dev.yml
index 2ee4259..5c126c9 100644
--- a/cloudformation/exit-scanner-dev.yml
+++ b/cloudformation/exit-scanner-dev.yml
@@ -11,7 +11,7 @@ Resources:
   Instance:
     Type: AWS::EC2::Instance
     Properties:
-      AvailabilityZone: us-east-1a
+      AvailabilityZone: !Select [ 0, !GetAZs ]
       ImageId: ami-01db78123b2b99496
       InstanceType: t2.large
       SubnetId:
diff --git a/cloudformation/metrics-monitor.yml b/cloudformation/metrics-monitor.yml
index a3398f0..bea09cb 100644
--- a/cloudformation/metrics-monitor.yml
+++ b/cloudformation/metrics-monitor.yml
@@ -8,7 +8,7 @@ Resources:
   MonitorInstance:
     Type: AWS::EC2::Instance
     Properties:
-      AvailabilityZone: us-east-1a
+      AvailabilityZone: !Select [ 0, !GetAZs ]
       ImageId: ami-01db78123b2b99496
       InstanceType: t2.micro
       SubnetId:
diff --git a/cloudformation/metrics-vpc.yml b/cloudformation/metrics-vpc.yml
index 196b9db..94eb325 100644
--- a/cloudformation/metrics-vpc.yml
+++ b/cloudformation/metrics-vpc.yml
@@ -22,7 +22,7 @@ Resources:
   Subnet:
     Type: AWS::EC2::Subnet
     Properties:
-      AvailabilityZone: us-east-1a
+      AvailabilityZone: !Select [ 0, !GetAZs ]
       VpcId: !Ref VPC
       CidrBlock: 172.31.0.0/20
       MapPublicIpOnLaunch: true
diff --git a/cloudformation/onionoo-dev.yml b/cloudformation/onionoo-dev.yml
index d7baa53..9ca1594 100644
--- a/cloudformation/onionoo-dev.yml
+++ b/cloudformation/onionoo-dev.yml
@@ -11,7 +11,7 @@ Resources:
   Instance:
     Type: AWS::EC2::Instance
     Properties:
-      AvailabilityZone: us-east-1a
+      AvailabilityZone: !Select [ 0, !GetAZs ]
       ImageId: ami-01db78123b2b99496
       InstanceType: t2.large
       SubnetId:
@@ -24,7 +24,7 @@ Resources:
   ServiceVolume:
     Type: AWS::EC2::Volume
     Properties: 
-      AvailabilityZone: us-east-1a
+      AvailabilityZone: !Select [ 0, !GetAZs ]
       Size: 15
       VolumeType: gp2
   ServiceVolumeAttachment:
diff --git a/cloudformation/onionperf-dev.yml b/cloudformation/onionperf-dev.yml
index ddaffd2..62d93a7 100644
--- a/cloudformation/onionperf-dev.yml
+++ b/cloudformation/onionperf-dev.yml
@@ -11,7 +11,7 @@ Resources:
   Instance:
     Type: AWS::EC2::Instance
     Properties:
-      AvailabilityZone: us-east-1a
+      AvailabilityZone: !Select [ 0, !GetAZs ]
       ImageId: ami-01db78123b2b99496
       InstanceType: t2.micro
       SubnetId:



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits