@@ -1021,3 +1021,74 @@ module "ooni_monitoring" {
10211021
10221022 tags = local. tags
10231023}
1024+
1025+ # ## Anonymous credentials testing instance
1026+ module "ooni_anonc" {
1027+ source = " ../../modules/ec2"
1028+
1029+ stage = local. environment
1030+
1031+ vpc_id = module. network . vpc_id
1032+ subnet_id = module. network . vpc_subnet_public [0 ]. id
1033+ private_subnet_cidr = module. network . vpc_subnet_private [* ]. cidr_block
1034+ dns_zone_ooni_io = local. dns_zone_ooni_io
1035+
1036+ key_name = module. adm_iam_roles . oonidevops_key_name
1037+ instance_type = " t3a.small"
1038+
1039+ name = " oonifastpath"
1040+ ingress_rules = [{
1041+ from_port = 22 ,
1042+ to_port = 22 ,
1043+ protocol = " tcp" ,
1044+ cidr_blocks = [" 0.0.0.0/0" ],
1045+ }, {
1046+ from_port = 80 , # for dehydrated challenge
1047+ to_port = 80 ,
1048+ protocol = " tcp" ,
1049+ cidr_blocks = [" 0.0.0.0/0" ],
1050+ }, {
1051+ from_port = 443 , # for the POC hosting
1052+ to_port = 443 ,
1053+ protocol = " tcp" ,
1054+ cidr_blocks = [" 0.0.0.0/0" ],
1055+ }, {
1056+ from_port = 9100 , # for node exporter metrics
1057+ to_port = 9100 ,
1058+ protocol = " tcp"
1059+ cidr_blocks = [" ${ module . ooni_monitoring_proxy . aws_instance_private_ip } /32" ],
1060+ }]
1061+
1062+ egress_rules = [{
1063+ from_port = 0 ,
1064+ to_port = 0 ,
1065+ protocol = " -1" ,
1066+ cidr_blocks = [" 0.0.0.0/0" ],
1067+ }, {
1068+ from_port = 0 ,
1069+ to_port = 0 ,
1070+ protocol = " -1" ,
1071+ ipv6_cidr_blocks = [" ::/0" ],
1072+ }]
1073+
1074+ sg_prefix = " oonianonc"
1075+ tg_prefix = " anon"
1076+
1077+ disk_size = 20
1078+
1079+ tags = merge (
1080+ local. tags ,
1081+ { Name = " ooni-tier0-anonc" }
1082+ )
1083+ }
1084+
1085+ resource "aws_route53_record" "anonc_alias" {
1086+ zone_id = local. dns_zone_ooni_io
1087+ name = " anonc.${ local . environment } .ooni.io"
1088+ type = " CNAME"
1089+ ttl = 300
1090+
1091+ records = [
1092+ module . ooni_anonc . aws_instance_public_dns
1093+ ]
1094+ }
0 commit comments