28 lines
1012 B
Python
28 lines
1012 B
Python
#!/usr/bin/env python3
|
|
import os
|
|
import aws_cdk as cdk
|
|
from infrastructure.stack import IptvUpdaterStack
|
|
|
|
app = cdk.App()
|
|
|
|
# Read environment variables for FreeDNS credentials
|
|
freedns_user = os.environ.get("FREEDNS_User")
|
|
freedns_password = os.environ.get("FREEDNS_Password")
|
|
domain_name = os.environ.get("DOMAIN_NAME")
|
|
|
|
if not freedns_user or not freedns_password:
|
|
raise ValueError("FREEDNS_User and FREEDNS_Password environment variables must be set.")
|
|
|
|
if not domain_name:
|
|
raise ValueError("DOMAIN_NAME environment variable must be set.")
|
|
|
|
IptvUpdaterStack(app, "IptvUpdaterStack",
|
|
freedns_user=freedns_user,
|
|
freedns_password=freedns_password,
|
|
domain_name=domain_name,
|
|
# If you don't specify 'env', the stack will be deployed to the account and region that are
|
|
# configured in your AWS CLI profile. Defaulting to the environment where the CLI is configured.
|
|
# env=cdk.Environment(account=os.getenv('CDK_DEFAULT_ACCOUNT'), region=os.getenv('CDK_DEFAULT_REGION')),
|
|
)
|
|
|
|
app.synth() |