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
1
vote
1 answer

HCL Domino 11.0.1 JAR files missing. JARS were available in IBM Domino 9.0.1FP9

A number of JAR files present in our old IBM Domino 9.0.1FP9 environment appear to have gone missing after upgrading to HCL Domino 11.0.1. Specifically, the below list: import com.ibm.commons.util.StringUtil; import…
1
vote
1 answer

HCL Unmarshal Custom Types

Is there a way to decode custom types with hcl/v2? I'm looking for something equivalent to encoding/json.Unmarshaler. I've tried implementing encoding.TextUnmarshaler which didn't work. Here's an example use-case. type Duration struct { …
Ilia Choly
  • 18,070
  • 14
  • 92
  • 160
1
vote
3 answers

Terraform: store the contents of a set of files into a single variable

This is in TF V0.12 if that helps In a directory, I have a variable number of single-line files. I need to somehow read the contents of them all concatenating them with a newline between and store the result into a single variable. (not an array of…
Marcus Adams
  • 1,237
  • 1
  • 12
  • 26
1
vote
1 answer

using terraform template_file and s3 to bootstrap with s3

We are trying to keep bootstrapping user_data configuration files in S3. But we also have a need to variables and manage secrets for parts of the user data scripts. So my thought was to create a bucket, store our scripts, then use template_file from…
LCM
  • 176
  • 3
  • 10
1
vote
0 answers

How to create terraform map variable from script inside main.tf?

I have a main.tf that looks like this: module "my-module" { source = "./modules/my-module" mymap = "${var.mymap}" } and the following variables.tf file as shown: variable "mymap" { type = "map" default = { } } I would like to run a…
Antonio Gomez Alvarado
  • 1,842
  • 2
  • 13
  • 24
1
vote
0 answers

Terraform: how to do math within resource

I have a resource, and within it I use count. I need to add one to the count, and cannot figure out the syntax. Background Up until now I have been doing this: resource "signalfx_time_chart" "my_chart" { count = 6 name = "Chart…
Intrastellar Explorer
  • 3,005
  • 9
  • 52
  • 119
1
vote
2 answers

How do I escape true/false in terraform?

I need to pass the word true or false to a data template file in terraform. However, if I try to provide the value, it comes out 0 or 1 due to interpolation syntax. I tried doing \\true\\ as recommended in…
1
vote
1 answer

How Can a Map Be Modified on-the-fly?

I need to iterate more times on specific HCL Map key/value pairs which need to be based on the value of specific variables. I've come to the idea of modifying the current map - so that certain keys/values will be iterated more times. If we have…
Xtigyro
  • 391
  • 2
  • 5
  • 13
1
vote
1 answer

Terraform join interpolation not appending to last element

I have a snippet that creates a list of Vmware machines like so.. resource "vsphere_virtual_machine" "os-lb" { count = 3 And then later in my file, I create a variable list to pass to a template like so... vm.tf…
thisguy123
  • 939
  • 1
  • 9
  • 31
1
vote
1 answer

Terraform > Unescaped interpolations

What does this mean: Note: Inline templates must escape their interpolations (as seen by the double $ above). Unescaped interpolations will be processed before the template. from https://www.terraform.io/docs/providers/template/index.html The…
Snowcrash
  • 80,579
  • 89
  • 266
  • 376
1
vote
1 answer

Syntax for lists and maps in Terraform JSON

I am looking for the correct syntax in Terraform JSON to write list or maps. There seems to be very few documentation on terraform as JSON (.tf.json) I am currently getting the following error: Error loading config: Error loading…
lankan
  • 35
  • 1
  • 5
0
votes
0 answers

Does Consul 1.16.1 properly implement os_service checks on Ubuntu 20.04?

Ubuntu: 20.04 qemu, Consul: 1.16.1, Vault 1.14.1 I am trying to use Consul to monitor Vault's systemD service, as per https://developer.hashicorp.com/consul/docs/services/usage/checks#osservice-check, but the result is a "not implemented" error. My…
0
votes
0 answers

Can't access attributes on a list of objects

My configuration code is perfect and i define module in root file but i see this error in terraform IAC Error: Unsupported attribute │ │ on ec2instance-outputs.tf line 25, in output "ec2_private_ip": │ 25: value =…
0
votes
0 answers

Terraform - Multiple Conditional

I would like some help regarding Terraform. I'm creating a Terraform module to add already existing users in Keycloak in already existing groups. resource "keycloak_user_groups" "user_groups" { #for_each = local.keycloak_users_lc realm_id =…
0
votes
0 answers

SQS message format from Step Function: Flatten Input Object

I have a Step Function who's last step is to add a message on to an SQS queue. The state machine (HCL) definition for this step includes the following: Type = "Task", Resource = "arn:aws:states:::sqs:sendMessage", Parameters = { QueueUrl:…
duncanhall
  • 11,035
  • 5
  • 54
  • 86