commitdev / zero-aws-eks-stack

zero module for a basic AWS kubernetes stack on EKS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add option to enable/disable cloudtrail for cost savings

bmonkman opened this issue · comments

It can add $5-10 per month and may not provide much value to a smaller company so let's let people start without it if they want.
We can prompt for this during init and default to no

commented

Planned work

  • add a configuration option to the module definition to capture the option.

  • conditionally include the include/exclude the module in main.tf

Note that there's also some code in user_access.tf that references the cloudtrail bucket id that will need to be made conditional.

Also just to clarify, the option doesn't need to be added to the CLI directly, just to the module definition file.

commented

Not that there's also some code in user_access.tf that references the cloudtrail bucket id that will need to be made conditional.

saw the reference when I initially searched for the cloudtrail keyword in the repo;
but wasn't sure if I needed to change it. thanks for clarifying 👌

Do we use countcontrolled by a variable to configure this module?

Not at the moment, that's what will need to be added, as well as a zero module parameter so that the user can decide to enable or disable this feature. The value of the parameter can be templated into shared/main.tf as a local and then used in a count statement.