# Suno Pulumi

### AWS Configuration Steps

- `aws configure sso`

#### Fill in the following info, anything not specified below can be left as the default

```
session-name: suno-staging
url: https://sunoai.awsapps.com/start
region: us-east-1
```

Once you follow the authorization prompts, you'll then be prompted to select which account and default region for the cli. Select the staging account and set the cli region to `us-east-2`. Finally, you'll get prompted for CLI profile name, set that to the same name `suno-staging` You can then repeat this process to also access prod but selecting the prod account and updating the names respectively.

To then use these profiles you can set the profile by:

- ENV `AWS_PROFILE=suno-staging`
- CLI option `--profile=suno-staging`

To refresh your credentials run:
```
aws sso login --profile suno-staging
```

### Post Stack Deployment

#### Prerequisites

- Kubernetes Cluster: Ensure you have a running Kubernetes cluster.
- Kubectl Access: You must have kubectl configured with access to your Kubernetes cluster.
- Git: Git should be installed on your system.
- Helm: Helm should be installed on your system.

#### Install ArgoCD and app-of-apps application
```bash
# Set this to "staging" or "production" based on the environment
environment=staging ./suno_pulumi/argo.sh
```

#### Additional Post Deployment Steps
Following the database stack deployment, additional manual steps are required to secure database credentials and enable EKS cluster access:

1. Create AWS Secrets for RDS Clusters:
- After creating each RDS cluster, manually create a corresponding secret in AWS Secrets Manager for the database password.
- Create secret with cluster prefix like suno-main-rds-secret, suno-chopin-rds-secret

2. Create Datadog-Postgres User Secret:
- Create a secret in AWS Secrets Manager named datadog-rds-config
- Store the Datadog user password within this secret.
This allows the EKS cluster to securely access the database for monitoring purposes.
