-
Notifications
You must be signed in to change notification settings - Fork 3
ccl-2374 (review modules) #227
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
Draft
jakebarkerHO
wants to merge
36
commits into
main
Choose a base branch
from
ccl-2374
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Author
|
Will rebase tomorrow with my other GPG key 🙄 |
…e more consistent
Author
|
Rebased with gpg key. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merging
This is not ready to be merged. There are some potentially breaking module input changes to discuss.
Changes
General feedback
terraform fmt. Consider validating the fmt as part of the checks. This will help reduce the amount of noise in each PR.Common Findings
Restricting service calls
Some role trust policies for AWS services were missing restrictions on where the role can be assumed from. There are a few ways to solve this, but one of the easiest and most consistent is to use the aws:SourceAccount condition key.
AWS KMS keys
Encryption with AWS KMS customer managed keys was missing from a range of resources. Internal modules are a great opportunity to be prescriptive and build resources that conform with internal policies.
Other considerations
@samiwelthomasHO - I have added some commented changes to consider in some of the code (grep
consider). These are regarded as good practices ... but may be in friction with a design decision. I dont have the context of those decisions. Example - dropping HTTP headers on load balancers.Consider dropping providers from inside of modules (this may be incompatible with how terragrunt works). Once a module, with a provider, has been added it becomes very difficult to remove the resources. It can also limit the ability to run some arguments, like count and for_each. HashiCorp has released some guidance on providers in shared modules: https://developer.hashicorp.com/terraform/language/modules/develop/providers#legacy-shared-modules-with-provider-configurations.