-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Terraform v0.13.0 beta program #25016
Comments
Hello, we are testing the new Our case is as follows: We have a
Line 89 refers to this section:
And the local variable is this:
Here is a simplified version of our terraform file:
* If we put the vpc_id hard coded, the What are we doing wrong, or, how can we make the |
Try replacing I wrote the Transit Gateway module, you are using but I have been busy last couple hours and didn't try Terraform 0.13 yet, so my proposal may not work. |
@dotenorio @antonbabenko I am thrilled that you're trying out the beta, but this particular GitHub issue is just for announcements. The best place to have discussions about this is on the community discussion forum, or file an issue in this repository if you're fairly confident it's a bug. If people keep posting here, it'll get unmanageable quick because everyone will get updates they aren't interested in. The Terraform community is just too big to have all discussions in one GitHub issue. If discussion continues in here I will have to lock the thread, to ensure that discussions happen in the right places. I've been reluctant to do that because when it's locked, it seems like people can't add themselves as participants. |
I am trying to use count on modules in a very interesting way and it seems to not like what I am doing. I was hoping to get some recursive functionality out of this by using counts to control a module calling itself to provide some nested goodness. What I found is that if a module includes it self with a count of even 0 it will infinitely include itself until the file name is too long and then die. Here is the code I used: Here is the module: variable "parent" {
type = string
}
variable "part" {
type = string
}
variable "sub_parts" {
type = list(any)
}
locals {
this_part = ["${var.parent}/${var.part}"]
}
module "subs" {
source = "./"
count = length(var.sub_parts)
parent = local.this_part
part = var.sub_parts[count.index]["part"]
sub_parts = var.sub_parts[count.index]["sub_parts"]
}
output "paths" {
value = concat(local.this_part, module.subs.*.paths)
type = list(string)
} Here is the code to invoke it: locals {
paths = [
{
part = "foo"
sub_parts = [
{
part = "Bar"
sub_parts = []
},
{
part = "Bar 2"
sub_parts = []
},
{
part = "Bar 3"
sub_parts = [
{
part = "Baz"
}
]
},
{
part = "Bar 4"
sub_parts = []
}
]
},
{
part = "foo 2"
sub_parts = []
},
{
part = "foo 3"
sub_parts = []
},
{
part = "foo 4"
sub_parts = [
{
part = "Bar 2"
sub_parts = []
}
]
}
]
}
module "subs" {
source = "./pather"
count = local.paths
parent = "/"
part = local.paths[count.index]["part"]
sub_parts = local.paths[count.index]["sub_parts"]
}
output "paths" {
value = flatten(module.subs.*.paths)
} What I expected to get was an output of paths that is a list of all the paths it made from the local variable. The use-case for this is obviously not to just create some list for an output (although could be useful maybe?) but we use API gateway a lot and I was hoping to be able to somewhat build out a list of paths and methods we want to use complete with other data api gateway needs and have 1 module to set it all up. This is the only way I can think of to accomplish this type of behavior since loops in terraform are not blocks that can simply just be wrapped around other things. After getting that error and realize why it is probably happen I am not sure if what I want to do will be possible. I understand that terraform needs to download all the modules it thinks its going to need before it starts doing anything so if that Maybe if terraform detects a module is calling itself it could behave slightly differently? |
I'm going to lock this thread because of continuing discussion. I want to be clear that we really, really want feedback, want input, and want to hear you experiences trying the beta. That's the whole point of running a beta. This just cannot be the forum, because having hundreds of people talk about multiple issues in one GitHub thread will make it impossible to discuss any of them productively. If you see an outright bug, please report it via GitHub and link to this issue. For general discussion, please use the community forum, and include "0.13" in the subject so it's clear it's about the beta. For people who have already commented on here, please file new issues or move to the community forum. I'm going to remove those comments in the next few days, but wanted to leave the text up so you'd have the opportunity to re-post elsewhere. |
Terraform 0.13.0 beta 2 is now available at https://releases.hashicorp.com/terraform/0.13.0-beta2/. Please give it a try and let us know how it works for you! |
Terraform 0.13.0 RC 1 is now available at https://releases.hashicorp.com/terraform/0.13.0-rc1/. Unless significant bugs are discovered, this will be the last pre-release prior to GA. If you've been holding off on testing, or you tested beta 1 and haven't touched it again, this is the opportunity to test and understand what impact GA will have on your infrastructure. In most cases, I'm expecting this to be a very straightforward update. Where it's not, we would love feedback on the upgrade guide to help explain possible upgrade issues. |
0.13.0 has shipped into GA! Thank you so much to everyone who participated in the beta and RC program and gave feedback. Please try 0.13 and let us know how it goes! |
We just launched Terraform 0.13.0 beta 3! We need your help, and want to hear from you. You can download beta 2 on releases.hashicorp.com.
Updated Release Schedule
We found (and fixed) two issues late in the beta 3 cycle, so have postponed RC1 and the GA dates to give people a chance to test RC1 in pre-production environments. Updated release dates below:
RC1 is scheduled to ship Wednesday, July 15GA is scheduled to ship Wednesday, July 29RC1 shipped Wednesday, July 22
GA is scheduled to ship Monday, August 10
If we find serious bugs during beta 3 or RC1 that we can't fix in time, or we have such a high rate of bugs reported that we're concerned about additional undiscovered bugs, we may do another beta or RC release as necessary and postpone the GA release by another two weeks.
What's Changing
The headline features we're especially excited about are:
hashicorp
namespace. The blog post describes this improvement in more detailcount
,for_each
, anddepends_on
.depends_on
currently has a known limitation around data sources.There are a bunch of other great improvements listed in the CHANGELOG, as well as breaking changes you should be aware of.
How to get started
terraform 0.13upgrade
Documentation
Our documentation web site cannot serve documentation for multiple versions of Terraform at the same time, so we are ad-hoc linking to 0.13 specific documentation here to support the beta. When 0.13 GA is released, we will publish these to the official web site.
Provider source
Module Expansion
Warnings & Known Issues
Please note that this is a beta, and will contain bugs. You probably shouldn't use this with production infrastructure, and if you do, it will upgrade your state file and you won't be able to use it with 0.12 anymore.
We are tracking known issues via GitHub. You can see:
How to give Feedback
Please use the thread I created on the community discussion forum for most discussion, and report bugs via GitHub and link to this issue.
The goal of this beta is to get community input, especially on bugs and edge cases that we didn't catch in our testing. We test extensively, but Terraform is used in such a wide range of use cases that some of them won't be caught by testing.
We're also very interested in people's use cases, experiences getting started and upgrading, what was surprising, examples of cool cases we might put in the docs or blog posts, and so on - please send those to ddreier@hashicorp.com (me, Terraform OSS Engineering Manager) and petros@hashicorp.com (Petros Kolyvas, Terraform OSS Product Manager). Interesting example use cases around the new module expansions are especially interesting here, and we would really like to incorporate community feedback into the documentation and future versions of the upgrade guide.
If you're interested and want a reminder when the beta is released, watch this issue. We'll be posting announcements here. Locking the issue seems to prevents people from watching it, I'm hoping to keep it unlocked. Please use the discussion post for avoid excess noise on here!
The text was updated successfully, but these errors were encountered: