Skip to content
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

Last minute fixes (module is almost ready) #1

Closed
4 tasks done
antonbabenko opened this issue Oct 1, 2017 · 3 comments
Closed
4 tasks done

Last minute fixes (module is almost ready) #1

antonbabenko opened this issue Oct 1, 2017 · 3 comments

Comments

@antonbabenko
Copy link
Member

antonbabenko commented Oct 1, 2017

I am almost done with this module. Remaining:

I need a second look at all of this, so could you guys take a look and tell me if you see something completely bad/wrong/missing in this module?

/cc @kamilboratynski @brandoconnor @solarce @hakamadare @joestump @tfhartmann ...

@brandonjbjelland
Copy link
Contributor

brandonjbjelland commented Oct 3, 2017

Quite a different structure than the previous repo now that the registry imposes some constraints. Overall, it looks good to me but here are a few critiques:

  • a few of the outputs are the same as their input variables. Where this is the case, I don't think an output is needed (e.g. this_security_group_vpc_id, this_security_group_description). Outputs (in my opinion) should really consist of strings generated by terraform apply that will be useful to other resource declarations or to the operators.
  • I tend to avoid filling in descriptions as done here. There are a handful of AWS resources (SG used to be one of them) where if the description is changed from TF the resource will be destroyed and recreated. In light of that and the inconsistency of that policy across various resources, I choose to eliminate the overhead of having to think about that and look it up for each resource and instead always use a tag to create descriptions. That could have been fixed but I would still guess there to be gotchas here and there around description changes.
  • the map of rules is an interesting and good way to handle the data. I wish we were able to use a map of maps and not rely on the order of the array but I haven't tried to come up with something like this yet. Probably possible; likely wouldn't be so elegant.

@antonbabenko
Copy link
Member Author

Thanks for the feedback.

I like to treat Terraform resource modules as dumb and logicless (almost) as possible, but versioned. It means all names, outputs, variables, descriptions, types of variables are the same as in Terraform documentation. This way consumers of these modules don't have to think about minor things and think more about how to combine these modules together to create infrastructure modules, which we don't have here (yet).

A security group has default description, which users of this module can override. It won't cause recreation of the security group.

I tend to use the standard types of outputs (as returned by Terraform) and play with maps or custom structures in higher level (eg, infrastructure modules).

antonbabenko pushed a commit that referenced this issue Oct 26, 2017
Merge pull request #9 from Shapeways/master
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants