Open mjchuable opened 5 years ago
Supplemental to lijoyoung/cargildemo#1
gunicorn_config.py
main.tf
resource "aws_vpc" "lijoDemoVPC"
resource "aws_db_instance" "default"
*.py.tpl
IMO, would be better for these py files to NOT be tpl's, use environ and move the ENV VAR declaration on the server provisioner steps
too many provisioner; use it sparingly
SQL stuff sql = "INSERT INTOanimals(name) VALUES ("+"'"+animal_name+"');" ^ cursor = cnx.cursor(prepared=True); there's a way for prepared statements; sql-injection concern
sql = "INSERT INTO
(name) VALUES ("+"'"+animal_name+"');"
cursor = cnx.cursor(prepared=True)
private key committed, just a concern :D, would have been better to have a short guide to create private key to use
Overall, pretty good on taking a first stab at terraform 🎖
Thanks Marc... oops, I will remove the private key...I put it there to test my code. Thanks of the feedback. Noted
Supplemental to lijoyoung/cargildemo#1
gunicorn_config.py
main.tf
resource "aws_vpc" "lijoDemoVPC"
- snake-case on tf resource naming best practicesresource "aws_db_instance" "default"
- depends_on might not be necessary here as it does the config tree for you automatically*.py.tpl
IMO, would be better for these py files to NOT be tpl's, use environ and move the ENV VAR declaration on the server provisioner steps
too many provisioner; use it sparingly
SQL stuff
sql = "INSERT INTO
animals(name) VALUES ("+"'"+animal_name+"');"
^cursor = cnx.cursor(prepared=True)
; there's a way for prepared statements; sql-injection concernprivate key committed, just a concern :D, would have been better to have a short guide to create private key to use
Overall, pretty good on taking a first stab at terraform 🎖