#terraform-0_12 - February 2019

39 messages

Discuss upgrading to terraform 0.12

Archive: https://archive.sweetops.com/terraform-0_12/

February 2019
antonbabenko
antonbabenkoover 7 years ago
Trying 0.12 while at CfgMgmtCamp hackathon - it works for the majority of cases for people around me who is trying it on more or less real resources and works well enough for me and some small modules - no panics, no bugs which can’t be fixed.
antonbabenko
antonbabenkoover 7 years ago
I think it is time to dedicate more efforts on updating modules.
bamaral
bamaralover 7 years ago
I agree
bamaral
bamaralover 7 years ago
@antonbabenko I created some AWS modules for tf0.12
bamaral
bamaralover 7 years ago
I just created a PR on https://github.com/terraform-aws-modules/terraform-aws-s3-bucket, but I think it's better we create a specific branch for it.
antonbabenko
antonbabenkoover 7 years ago
Cool. I will check it out tomorrow. I also started writing the same module today after several attempts of making it for 0.11 :) exciting!
bamaral
bamaralover 7 years ago
Hi @antonbabenko
bamaral
bamaralover 7 years ago
bamaral
bamaralover 7 years ago(edited)
I created modules terraform-aws-autoscaling and terraform-aws-launch-config for terraform_0.12
bamaral
bamaralover 7 years ago
Could you please create a branch in the terraform-aws-autoscaling repository where I can send a PR?
bamaral
bamaralover 7 years ago
perhaps, it could be a good idea to have a terraform-aws-launch-config module
joshmyers
joshmyersover 7 years ago
@bamaral can you fork it, add whatever and then open a PR against ours?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Yes, this opens up an interesting question
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Should we start (temporary) yet longer lived branches for 0.12
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
So that we can front load some of the work
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
@joshmyers any strategic advice on how we should handle this across all repos?
joshmyers
joshmyersover 7 years ago
Painfully?
joshmyers
joshmyersover 7 years ago
Take the most used modules first or the ones which do could really require 0.12 features
joshmyers
joshmyersover 7 years ago
Folks spend an hour a day moving things over?
joshmyers
joshmyersover 7 years ago
longer lived branches are the only way to do it
bamaral
bamaralover 7 years ago
Hi @joshmyers, I'll check yours
bamaral
bamaralover 7 years ago
I think it is a good idea
antonbabenko
antonbabenkoover 7 years ago
@bamaral I am away for a few days, and then will take a look at your PR. As always, fork and send a pr to the origin repo. Thanks!
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Cool we will also get some 0.12 branches ready
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Wonder what the implications will be on versioning
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago(edited)
How should we version our releases if we have long lived branches?
Krit
Kritover 7 years ago
What are your takes on the points that he raises, as prolific module creators?
bamaral
bamaralover 7 years ago
@joshmyers I think that the module on the repo is more specific and I evaluate that the part related to the autoscaling group resource is compatible with the tf-0_12 version. I created a general purpose module where for example I don't set tags and these values should be passed through an upper module. Or should I create a PR with the generic approach? https://github.com/bamaralf/terraform-aws-autoscaling/blob/tf-0_12/main.tf
joshmyers
joshmyersover 7 years ago
@bamaral pretty big change in a single commit (239 additions and 1,210 deletions), looks good but I’m not quite sure what to be looking at. Any chance you can open a PR with info how it has been tested etc?
bamaral
bamaralover 7 years ago
@joshmyers On my repository, I decouple the autoscaling_group resource and this is the reason you found so many deletions. I don't think it is mergeable. On your repository you create a launch_template, a autoscaling_group and "attach" the launch template to this asg. I don't know if it's interesting to add the launch_template "attachment" as a dynamic block since the behavior of the module is to create the launch_template and attach it. But I think we can use a dynamic block here: https://github.com/cloudposse/terraform-aws-ec2-autoscale-group/blob/7af452e82effc45c0fb776a54cb594d7a27784d7/main.tf#L63
bamaral
bamaralover 7 years ago
I will create a PR with this change
bamaral
bamaralover 7 years ago
in fact, we can use one of these arguments on the aws_autoscaling_resource "tags" (map) or "tag" (config block). Since you are using the "tags" argument, that is fine.
bamaral
bamaralover 7 years ago
I'll just check tha compatibility of the module with the terraform alpha version
erik
erikover 7 years ago
set the channel description: Discuss upgrading to terraform 0.12

Archive: https://archive.sweetops.com/terraform-0_12/
Maarten van der Hoef
Maarten van der Hoefover 7 years ago
Was actually looking for a pre-0.12 module 🙂 . Nice to see some have done some 0.12 effort already. Have to backport unfortunately 🙂

https://github.com/innovationnorway/terraform-github-repository/blob/master/main.tf
antonbabenko
antonbabenkoover 7 years ago
🙂 one day you will discover my Azure module in that org too - https://github.com/innovationnorway/terraform-azurerm-network . Not for 0.12 though.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
a lot of interesting things going on in innocationnorway