Giter Site home page Giter Site logo

flaconi / terraform-aws-microservice Goto Github PK

View Code? Open in Web Editor NEW
17.0 13.0 7.0 290 KB

Boilerplate Terraform Module for creating resources for typical micro services.

License: MIT License

Makefile 9.28% HCL 90.72%
terraform terraform-module terraform-aws redis dynamodb rds elasticache sqs aws

terraform-aws-microservice's People

Contributors

cytopia avatar czerasz-flaconi avatar danvaida avatar flaconi-robert-rudow avatar hajati avatar maartenvanderhoef avatar ronny-panknin-flaconi avatar runderwoodcr14 avatar snovikov avatar vikkasyousaf avatar zxpower avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-aws-microservice's Issues

Potential overwrite of resources with dynamodb and dynamodb2_name

Finding found by @ronny-panknin-flaconi :

Description

Looking at the dynamodb.tf and dynamodb2.tf configuration, there seems to be an issue with name collision :

1/2 building locals

dynamodb.tf

locals {
  dynamodb_name = length(var.dynamodb_name_override) > 0 ? var.dynamodb_name_override : var.name
}

dynamodb2.tf

locals {
  dynamodb2_name = length(var.dynamodb2_name_override) > 0 ? var.dynamodb2_name_override : var.name
}

2/2 local name assignment

dynamodb.tf

module "dynamodb" {
  ...
  namespace = ""
  stage     = ""
  name      = local.dynamodb_name
  ...

dynamodb2.tf

module "dynamodb2" {
  ...
  namespace = ""
  stage     = ""
  name      = local.dynamodb2_name

Issue

If neither var.dynamodb_name_override nor var.dynamodb2_name_override are specified, which are optional, the one which gets rolled out later would/could overwrite the first one.

How to resolve?

This is tricky and there are multiple solutions to it, the big question is how do we make it consistent and easily understandable? Current consistency is to use var.name as the single point of truth for resource names.

Only thing I could come up with is to make dynamodb(2)?_name_override required, which however (will be inconsistent with other services provided.

@maartenvanderhoef any thoughts on this one?

Misssing rds parameters

Following RDS parameters are required for some services:

  • auto_minor_version_upgrade
  • copy_tags_to_snapshot
  • enabled_cloudwatch_logs_exports

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.