Moved ssh public key to an environment variable
All checks were successful
AWS Deploy on Push / build (push) Successful in 4m14s

This commit is contained in:
2025-05-20 15:51:34 -05:00
parent df3fc2f37c
commit 5698e7f26b
6 changed files with 23 additions and 13 deletions

5
app.py
View File

@@ -9,6 +9,7 @@ app = cdk.App()
freedns_user = os.environ.get("FREEDNS_User")
freedns_password = os.environ.get("FREEDNS_Password")
domain_name = os.environ.get("DOMAIN_NAME")
ssh_public_key = os.environ.get("SSH_PUBLIC_KEY")
if not freedns_user or not freedns_password:
raise ValueError("FREEDNS_User and FREEDNS_Password environment variables must be set.")
@@ -16,10 +17,14 @@ if not freedns_user or not freedns_password:
if not domain_name:
raise ValueError("DOMAIN_NAME environment variable must be set.")
if not ssh_public_key: # Check if SSH public key is set
raise ValueError("SSH_PUBLIC_KEY environment variable must be set.")
IptvUpdaterStack(app, "IptvUpdaterStack",
freedns_user=freedns_user,
freedns_password=freedns_password,
domain_name=domain_name,
ssh_public_key=ssh_public_key,
# 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')),