feat: add A records for subdomains pointing to 16.113.57.127

This commit is contained in:
vickytechkey 2026-09-08 17:44:48 +05:30
parent b9085ebc45
commit 9d226dbac3

View file

@ -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)
)