--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/253b9c91-5469-4a78-990e-53a0790091dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CANarjTgRdsGdmTDX0GiH_Q55HWiSJX0E7L%3DjDcAs5VaYqoqL9w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CAN3s8zb%3DogoFoR8RJ_iO6N%2B9vUzGfQmcjPBUbB-%2BOM2SHq7khw%40mail.gmail.com.
Huh? How is that an answer to any of my problems described in the email? I don't want to pass json to terraform. I want to have variables of compound type and still be able to get individual values back out. Passing JSON in gets me mowhere, since I have no tools for manipulating json within terraform.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CAGcMw-h7PtybrXn1HVti-aRC2CYHXsoq4K012FhPq9FXfUaYwQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CANarjTjeLU5orQgOX5bdYB5w%2Bf_tG_SbBxs1ysQ-gLWpOXZVhg%40mail.gmail.com.
So workaround the glaring holes in terraform by actually doing all the work in an entirely different tool and then rendering the terraform config from there? That's just a great solution. Isn't the whole point of terraform supposed to be to allow declarative infrastructure and state management? Now I have to write imperative code to render the declarative template so that the tool can work? At that point, why wouldn't I just write imperative code which calls the AWS-SDK directly - a method which is both simpler and FAR faster to implement than what you've suggested? If a tool is so lacking in features that you have to wrap it in yet another tool to make it even marginally useful, what utility does the tool actually offer? The whole point is to keep state about resources in variables and to have STATIC templates for defining those resources. If I have to have dynamically generated templates, that breaks everything else within my infrastructure, which was all implemented according to 'best practices' suggested by the terraform community, splitting my variables from my templates and using terragrunt to combine them at execution time. But I can't do that if I have to render my templates dynamically.But more to the point, json doesn't actually help with this problem, whether I pre-render it prior to feeding it to terraform or not. My whole problem stems from wishing to create a list of similar resources with a single resource declaration and a list to iterate over in order to populate the resource with actual values. The whole point is to declare a resource once, with a count, and then allow terraform to extract values from variables dynamically. But I cannot do that, with jsonnet or terraform templates, because I have no way to do the dynamic lookups when trying to populate the variables at the point where terraform turns a resource with count > 1 into multiple resources. The json solution offers absolutely NOTHING to assist with that - other than, I suppose, to render the entire list of nearly identical resources as a giant long list of individual resources in the template - which then means I won't be able to use terraform's splat syntax for referring to them en-masse or otherwise extracting values from one resource and using it in another, since my resources would be dynamically generated, so how to refer to them? I suppose I have to manually iterate over the resources in jsonnet and construct output variables dynamically, too? JSON is barely a kludge for this problem, let alone a real solution.And looking at the jsonnet examples, I can only imagine how much coding by trial-and-error I'll have to do to even figure out what the JSON syntax is supposed to look like, since it looks pretty much nothing like the HCL versions. Every single template is going to require hours or days of trial and error to figure out how to structure things so that it actually works.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CAGcMw-hRedkc3uThrDQfQtDGAycVFeGOVjQOxZ%3DYDdDgT45SAw%40mail.gmail.com.
So workaround the glaring holes in terraform by actually doing all the work in an entirely different tool and then rendering the terraform config from there? That's just a great solution. Isn't the whole point of terraform supposed to be to allow declarative infrastructure and state management? Now I have to write imperative code to render the declarative template so that the tool can work? At that point, why wouldn't I just write imperative code which calls the AWS-SDK directly - a method which is both simpler and FAR faster to implement than what you've suggested? If a tool is so lacking in features that you have to wrap it in yet another tool to make it even marginally useful, what utility does the tool actually offer? The whole point is to keep state about resources in variables and to have STATIC templates for defining those resources. If I have to have dynamically generated templates, that breaks everything else within my infrastructure, which was all implemented according to 'best practices' suggested by the terraform community, splitting my variables from my templates and using terragrunt to combine them at execution time. But I can't do that if I have to render my templates dynamically.But more to the point, json doesn't actually help with this problem, whether I pre-render it prior to feeding it to terraform or not. My whole problem stems from wishing to create a list of similar resources with a single resource declaration and a list to iterate over in order to populate the resource with actual values. The whole point is to declare a resource once, with a count, and then allow terraform to extract values from variables dynamically. But I cannot do that, with jsonnet or terraform templates, because I have no way to do the dynamic lookups when trying to populate the variables at the point where terraform turns a resource with count > 1 into multiple resources. The json solution offers absolutely NOTHING to assist with that - other than, I suppose, to render the entire list of nearly identical resources as a giant long list of individual resources in the template - which then means I won't be able to use terraform's splat syntax for referring to them en-masse or otherwise extracting values from one resource and using it in another, since my resources would be dynamically generated, so how to refer to them? I suppose I have to manually iterate over the resources in jsonnet and construct output variables dynamically, too? JSON is barely a kludge for this problem, let alone a real solution.And looking at the jsonnet examples, I can only imagine how much coding by trial-and-error I'll have to do to even figure out what the JSON syntax is supposed to look like, since it looks pretty much nothing like the HCL versions. Every single template is going to require hours or days of trial and error to figure out how to structure things so that it actually works.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CAGcMw-hRedkc3uThrDQfQtDGAycVFeGOVjQOxZ%3DYDdDgT45SAw%40mail.gmail.com.
At that point, why wouldn't I just write imperative code which calls the AWS-SDK directly - a method which is both simpler and FAR faster to implement than what you've suggested?
And looking at the jsonnet examples, I can only imagine how much coding by trial-and-error I'll have to do to even figure out what the JSON syntax is supposed to look like, since it looks pretty much nothing like the HCL versions. Every single template is going to require hours or days of trial and error to figure out how to structure things so that it actually works.
Not sure what about your excellent way of engaging volunteers to help you made me respond, but there is one other way to process more complex documents like you want. Put the full configuration you want into a json file, then write a shell script that takes an input parameter and outputs a more flattened json document with only what you need back. It can usually be wrangled to work pretty simply, not a ton of code, tools most of us use pretty regularly anyway. I used it once to pull values out of ansible vault for example.On Fri, Jan 12, 2018 at 2:20 PM, Samuel Gendler <s...@stem.is> wrote:
So workaround the glaring holes in terraform by actually doing all the work in an entirely different tool and then rendering the terraform config from there? That's just a great solution. Isn't the whole point of terraform supposed to be to allow declarative infrastructure and state management? Now I have to write imperative code to render the declarative template so that the tool can work? At that point, why wouldn't I just write imperative code which calls the AWS-SDK directly - a method which is both simpler and FAR faster to implement than what you've suggested? If a tool is so lacking in features that you have to wrap it in yet another tool to make it even marginally useful, what utility does the tool actually offer? The whole point is to keep state about resources in variables and to have STATIC templates for defining those resources. If I have to have dynamically generated templates, that breaks everything else within my infrastructure, which was all implemented according to 'best practices' suggested by the terraform community, splitting my variables from my templates and using terragrunt to combine them at execution time. But I can't do that if I have to render my templates dynamically.But more to the point, json doesn't actually help with this problem, whether I pre-render it prior to feeding it to terraform or not. My whole problem stems from wishing to create a list of similar resources with a single resource declaration and a list to iterate over in order to populate the resource with actual values. The whole point is to declare a resource once, with a count, and then allow terraform to extract values from variables dynamically. But I cannot do that, with jsonnet or terraform templates, because I have no way to do the dynamic lookups when trying to populate the variables at the point where terraform turns a resource with count > 1 into multiple resources. The json solution offers absolutely NOTHING to assist with that - other than, I suppose, to render the entire list of nearly identical resources as a giant long list of individual resources in the template - which then means I won't be able to use terraform's splat syntax for referring to them en-masse or otherwise extracting values from one resource and using it in another, since my resources would be dynamically generated, so how to refer to them? I suppose I have to manually iterate over the resources in jsonnet and construct output variables dynamically, too? JSON is barely a kludge for this problem, let alone a real solution.And looking at the jsonnet examples, I can only imagine how much coding by trial-and-error I'll have to do to even figure out what the JSON syntax is supposed to look like, since it looks pretty much nothing like the HCL versions. Every single template is going to require hours or days of trial and error to figure out how to structure things so that it actually works.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/253b9c91-5469-4a78-990e-53a0790091dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CANarjTgRdsGdmTDX0GiH_Q55HWiSJX0E7L%3DjDcAs5VaYqoqL9w%40mail.gmail.com.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CAGcMw-h7PtybrXn1HVti-aRC2CYHXsoq4K012FhPq9FXfUaYwQ%40mail.gmail.com.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CANarjTjeLU5orQgOX5bdYB5w%2Bf_tG_SbBxs1ysQ-gLWpOXZVhg%40mail.gmail.com.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CAGcMw-hRedkc3uThrDQfQtDGAycVFeGOVjQOxZ%3DYDdDgT45SAw%40mail.gmail.com.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CACRhdyZ7tMQ4OSHwe8MWnUmQHnx_9ED4Ug8PcNLNAX0rQ5gNGA%40mail.gmail.com.
Ok, so I’ll write yet another tool to cause terraform to workaround large deficiencies in its own capabilities. Why does terraform have its own configuration language at all if you have to go to an external language to do even relatively simple tasks? It’s not as though questions about working around this limitation in terraform don’t go back years wherever the tool is discussed.Isn’t the whole point of terraform to allow me to put external state about resources into variables, and then allow terraform to render templates combined with variables in order to manage infrastructure in a declarative manner? Isn’t its declarative nature supposed to be one of terraform’s selling points? How does rendering templates dynamically via another language further terraform’s declarative nature?If I have to write another external system that terraform can talk to whenever life gets complex, doesn’t that defeat the whole purpose of managing complexity WITHIN terraform? Now I no longer have the external state of my systems all contained in simple (and human-readable) variable declarations in my tfvars files. Now, some fraction of that external state is only available from the tool that I have to write for terraform to interact with. But if I wanted to write a bunch of code for managing state, why wouldnt I use terraform, which is supposedly a tool for doing exactly that? Instead of having all the state in one set of tfvars files, I’ll have it split between terraform and some external system using a completely different syntax. I’ll have to ensure that system is tested. There are revision control considerations. Access control considerations. Plus, it just breaks the consistency and declarative nature of everything that terraform is supposed to be. Now I need a meta-terraform for rendering templates that terraform can actually interact with?This solution GREATLY adds to the complexity of the problem and, frankly, I don’t even see how it really helps, since I’m trying to make things function via a single resource declaration with a count, meaning I need to be able to pass some kind of unique value for each instance, which gets me right back to maintaining multiple data structures that have to be maintained, only now they aren’t even in the same file or managed by the same tool. At the very least, this likely means that I’ve got some complex Json structure in a file in my template repository, along with a list of keys in a tfvars file in my environments repo. That’s arguably worse than multiple parallel structures all contained within my tfvars files.And if you object to how I communicate about this issue, it’s only because I’m fairly upset that I’ve been using terraform for 2 months now, and it consistently takes longer and is more difficult to do pretty much everything I ever try compared to just implementing it myself. I’ve spent 8 weeks automating an infrastructure that I could have automated manually with some scripts in the language of my choice in 2 weeks or less. I’ve been working under the assumption that I was climbing a learning curve, but the reality is that learning curve isn’t the problem. The problem is that terraform simply doesn’t work very well. In those 8 weeks, I’ve seen a software release that was not even remotely backward compatible with previous versions, without deprecation of the old syntax or even a warning prior to release. And I’ve run into intractable problems with functionality like this one on a weekly, if not daily, basis. The whole ‘automate our automation tool with an external language’ response is such a cop out to providing a functional tool. As was hashicorp’s response to the whole ‘we broke all your templates with 0.11’ issue. Backward compatibility? What’s that?If I could do it over again, I would never have wasted all of the time I put into terraform in the first place. I’d be far ahead of where I am AND my infrastructure automation would actually function in a consistent manner. The idea that I should have to overcome deficiencies in HCL by generating ‘expanded’ HCL (which is really just HCL but less human-readable) in some meta-tool just blows my mind. It would be one thing if that were a temporary workaround while waiting for an imminent fix, but as someone pointed out in this thread, it’s been 2.5 years now. In 2.5 years, I can implement all of the infrastructure automation I need with direct access to the AWS-SDK in the language of my choice.
On Fri, Jan 12, 2018 at 12:47 Philip Nelson <panman...@gmail.com> wrote:
Not sure what about your excellent way of engaging volunteers to help you made me respond, but there is one other way to process more complex documents like you want. Put the full configuration you want into a json file, then write a shell script that takes an input parameter and outputs a more flattened json document with only what you need back. It can usually be wrangled to work pretty simply, not a ton of code, tools most of us use pretty regularly anyway. I used it once to pull values out of ansible vault for example.On Fri, Jan 12, 2018 at 2:20 PM, Samuel Gendler <s...@stem.is> wrote:
So workaround the glaring holes in terraform by actually doing all the work in an entirely different tool and then rendering the terraform config from there? That's just a great solution. Isn't the whole point of terraform supposed to be to allow declarative infrastructure and state management? Now I have to write imperative code to render the declarative template so that the tool can work? At that point, why wouldn't I just write imperative code which calls the AWS-SDK directly - a method which is both simpler and FAR faster to implement than what you've suggested? If a tool is so lacking in features that you have to wrap it in yet another tool to make it even marginally useful, what utility does the tool actually offer? The whole point is to keep state about resources in variables and to have STATIC templates for defining those resources. If I have to have dynamically generated templates, that breaks everything else within my infrastructure, which was all implemented according to 'best practices' suggested by the terraform community, splitting my variables from my templates and using terragrunt to combine them at execution time. But I can't do that if I have to render my templates dynamically.But more to the point, json doesn't actually help with this problem, whether I pre-render it prior to feeding it to terraform or not. My whole problem stems from wishing to create a list of similar resources with a single resource declaration and a list to iterate over in order to populate the resource with actual values. The whole point is to declare a resource once, with a count, and then allow terraform to extract values from variables dynamically. But I cannot do that, with jsonnet or terraform templates, because I have no way to do the dynamic lookups when trying to populate the variables at the point where terraform turns a resource with count > 1 into multiple resources. The json solution offers absolutely NOTHING to assist with that - other than, I suppose, to render the entire list of nearly identical resources as a giant long list of individual resources in the template - which then means I won't be able to use terraform's splat syntax for referring to them en-masse or otherwise extracting values from one resource and using it in another, since my resources would be dynamically generated, so how to refer to them? I suppose I have to manually iterate over the resources in jsonnet and construct output variables dynamically, too? JSON is barely a kludge for this problem, let alone a real solution.And looking at the jsonnet examples, I can only imagine how much coding by trial-and-error I'll have to do to even figure out what the JSON syntax is supposed to look like, since it looks pretty much nothing like the HCL versions. Every single template is going to require hours or days of trial and error to figure out how to structure things so that it actually works.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/253b9c91-5469-4a78-990e-53a0790091dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CANarjTgRdsGdmTDX0GiH_Q55HWiSJX0E7L%3DjDcAs5VaYqoqL9w%40mail.gmail.com.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CAGcMw-h7PtybrXn1HVti-aRC2CYHXsoq4K012FhPq9FXfUaYwQ%40mail.gmail.com.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CANarjTjeLU5orQgOX5bdYB5w%2Bf_tG_SbBxs1ysQ-gLWpOXZVhg%40mail.gmail.com.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CAGcMw-hRedkc3uThrDQfQtDGAycVFeGOVjQOxZ%3DYDdDgT45SAw%40mail.gmail.com.--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CACRhdyZ7tMQ4OSHwe8MWnUmQHnx_9ED4Ug8PcNLNAX0rQ5gNGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CAGcMw-hpaX1iTOx3BecxAEoN6%2BU0PhfEJsL5FNtrFLcb3PO71A%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/5f71cfb1-c898-48c0-a730-9c347ecdb4af%40googlegroups.com.
Well, I was looking for a possible solution when I started the conversation, but when the answer to that question was ‘write a meta-tool to generate a less human-manageable form of terraform’s inputs so you don’t have to worry about the shortcomings’ it mostly became an opportunity to vent.I’m already using one tool to manage terraform’s shortcomings - terragrunt. I would have to abandon that to do what you suggest, thereby losing the functionality that it brings to the table for managing larger projects with larger teams of developers. Or else I would have to hack into terragrunt a feature that would render a template before running terraform. If a tool requires layer after layer of meta programming to be useful, it ceases to be useful. I’m just trading one form of complexity for another.
On Fri, Jan 12, 2018 at 13:44 Josh Smift <jbs.care...@gmail.com> wrote:
It sounds like you're pretty upset about having chosen Terraform as a tool. If you don't think it's a good fit for what you're trying to do, you probably shouldn't use it.--Terraform solves a *ton* of problems we have, *despite* the shortcomings of HCL, so we're still using it.If that's not true for you, maybe you should stop.Are you hoping to get something out of this conversation other than a place to express your frustration? Are you looking for advice, or alternatives, or validation, or ... ?I definitely agree that Terraform isn't the tool for everyone. If you feel like it isn't the tool for you, I'm sure your feelings are valid.
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/5f71cfb1-c898-48c0-a730-9c347ecdb4af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CAGcMw-hgxF9wdz3j6cKkvAfouqk%2Bfc6Jt_gZgdpj%2BfGgi7u2vA%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
I think I might have a solution for that:
I use nested
structures and access them through map and list functions and
their compositions
something like this:
resource "aws_subnet" "cache" {
count = "${length(var.subnet_cidr["cache"])}"
vpc_id = "${aws_vpc.vpc.id}"
cidr_block = "${element(var.subnet_cidr["cache"],count.index)}"
availability_zone = "${var.az[count.index]}"
}
Where subnet_cidr
looks like:
variable "subnet_cidr" {
type = "map"
default = {
public = [
"10.100.0.0/24",
"10.100.1.0/24",
"10.100.2.0/24",
"10.100.3.0/24",
"10.100.4.0/24",
]
cache = [
"10.100.150.0/24",
"10.100.151.0/24",
"10.100.152.0/24",
"10.100.153.0/24",
"10.100.154.0/24",
]
}
-- Tim, the beardless keeper of keys and grounds @ AgileBits Inc. ~~~~~~~~~~~~~~~~~~~~~~~ 1Password remembers all your passwords for you. It keeps your digital life secure and always available, safe behind the one password that only you know. Create your 1Password account today at https://1password.com
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/253b9c91-5469-4a78-990e-53a0790091dd%40googlegroups.com.