File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ The infrastructure for this repository is located in the [CFA Tax-Benefits-Backe
2020### CI/CD Integration
2121
2222OpenTofu is integrated into our CI pipeline.
23+
2324---
2425
2526## Deployment to AWS Staging
@@ -71,3 +72,24 @@ To compile stylesheets locally:
7172``` bash
7273bin/rake dartsass:build
7374```
75+
76+ ## Access to Database
77+
78+ Locally, you can use ` bin/rails console `
79+
80+ On Heroku, you can use ` heroku run rails c -a <review-app-name> `
81+
82+ On Staging and Production, you'll have to utilize AWS Query Editor or ` aws rds-data ` commands to access the database.
83+
84+ ```
85+ AWS_PROFILE=<aws profile> \
86+ aws rds-data execute-statement \
87+ --resource-arn "arn:aws:rds:us-east-1:<account_id>:cluster:pya-<environment>-web" \
88+ --secret-arn "arn:aws:secretsmanager:us-east-1:<account_id>:secret:rds\!cluster-<secret>" \
89+ --database prior_year_access \
90+ --sql '<enter sql statement here>'
91+ ```
92+
93+ - Your ` AWS_PROFILE ` should match the environment (Prior Year Access - Prod vs Non-Prod) you're trying to query
94+ - You can grab the ` resource-arn ` from AWS console > Aurora and RDS > Databases > pya-<environment >-web > Configuration > Amazon Resource Name (ARN).
95+ - ` secret-arn ` could be found in the AWS Secrets Manager (starts with ` rds!cluster ` -- grab the ARN)
You can’t perform that action at this time.
0 commit comments