-
Notifications
You must be signed in to change notification settings - Fork 1
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
Linting, security scans and docs 🥇 #1
Conversation
… unuses variables, and pinning provider versions
1b8942e
to
2dff9d4
Compare
_local.tf
Outdated
registry_username = data.aws_ecr_authorization_token.this.user_name | ||
registry_password = data.aws_ecr_authorization_token.this.password | ||
service_data = { | ||
service_data = var.service_data == {} ? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small item, non-blocking: would it be more legible for us to use the coalesce
function here, so the last part of the ternary isn't dangling off the end of the block a few dozen lines down?
More info here: https://developer.hashicorp.com/terraform/language/functions/coalesce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! I looked at coalesce,
which seems like a good win for readability. 🔺
I also took a peak at merge
, I could see using it to allow for more refined control of the service_data object without needing to pass in the entire blob. ( like maybe I just want the orchestration service to have more memory) That said, it will not work for today, so I'll file that away in the maybe someday column.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After testing coalesce, I got some very weird behavior. The most consistent behavior came from checking the service_data
object with this:
length(var.service_data) > 0 ? var.service_data : ...
I'd like to use this version; it's consistent and solves the issue of var.service_data
getting lost at the end.
ecr-viewer = { | ||
short_name = "ecrv", | ||
fargate_cpu = 1024, | ||
fargate_memory = 2048, | ||
min_capacity = 1 | ||
max_capacity = 5 | ||
min_capacity = 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, no. This is going to be one of these stylistic areas that gives me fits. Is this JSON or YAML here? I've got a similar structure in dibbs-azure
for the block definitions that uses no commas whatsoever. I'm in the camp that they clutter things unnecessarily unless they are explicitly needed by the language spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for going over the feedback with me, and for looking into the potential changes! Your logic for your choices is sound, and I defer all those decisions to you. Thanks for your work on this!
DEVOPS PULL REQUEST
Related Issue
Changes Proposed
terraform
andaws
pluginsAdditional Information