File tree Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,15 @@ resource "aws_db_subnet_group" "public" {
1616#  All of this security group stuff should go away once we migrate bastion to the
1717#  prod vpc (vs. the legacy vpc).
1818
19+ data  "terraform_remote_state"  "rustc_perf"  {
20+   backend  =  " s3" 
21+   config  =   {
22+     bucket =  " rust-terraform" 
23+     key    =  " simpleinfra/rustc-perf.tfstate" 
24+     region =  " us-west-1" 
25+   }
26+ }
27+ 
1928data  "aws_security_group"  "bastion"  {
2029  vpc_id  =   data. terraform_remote_state . shared . outputs . prod_vpc . id 
2130  name    =  " rust-prod-bastion" 
@@ -43,11 +52,13 @@ resource "aws_security_group" "rust_prod_db" {
4352  }
4453
4554  ingress  {
46-     from_port    =  5432 
47-     to_port      =  5432 
48-     protocol     =  " tcp" 
49-     cidr_blocks  =   [" 159.69.58.186/32"  ]
50-     description  =  " Connections from rustc-perf collection server" 
55+     from_port  =  5432 
56+     to_port    =  5432 
57+     protocol   =  " tcp" 
58+     cidr_blocks  =   [
59+       for  ip  in  data . terraform_remote_state . rustc_perf . outputs . rustc_perf_ips  :  " ${ ip } /32" 
60+     ]
61+     description  =  " Connections from rustc-perf collection servers" 
5162  }
5263
5364  tags  =   {
Original file line number Diff line number Diff line change @@ -17,3 +17,10 @@ resource "aws_route53_record" "one" {
1717  records  =   [" 144.76.186.39"  ]
1818  ttl      =  300 
1919}
20+ 
21+ output  "rustc_perf_ips"  {
22+   value  =   [
23+     tolist (aws_route53_record. legacy . records )[0 ],
24+     tolist (aws_route53_record. one . records )[0 ]
25+   ]
26+ }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments