This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-08
Channels
- # architecture (8)
- # beginners (78)
- # boot (20)
- # cider (81)
- # clara (53)
- # cljdoc (10)
- # cljsjs (3)
- # clojure (55)
- # clojure-boston (1)
- # clojure-dev (25)
- # clojure-nl (3)
- # clojure-uk (65)
- # clojurescript (65)
- # core-async (1)
- # cursive (41)
- # data-science (4)
- # datomic (16)
- # editors (74)
- # emacs (17)
- # events (1)
- # figwheel (3)
- # hyperfiddle (39)
- # immutant (16)
- # jobs-discuss (62)
- # juxt (2)
- # keechma (2)
- # leiningen (6)
- # mount (7)
- # nrepl (1)
- # off-topic (30)
- # onyx (14)
- # protorepl (2)
- # re-frame (4)
- # reagent (15)
- # reitit (19)
- # shadow-cljs (102)
- # sim-testing (1)
- # spacemacs (44)
- # specter (15)
- # tools-deps (50)
- # vim (2)
["${var.vpc_security_group_ids}"]
who knows what this does? π What does it look like when expanded?
@dominicm looks like a vector containing a string that will be expanded by something that isn't clojure
Bore da pawb
@firthh it does. I've expanded the question, to make it a little clearer what the gotcha might be π
well the []
I would assume is an array of things, and then based on the name I would assume would contain an array as well, so something like - [ [ "group-1", "group-2" ] ]
?
morning!
I vaguely remember sometimes terraform folk make a string like "sg-gbgbg, sg-dfhfhfd, sg-hfhfhf"
and then drop it into a vector
I've seen something like that before, no idea if it's idiomatic
Terraform treats [
as special from the inside out. And despite being in a string, interpolation doesn't have to return a string. The logical thing of course would be what @firthh says. Terraform does magic and turns it into ["group-1", "group-2"]
@dominicm does "${var.vpc_security_group_ids}"
alone also give you ["group-1", "group-2"]
?
if you look at examples, that's where you see it, and then it's prevalent in the community https://github.com/coryodaniel/terraform-aws-cloudwatch_widget/blob/master/main.tf#L13
I found one - https://www.terraform.io/docs/configuration/interpolation.html#user-list-variables
When I was at uSwitch someone wrote a ruby wrapper around terraform so that you had a proper programming language to do all of this - https://github.com/uswitch/terrafying
we were generating terraform via clojurescript, but discovered that their json syntax does not allow you to express everything you can in hcl
hoy hoy
There is HCL 0.12 comming with some exciting new features like β¦ for loops!
HCL being an acronym for Hashicorp Configuration Language - the language used in Terraform
few other good features as well https://www.hashicorp.com/blog/terraform-0-1-2-preview
yes, I donβt know how can anyone hold their excitement hearing about those features
But is another language still the best solution? I quite like a DSL in a language I know