#terraform-0_12 (2019-05)

terraform

Discuss upgrading to terraform 0.12

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

2019-05-09

Exequiel Barrirero avatar
Exequiel Barrirero
Releasing Terraform 0.12.0-rc1

Release candidate 1 of Terraform 0.12.0 is now available for testing. Unless testing identifies a significant blocker, we expect to publish the final 0.12.0 release a few weeks fro…

2
Exequiel Barrirero avatar
Exequiel Barrirero

Almost there!

Exequiel Barrirero avatar
Exequiel Barrirero

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

wow

1

2019-05-22

Exequiel Barrirero avatar
Exequiel Barrirero
hashicorp/terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is an open source tool that codifies APIs into declarative configuration files that can be shared amon…

Exequiel Barrirero avatar
Exequiel Barrirero

Finally! Terraform 0.12 is here to stay!

party_parrot8
terraform4
Exequiel Barrirero avatar
Exequiel Barrirero
Announcing Terraform 0.12

We are very proud to announce that Terraform 0.12 is officially released. Terraform 0.12 is a major update that includes dozens of improvements and features spanning the breadth a…

party_parrot5
1
github-check-mark1
terraform2
btai avatar

i know they really tried to focus on making the 0.11 -> 0.12 migration easy (even providing a migration tool), but im curious to see how much of a headache (or lack thereof) it will be

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Has anyone done his yet for a sizable terraform codebase?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

(I guess I’m more interested in a non-monorepo migration)

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

…though this is a great case for mono-repo

loren avatar

I’d expect similar types of updates, plus a little workflow around versioning… Pin references to nested modules (which you should be doing anyway), update leaf modules, release those updates as new versions, update parent modules once all nested/leaf modules are good

loren avatar

For sure it’ll suck more if you feel the need to backport patches to support two major versions at once

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

(basically, we have 130+ repos… so it’s gonna hurt. a lot and we don’t have a graph of how they are related, so planning it out is difficult)

2
btai avatar

nope, kinda worried to

btai avatar

even now some of the providers i use are pretty fickle (when using them together - azure, kubernetes, helm, etc)

Andrew Jeffree avatar
Andrew Jeffree

well my first upgrade to 0.12 went well

1
Andrew Jeffree avatar
Andrew Jeffree

but it was a relatively simple thing

Andrew Jeffree avatar
Andrew Jeffree

all our datadog monitors

Andrew Jeffree avatar
Andrew Jeffree

for all our customers

Andrew Jeffree avatar
Andrew Jeffree

so 20~ modules used about 40 times each, with about 3 or 4 resources per module. The most time consuming part was upgrading the modules, docs and publishing new versions etc.

2019-05-23

Nikola Velkovski avatar
Nikola Velkovski
- vpc.label in .terraform/modules/vpc.label
There are some problems with the configuration, described below.

The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.

Error: Attribute name required

  on .terraform/modules/dynamic_subnets/private.tf line 34, in resource "aws_subnet" "private":
  34:     ignore_changes = ["tags.%", "tags.kubernetes", "tags.SubnetType"]

Dot must be followed by attribute name.


Error: Attribute name required

  on .terraform/modules/dynamic_subnets/public.tf line 35, in resource "aws_subnet" "public":
  35:     ignore_changes = ["tags.%", "tags.kubernetes", "tags.SubnetType"]

Dot must be followed by attribute name.

Nikola Velkovski avatar
Nikola Velkovski

ah

Nikola Velkovski avatar
Nikola Velkovski
cloudposse/terraform-aws-dynamic-subnets

Terraform module for public and private subnets provisioning in existing VPC - cloudposse/terraform-aws-dynamic-subnets

Nikola Velkovski avatar
Nikola Velkovski

Is there any roadmap for making the module 0.12 compatible? Let me know if I can be of help somehow.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

We will inevitably support 0.12, but not until there’s more mainstream adoption.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Most likely it will come from (cloudposse) customer demand.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

I think we might need to start with a master/0.12 branch and go from there.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

also, it will mess with versions. We’ll probably need to affix +0.12 to the semmver

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

e.g. 0.1.2+0.12

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

and doubt we’ll be backporting fixes.

Nikola Velkovski avatar
Nikola Velkovski

Allright, thanks for the info.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Welcome suggestions from community on how we can straddle the two worlds.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

And if the proposal above make sense.

2019-05-24

loren avatar
tf 0.12.0: Call to function "matchkeys" failed: lists must be of the same type. · Issue #21432 · hashicorp/terraform

Terraform Version > terraform012 -version Terraform v0.12.0 Terraform Configuration Files locals { foo = ["foo", "bar", "baz"] match = "${matchkeys(local.foo, …

loren avatar

looks like they might have just run the upgrade tool on everything?

2019-05-26

2019-05-28

Gosia avatar

hey, a little question regarding 0.12, seems the feature of generating resources based on count and value list still keeps resources list in statefile in an indexed structure, is there a workaround? Still can’t remove an element from anywhere but the end of the list without forcing a replace on remaining elements.

loren avatar

That’s still a limitation in this release… They’ve indicated it will be addressed in 0.12.x, but no indication of what value of x… (Other than not 0)

Gosia avatar

aww, sucks, but thank you

loren avatar
Attributes as Blocks - Configuration Language - Terraform by HashiCorp

For historical reasons, certain arguments within resource blocks can use either block or attribute syntax.

terraform2
antonbabenko avatar
antonbabenko

I think it is a good idea to read the whole Terraform docs, because there are few things here and there. Attrs as blocks is one of the most trickiest

loren avatar

yeah, i’m not a fan of that change. makes it impossible for many resources to write modules that work for both tf 0.11 and tf 0.12

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

hah, is there even a point to try and make them compatible?

loren avatar

i wanted an upgrade path of this kind:

  1. update modules to be cross-compatible as a patch release
  2. update the executing project to use tf 0.12
  3. leisurely update modules to leverage tf 0.12 syntax
loren avatar

1 is fast, easy, and low risk

loren avatar

and gives users an inflection point for their own upgrade paths. hashicorp is doing the same thing for providers with their SDK and with tf 0.11.14

David Nolan avatar
David Nolan

I think adding version tags in your modules is the supported approach. Honestly this upgrade is going to be long enough and slow enough I suspect branches or forks will end up having to be the real world answer.

2019-05-29

joshmyers avatar
joshmyers

Doesn’t look like that module has too many….hairy parts…..the rest of us have been using hacks on hacks on hacks

2019-05-30

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

any handy 0.12 cheatsheets?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
rberlind/terraform-0.12-examples

Some Terraform 0.12 Examples. Contribute to rberlind/terraform-0.12-examples development by creating an account on GitHub.

    keyboard_arrow_up