diff --git a/tradhoxdomain/tradhoxdomain_stack.py b/tradhoxdomain/tradhoxdomain_stack.py index b4b223c..31e3f5e 100644 --- a/tradhoxdomain/tradhoxdomain_stack.py +++ b/tradhoxdomain/tradhoxdomain_stack.py @@ -14,3 +14,24 @@ class TradhoxdomainStack(Stack): self, "TradhoxHostedZone", zone_name="tradhox.com" ) + + subdomains = [ + "partners", + "partners-api", + "api", + "mailservices", + "whatsapp", + "payments", + ] + + # Target IP address provided by the user + target_ip = "16.113.57.127" + + for subdomain in subdomains: + # Create an A Record for each subdomain + route53.ARecord( + self, f"{subdomain.replace('-', '').capitalize()}Record", + zone=hosted_zone, + record_name=subdomain, + target=route53.RecordTarget.from_ip_addresses(target_ip) + )