Closed sckott closed 8 months ago
sean feedback
aws_db_rds_create
:
invisible()
? probably invisible, with some kind of success message aws_db_rds_con
:
security_group_ids
required? this would be a good way to lessen security group related problems - main one being that a naive user likely won't pass one and then be confused as to why they can not connectworkflow from sean:
aws_user_create("scott") # exists
aws_db_rds_create("aaa", "mariadb") # exists
add_user_to_rds_db("scott") # DOES NOT EXIST
aws_db_rds_list() # exists
#> # A tibble: 2 × 5
#> DBInstanceIdentifier DBInstanceClass Engine DBInstanceStatus DBName
#> <chr> <chr> <chr> <chr> <chr>
#> 1 aaa db.t3.micro mariadb available dev
#> 2 bbb db.t3.micro mariadb available dev
con <- aws_db_rds_con("aaa") # exists
# do things with DBI/dplyr/etc
3 steps that need to happen for connecting to a DB instance using IAM authentication::
aws_db_rds_create
with arg iam_database_auth=TRUE
(possibly on by default?)document_create
, aws_policy_create
, aws_policy_attach
CREATE USER jane_doe IDENTIFIED WITH AWSAuthenticationPlugin AS 'RDS';
Probably add_user_to_rds_db("scott")
could handle steps 2 and 3
Going to try to split up this PR or possibly close and create two new ones for:
@seankross Here's the high level changes here:
Add family of functions for AWS secrets manager
fix #29
Integrate secrets into RDS database create
Redshift uses the user's IAM credentials so I think it only makes sense to use secrets manager in RDS.
So
aws_db_rds_create
now allows the user to not pass in a user or password, and we create them for the user. Likewise,aws_db_rds_con
automatically detects secrets in the users aws secrets manager and presents those in a prompt and asks which one they'd like to use, an example:Make the DB
Get the conn
Secrets management
make scan_secrets
to run the command line toolgitleaks
(https://github.com/gitleaks/gitleaks) on the repo. this isn't run automatically anywhere yet, just manually. they do have a github action for it too