Questions tagged [hcl]

HashiCorp Configuration Language. The structured configuration syntax that serves as the basis for Terraform's configuration language.

HCL establishes the syntax Terraform uses for things like arguments, blocks, literal values, and expressions. But what most people think of as the Terraform language extends beyond just the syntax; the built-in functions, Terraform-specific block types (like resource and variable), and Terraform-specific named values available in expressions are all implementation details of Terraform itself.

Source: https://www.terraform.io/docs/glossary.html#hcl

291 questions
0
votes
1 answer

What is the ideal way to JSON.stringify in Terraform?

I'm working on my first Terraform project and I'm looking for the best way to stringify a JSON object. The resource I'm defining has a parameter that expects a JSON string. JSON structure is: "document": { "tag": "String Title", …
Jeremy Schultz
  • 579
  • 1
  • 6
  • 26
0
votes
0 answers

Waypoint deployment through nomad getting errors HTTP: no host in request URL

I'm currently building an app by using react where I build a docker container to help with the deployment through Waypoint and Nomad. However, I'm currently getting the following issue: ! Put "http:///v1/jobs/parse": http: no Host in request…
Hvaandres
  • 755
  • 2
  • 12
  • 39
0
votes
1 answer

Terraform - nested loop for resource creation

I'm trying to create all defined virtual_networks in all defined resource_groups. So the variables looks like this: inputs = { virtual_networks = { "test-net1": { address_space = ["10.0.0.0/24"] } "test-net2": { …
0
votes
0 answers

Issue applying deployment, Error due to invalid character in VM Extension

I have a CustomScript running via a VM Extension on a windows VM. I am passing powershell commands into this extension to run at deploy time. I started running into issues when I started to implement Windows UNC paths when I figured out that ‘\’ in…
Michael
  • 3
  • 2
0
votes
2 answers

Terraform Ternary Condition Working in Reverse

I have a Terraform module calling a submodule, which also calls another submodule. The final module uses a ternary condition as part of some logic to determine whether a dynamic block should be omitted in a resource definition. I'm going to only…
Afraz
  • 795
  • 1
  • 6
  • 20
0
votes
0 answers

Can't compile XPages project on HCL Designer 12.0.1. FP1

I have recently migrated my old XPages application to HCL Domino 12. I have also upgraded my dev environment to the same version. Unfortunately I am not able to compile the project since then. The process got stuck when it tries to invoke XSP…
0
votes
1 answer

Get a filtered list from a terraform map of objects?

I have a list of users with characteristics like this and I want to create a local variable that includes the names of the users in the "maker" group. variable "users" { type = map(object({ groups = list(string) })) default = { …
Josiah
  • 2,666
  • 5
  • 30
  • 40
0
votes
0 answers

Terraform import not working for GCP crypto keys

I created some crypto-keys manually and now wanted to import them to terraform state so that it's managed by terraform, which I did using following command which completes successfully: $ terraform import google_kms_crypto_key.some-key…
0
votes
2 answers

flatten terraform list of list using for loop without using flatten function

I know my expected result can be made using flatten built in function( which I have given below). But I want to know is there any way to create them only using nested for loops. output "languages" { value = flatten([ for user in…
Fuji Komalan
  • 1,979
  • 16
  • 25
0
votes
1 answer

Loading values dynamically from Terraform into a map

I'm trying to load some external data from a json file into Terraform to merge into an appSettings map It's loading it in as a tuple - and no matter what conversion I do, I can't get a map out of it: Call to function "merge" failed: arguments must…
Stuart.Sklinar
  • 3,683
  • 4
  • 35
  • 89
0
votes
1 answer

retrieve values from a list based on criterea using terraform syntax HCL

I am looking for a terraform expression to retrieve values from a list, i have a list of values namespaces = [blue,red,green,ns-blue,ns-green,ns-grey] I would like to retrieve in list format just the values contains "ns", as a result i must…
yelmir
  • 13
  • 4
0
votes
1 answer

consul-template expand new lines from env var

In consul-template I want to pass a ENV var with with new lines that will be expanded so "hello\nworld" is shown as: hello world command: VARIABLE="hell\nworld" consul-template -template "in.tpl:out.txt" -once && cat out.txt template file: {{ env…
henry.oswald
  • 5,304
  • 13
  • 51
  • 73
0
votes
2 answers

Terraform not declaring tfvars

I am new to Terraform and I am writing a script. Following is my directory structure folder ---.terraform ---..terraform.lock.hcl ---main.tf ---terraform.tfvars ---variables.tf Following is my content on terraform.tfvars. environment =…
Aun Zaidi
  • 103
  • 1
  • 9
0
votes
0 answers

HCL Nomad Android message box

We are using the Android HCL Nomad client to enable offline 'APP' use of a few applications and wanted to improve some of the feedback users get. Especially would like to give feedback to user like 'Thanks : document saved". When setting up on…
0
votes
0 answers

TERRAFORM (0.12) - Nested For-In or other technique to augment an object in a map

I have a map that looks like this: stuff = { object-1 = { id = "1" main_value = "blue" additional_in_values = ["red"] additional_out_values = ["green"] more_values = "foo" }, …
rpc
  • 79
  • 7