DEV Community

Discussion on: ECS Fargate Service Auto Scaling with Terraform

Collapse
 
sathyabhat profile image
Sathyajith Bhat • Edited

Hey, pretty good write up. I have only couple of suggestions:

  • better tags. I'm glad to see at-least one tag, adding some extra tags (for ex, I add a "used_for" tag for every stack I built) helps me analyze and possible revise stacks for cost savings/analysis
  • Terraform variable blocks can accept description, default and type constraints modifiers. Description is useful for documentation (alternatively, it prompts the description when used as an input variable), defaults can help set some sane default values and type constraints ensure you enter the right type.
  • For new folks, I really don't recommend touching the NACLs - the defaults are good and security groups provide a good enough firewall and updating NACLs without understanding the "stateless" mechanism can lead to lot of head-scratching on why something is broken.
  • Given DockerHub's new rate limiting policies, I think storing images in ECR is definitely worth it Great post overall!
Collapse
 
kieranjen profile image
Kieran Jennings

Thanks for the feedback!

I tend to add a "Billing" tag to the resources so then they can be grouped in Cost Explorer. I will add that in!

I always seem to forget about variable descriptions and types!

I did mention the cost aspect of NAT gateways but I will make sure it's clearer.

I was so hesitant about putting in NACLs! I think everyone has been burned by NACLs at some point 😁 I will take them out to avoid confusion.

Again thanks for the feedback! I'm new to blogging and trying to make the call on what can be too confusing for people when reading. It's great to have someone else's opinion.

Collapse
 
dosaki profile image
Tiago Correia

Maybe put a note at the top of the NACLs section just to warn people "You can do this if you want, but the defaults are ok if you're a beginner"?

Thread Thread
 
sathyabhat profile image
Sathyajith Bhat

Yep, totally

Collapse
 
sathyabhat profile image
Sathyajith Bhat

Kieran,

I missed reading up about the NAT gateways and its quite clear, hence I edited out my post. Your first post is quite impressive and look forward to reading more. Cheers

Thread Thread
 
kieranjen profile image
Kieran Jennings

Thank you!