feat: add A records for subdomains pointing to 16.113.57.127
This commit is contained in:
parent
b9085ebc45
commit
9d226dbac3
1 changed files with 21 additions and 0 deletions
|
|
@ -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)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue