antonbabenko / modules.tf-lambda

Infrastructure as code generator - from visual diagrams created with Cloudcraft.co to Terraform
https://www.cloudcraft.co/
MIT License
351 stars 56 forks source link

Set folder names matching names of components on diagram #22

Closed antonbabenko closed 4 years ago

antonbabenko commented 4 years ago

Is your feature request related to a problem? Please describe.

Names of folders are confusing - rds_1, security-group_1...

Describe the solution you'd like

Use names from components, replace strange characters with single _

Additional context

cloudcraft-proposal-naming

antonbabenko commented 4 years ago

@genaker This was way easier than I expected, fixed and deployed.

Thanks for the feedback!

Genaker commented 4 years ago

Thanks Grate Job!

On Sun, Mar 22, 2020 at 8:32 AM Anton Babenko notifications@github.com wrote:

@Genaker https://github.com/Genaker This was way easier than I expected, fixed and deployed.

Thanks for the feedback!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/antonbabenko/modules.tf-lambda/issues/22#issuecomment-602226724, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGJNZQRKCQSRBXZTX6VQV3RIYVRVANCNFSM4LF5QFHA .

Genaker commented 4 years ago

It can be an issue. I didn't try to run it but

dependency "aws-data" {
  config_path = "../aws-data"
}

dependency "Production-VPC" {
  config_path = "../Production-VPC"
}

dependency "SSH22-SecurityGroup" {
  config_path = "../SSH22-SecurityGroup"
}

dependency "WebNode-LoadBalancer" {
  config_path = "../WebNode-LoadBalancer"
}

where folder actually is lowercased

Possible solutions:

  1. Lowercase this part of code generation also

config_path = "../webnode-loadnalancer"

  1. Don't lowercase the names of the folders
antonbabenko commented 4 years ago

Fixed in 6d21738 by lowercasing directory name.

Genaker commented 4 years ago

Thank! Awesome module!

On Tue, Mar 24, 2020 at 2:52 AM Anton Babenko notifications@github.com wrote:

Fixed in 6d21738 https://github.com/antonbabenko/modules.tf-lambda/commit/6d217385f296242dba22bc3b2f9981a8713a869d by lowercasing directory name.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/antonbabenko/modules.tf-lambda/issues/22#issuecomment-603139283, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGJNZRZPEWISOGI7NQP4LTRJB7GRANCNFSM4LF5QFHA .

Genaker commented 4 years ago

I'm also thinking root folder has name of region (us-west-1). Maybe it is better to name it by VPC name (production)?

antonbabenko commented 4 years ago

No, resources are grouped according to public cloud provider model (AWS account => region (or global) => resource)