Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gwright99/87 streamline number of locals #112

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

gwright99
Copy link
Collaborator

Creating draft PR for comments.

I feel like this is a good pattern to implement but am worried about the difficulty of backing it out if I'm wrong so I'm going to be a coward and wait on it for awhile.

Beginning tfvars configuration check.
----- Verifying TFVARS file -----
----- Verifying Tower configurations -----
----- Verifying AWS Integrations -----
Retrieving subnet information from AWS Account.
`sg_egress_eice` allows egress everywhere. Consider tightening.
`sg_egress_tower_ec2` allows egress everywhere. Consider tightening.
`sg_egress_tower_alb` allows egress everywhere. Consider tightening.
`sg_egress_batch_ec2` allows egress everywhere. Consider tightening.
`sg_egress_interface_endpoint` allows egress everywhere. Consider tightening.
----- Verifying Database settings -----
Your EC2 AMI will update as newer images are available. This means your VM will occasionally be destroyed and recreated.
Your docker db container will destroyed when you EC2 AMI is updated. Ensure this fits your intention.
You have not enabled Deletion Protection on your external DB. This is HIGHLY recommended for Production instances. If you want this, set `db_deletion_protection` to true.
You have disabled a final snapshot of your external DB. Enablement of this feature is recommended for Production.
Finished tfvars configuration check.
@gwright99
Copy link
Collaborator Author

gwright99 commented Jul 12, 2024

Note to self: Don't forget need to make it very clear in documentation that the buffered logger needs to be used with the external python scripts, since the normal logger emits to stdout and TF thinks this is the response from the external resource.

Normal logger will cause errors like:

│ Error: Unexpected External Program Results
│ 
│   with data.external.generate_db_connection_string,
│   on 000_main.tf line 66, in data "external" "generate_db_connection_string":
│   66:   program = ["python3", "${path.module}/.githooks/data_external/generate_db_connection_string.py"]
│ 
│ The data source received unexpected results after executing the program.
│ 
│ Program output must be a JSON encoded map of string keys and string values.
│ 
│ If the error is unclear, the output can be viewed by enabling Terraform's logging at TRACE level. Terraform documentation on logging: https://www.terraform.io/internals/debugging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant